Guided review: MCP 2026-07-28 spec-compliant v2 server sidecar

Local changes in branben/omniroute (feat/mcp-v2-sidecar) · HEAD

Orient the reviewer to the v2 sidecar changes in PR #15983 (head 62937d3): the new open-sse/mcp-server/v2/ server, the /api/mcp/v2 route, the feature flag, the changelog entry, and 12 new test files. The 21 files total +2761/-14.

1. Product code

Runtime changes: the v2 server, the modern HTTP route, the legacy export surface, and the feature flag.
  • open-sse/mcp-server/v2/server.ts — New v2 MCP server sidecar, speaking the 2026-07-28 protocol with the 8-tool surface.
  • open-sse/mcp-server/index.ts — Exports the v2 server alongside the existing v1 surface.
  • src/app/api/mcp/v2/route.ts — New HTTP route for /api/mcp/v2. Handles auth, protocol-version checks, and dispatch.
  • src/shared/constants/featureFlagDefinitions.ts — Adds the feature flag that gates the v2 sidecar.

2. Scripts and tooling

Test discovery and dependency manifests for the new suite.
  • scripts/check/check-test-discovery.mjs — Teaches test discovery about the v2 test locations.
  • package.json — Adds the script and dependency entries used by the v2 suite.
  • package-lock.json — Lockfile updates matching package.json.
  • vitest.mcp.config.ts — Vitest config for the MCP test suite.

3. Tests

Twelve new test files under tests/unit, plus one existing file extended. The MCP vitest run covers 11 files, 94/94 at this head. The legacy pointer suite is not in this PR; it was added after this head.
  • tests/unit/api/mcp-v2-modern.spec.ts — Modern-endpoint behaviour for /api/mcp/v2.
  • tests/unit/api/mcp-v2-stdio.spec.ts — Stdio transport parity for the v2 server.
  • tests/unit/feature-flags-settings.test.ts — Updates the feature-flag count and settings coverage for the v2 gate.
  • tests/unit/mcp/v2-discover-honesty.spec.ts — Checks that discovery reports only what the server supports.
  • tests/unit/mcp/v2-esm-link.spec.ts — ESM linking of the v2 module.
  • tests/unit/mcp/v2-feature-flag.spec.ts — Feature-flag gating of the v2 route.
  • tests/unit/mcp/v2-gaps.spec.ts — Known-gap assertions for the v2 surface.
  • tests/unit/mcp/v2-http-route.spec.ts — HTTP route behaviour and error shapes.
  • tests/unit/mcp/v2-parity.spec.ts — Parity checks between v2 and the existing tool behaviour.
  • tests/unit/mcp/v2-scope-enforcement.spec.ts — Scope enforcement for tool calls.
  • tests/unit/mcp/v2-server.spec.ts — Core v2 server behaviour.
  • tests/unit/mcp/v2-tool-smoke.spec.ts — Smoke test across the 8 v2 tools.

4. Everything else

Changelog entry for the feature.
  • changelog.d/features/mcp-v2-2026-07-28.md — Changelog entry for the MCP v2 sidecar.