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 整合