Bring OmniRoute's MCP server from its legacy v1 surface to the 2026-07-28 specification by adding an opt-in native sidecar that speaks the new wire format (MCP-Protocol-Version: 2026-07-28, server/discover, resultType, cacheable lists, _meta extraction, header-based routing, outputSchema, MRTR contract) while keeping the existing v1 server, sessions, CLI entry, and full tool catalog untouched for legacy clients.
The v1 MCP server is live and production-used. open-sse/mcp-server/ already exposes 37 tools over stdio, HTTP (SSE), and streamable HTTP. The v1 implementation rejects the 2026-07-28 header with HTTP 400 and does not expose modern discovery. This is not a greenfield MCP server — it is a parallel, opt-in surface that runs alongside v1, exactly as the spec's compatibility clause intends.
| Capability | v1 today | 2026-07-28 required | Gap |
|---|---|---|---|
| Protocol version header | Rejects 2026-07-28 → 400 | Accept + route | Hard block |
server/discover | Absent | Required for v2 | Hard block |
resultType field | Absent | Required on responses | Hard block |
Cacheable list results (ttlMs, cacheScope) | Absent | Required | Hard block |
_meta extraction + passthrough | Absent | Required | Hard block |
| Mcp-* request headers | Absent | Required | Hard block |
outputSchema on tool definitions | Absent | Required | Hard block |
| MRTR (model-request-tool-result) contract | Absent | Required | Hard block |
| Stateless initialize (no handshake) | v1 requires handshake | v2 drops it | Hard block |
| Scope enforcement | v1 has it | Must not be looser in v2 | Verification |
| Client metadata → permission grant | v1 had a path | Blocked in v2 | Verification |
Source: PR #15983 body + diff (open-sse/mcp-server/v2/server.ts 979 lines, src/app/api/mcp/v2/route.ts, tests/unit/mcp/v2-* 11 test files).
| In scope | Out of scope (now) | Explicitly refused |
|---|---|---|
v2 sidecar under open-sse/mcp-server/v2/ | Full catalog migration | Replacing v1 |
8 tools calling omniRouteFetch() against real endpoints | Version routing on main /api/mcp | Removing v1 |
Opt-in gated by OMNIROUTE_MCP_V2 feature flag | Cancellation propagation | Changing v1 behavior |
server/discover, resultType, _meta, cacheable lists | Production acceptance testing | Merging without Diego review |
src/app/api/mcp/v2/route.ts (stateless HTTP) | ||
| Scope enforcement ≥ v1 (resolved via v1's DB-aware switch) | ||
| Sanitized transport/tool errors + stdio cleanup handle | ||
11 test files (unit + integration) under tests/unit/mcp/v2/ | ||
vitest.mcp.config.ts for isolated MCP test runner |
A client that sends MCP-Protocol-Version: 2026-07-28 gets:
server/discover over stdio and HTTP, listing only the 8 v2 tools (no unregistered resources/prompts — honest discovery)resultType on every JSON-RPC response_meta extracted from tool results and surfaced at the protocol levelttlMs + cacheScope on list-tool resultsMcp-* headers passed through the transportoutputSchema on tool definitions for client-side validationA legacy client (no version header or 2024-10-07) sees v1 unchanged.
_meta cannot grant permissions it didn't have/api/mcp endpoint (only /api/mcp/v2)