preflight-api

preflight-api

Provides pre-fetch routing intelligence for AI agents by recommending the cheapest reliable route (HTTP, browser, machine endpoint, or avoid) before visiting a URL.

Category
访问服务器

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:

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

POST /v1/feedback
Content-Type: application/json
Authorization: Bearer <feedback-key>   # when protection is enabled
{
  "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+.

npm test
npm 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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选