Routes
Current defaults
- path:
/mcp - hostname:
127.0.0.1 - port:
3000 - session timeout:
60_000ms (legacy sessioned versions only) - list cache hints:
ttlMs: 60000,cacheScope: "public"(MCP2026-07-28)
Protocol versions
The current transport negotiates:2026-07-28(stateless Streamable HTTP)2025-11-252025-03-262024-11-05
MCP 2026-07-28 (stateless)
When the client sendsMCP-Protocol-Version: 2026-07-28:
- no
initializehandshake orMcp-Session-Idis required - optional
server/discoveradvertisessupportedVersions, capabilities, and cache hints - requests must include
Mcp-Method(andMcp-Namefortools/call,resources/read,prompts/get, and task methods) - list/read/discover results include
ttlMs,cacheScope, andresultType - tasks are advertised under
capabilities.extensions["io.modelcontextprotocol/tasks"] - mid-call input uses MRTR (
resultType: "input_required") viarequireInput()/InputRequiredError - change notifications use
POSTsubscriptions/listeninstead of legacyGET /mcp
Legacy sessioned behavior
For older protocol versions:initializemints anMcp-Session-Id- non-initialize requests require that session header
GET /mcpopens an Inspector-style SSE streamDELETE /mcpterminates the session- tasks remain under top-level
capabilities.tasks
Practical behavior
- the transport supports streamable HTTP-style MCP traffic
- it keeps compatibility behavior for local Inspector-style SSE flows on legacy versions
- it can adopt client-provided session IDs for local tooling interoperability (legacy)
- it exposes an optional health route when you enable
health debug: truelogs requests, session behavior, protocol negotiation, and responses to stderrlistCacheonlisten()overrides default list cache hints for2026-07-28
Current caveats
tlsis passed through to Bun.serve when using.listen(); portable adapters do not terminate TLS themselvescorsis handled by a simple built-in response instead of the full typedCorsOptionspolicy surface- serverless/edge adapters prefer MCP
2026-07-28; long-lived SSE and in-memory sessions are limited there