PREFLIGHT — URL Routing for AI Agents

io.github.GSterlingPressPublished by GitHub account GSterlingPressv0.7.6Updated Oct 25, 2026

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

The publisher's own server: Preflight

VerifiedStreamable HTTPWeb executableWeb Search & ScrapingDeveloper Tools

Overview

AI-generated overview

Remote MCP service that tells an assistant the best first route (HTTP, browser, machine endpoint or avoid) before it visits an unfamiliar URL.

What you can do
Get a recommended first route for an unfamiliar URL: HTTP, BROWSER, MACHINE_ENDPOINT or AVOID, with access, JavaScript, size and cost hints. Report back whether the chosen route worked so the service can learn from aggregated evidence.
When to use it
Use it when an agent is about to visit an unfamiliar URL and you want to decide the route before paying fetch or browser-rendering costs. Suited to browsing, research, shopping and coding agents that want to save tokens and time.
Requirements
Remote endpoint; no local runtime or package needed. No authentication, environment variables or headers declared; network access required.
Before you install
Sends the actual destination URL to a third-party service; feedback is stored as aggregated success/failure evidence. Feedback writes can optionally be protected with PREFLIGHT_FEEDBACK_KEY. The service blocks localhost, private addresses and credential-bearing URLs, but URLs themselves are still external data.

Installation

In SourceWeft

  1. Open PREFLIGHT — URL Routing for AI Agents in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.GSterlingPress%2Fpreflight/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "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.

Source: README.md at commit c5ce1cd

Tools

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.

Parametersurlrequired

preflight_feedback

Report PREFLIGHT Outcome

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

ParametersurlrequiredrouterequiredoutcomerequiredlatencyMs

Version history

1
  1. v0.7.6LatestSep 16, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.

Other Preflight integrations