PREFLIGHT — URL Routing for AI Agents

io.github.GSterlingPress由 GitHub 账号 GSterlingPress 发布v0.7.6更新于 Oct 25, 2026

Choose HTTP, browser, machine endpoint, or avoid before an agent visits an unfamiliar URL.

发布方自己的服务:Preflight

已验证Streamable HTTP可网页运行网页搜索与抓取开发者工具

概览

AI 生成的概览

远程 MCP 服务,让助手在访问陌生网址前先获取建议路线(HTTP、浏览器、机器端点或避免)。

可以做什么
在访问陌生网址前获取建议路线:HTTP、BROWSER、MACHINE_ENDPOINT 或 AVOID,并附带访问、JavaScript、大小与成本提示。回报实际采用路线的结果,供服务积累学习证据。
适用场景
当助手即将访问不熟悉的网址,且希望在付出抓取或浏览器渲染成本前先决定路线时使用。适合浏览、研究、购物与编程类助手,用来减少 token 与时间浪费。
运行要求
远程端点,无需本地运行时或软件包。未声明认证、环境变量或请求头;需要网络连接。
安装前请注意
会把实际目标网址发送给第三方服务;回报内容会以汇总的成功/失败证据形式存储。反馈写入可选择由 PREFLIGHT_FEEDBACK_KEY 保护。服务会拦截本机、私有网络地址与含凭据的网址,但网址本身仍属外部数据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 PREFLIGHT — URL Routing for AI Agents,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.GSterlingPress%2Fpreflight/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "preflight-url-routing-for-ai-agents": {
      "type": "http",
      "url": "https://preflight-api-production-01a2.up.railway.app/mcp"
    }
  }
}

README

PREFLIGHT

Before your AI agent visits a URL, ask us how to get there.

PREFLIGHT is routing intelligence for browser, research and shopping agents. Given a URL, it recommends the cheapest likely route to try first: HTTP, BROWSER, MACHINE_ENDPOINT, or AVOID.

The long-term product is a machine map of the web: not what is on the web, but how should a machine interact with this destination?

Live service

Base URL:

https://preflight-api-production-01a2.up.railway.app

REST — use the actual URL your agent is about to visit:

http
GET /v1/check?url=<encoded-actual-destination-url>

For example, if your agent is about to inspect a product, documentation page, article, booking page, or SaaS site, pass that real destination to PREFLIGHT first. example.com is only a documentation placeholder and should not be used when a real task URL exists.

Remote MCP:

https://preflight-api-production-01a2.up.railway.app/mcp

The MCP server exposes two tools:

  • preflight_check — call this before fetching or browser-rendering an unfamiliar real URL.
  • preflight_feedback — report whether the chosen route worked so PREFLIGHT can improve future recommendations.

Example tool intent:

Before opening the URL from my current task, use PREFLIGHT to decide whether ordinary HTTP, a browser, a machine-readable endpoint, or avoidance is the best first route.

Why an agent should call PREFLIGHT

Fetching first can be wasteful. A destination may be directly readable over HTTP, require browser rendering, expose a smaller machine endpoint, block automation, require authentication/payment, or carry access signals that make a fetch undesirable. PREFLIGHT tries to answer that routing question before the expensive step.

Responses combine direct probe signals, cached domain knowledge, and sufficiently strong observed route feedback. They can include status, redirects, robots/access hints, estimated token size, JavaScript-shell hints, structured-data signals, machine endpoints, latency, confidence, cache age, and learned route evidence.

Feedback loop

http
POST /v1/feedbackContent-Type: application/jsonAuthorization: Bearer <feedback-key>   # when protection is enabled
json
{  "url": "https://merchant.example/product/123",  "route": "BROWSER",  "outcome": "success",  "latencyMs": 840}

PREFLIGHT stores aggregated success/failure evidence rather than page content or user identities. URL-level learning requires at least 5 samples at 80% success; domain-level learning requires at least 10 samples at 85% success. Feedback never overrides a current AVOID decision from live safety/access/robots signals.

Agent discovery

  • AGENTS.md tells coding/AI agents exactly when to use PREFLIGHT.
  • llms.txt gives LLMs a compact machine-readable explanation, live endpoints, and usage rule.
  • openapi.json exposes REST operations in OpenAPI 3.1 format for tool importers and generated clients.
  • mcp.json contains a generic remote MCP client configuration.
  • docs/AGENT-INTEGRATIONS.md contains copy/paste integration patterns for browser, research, shopping, coding, MCP, and REST agents.
  • server.json contains official MCP Registry metadata for the public Streamable HTTP server.
  • /mcp supports MCP initialize, initialized notification, ping, tools/list, and tools/call.
  • The ordinary REST endpoint remains available for clients that do not use MCP.

Search/discovery concepts: AI agent URL routing, browser-agent preflight, choose HTTP vs browser, machine-readable endpoint discovery, reduce agent browsing tokens, agent web routing, pre-fetch routing intelligence, AI browser cost reduction, route before crawl, agent URL access intelligence.

Public deployment

GET /ready verifies the data directory is writable. Railway deployments use /data; mount a persistent volume there when long-term feedback persistence is required. PREFLIGHT_FEEDBACK_KEY optionally bearer-protects feedback writes while keeping route checks public. npm run smoke:live exercises the public route/feedback cycle.

Real-world benchmark

benchmarks/sites.json contains a cross-category live corpus. Run npm run benchmark. The scheduled benchmark records route, status, latency, token estimate and machine endpoints and preserves machine-readable reports for trend analysis.

Safety boundary

PREFLIGHT blocks localhost, private/link-local network addresses, credential-bearing URLs, non-HTTP protocols, and unsafe redirect destinations. Endpoint discovery and negotiated probes go through the same SSRF-safe fetch layer. MCP validates browser Origins, and route feedback cannot relax an active AVOID result.

Run locally

Requires Node.js 20+.

bash
npm testnpm start

Product boundary

PREFLIGHT is not a crawler, browser farm, search engine or site-owner audit tool. Its job is narrower:

Real URL in → cheapest reliable machine route out.

来源:README.md,提交 c5ce1cd

工具

2

preflight_check

Check URL Before Fetching

Before fetching, crawling, scraping, opening, or browser-rendering an unfamiliar http/https URL, call this with the ACTUAL destination URL. Returns the best first route: HTTP, BROWSER, MACHINE_ENDPOINT, or AVOID, plus access/JS/size/cost hints. Do not substitute example.com when a real task URL is available.

输入参数url必填

preflight_feedback

Report PREFLIGHT Outcome

After following a PREFLIGHT recommendation, report whether the chosen route worked so PREFLIGHT can improve future recommendations.

输入参数url必填route必填outcome必填latencyMs

版本历史

1
  1. v0.7.6最新Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。

其他 Preflight 集成