Skip to content

feat: move squirrel mcp to MCP protocol 2026-07-28 (SDK v2) #570

Closed

Description

@nc9

Problem or use case

squirrel mcp (apps/cli/src/mcp) is built on @modelcontextprotocol/sdk v1 (1.32.1). MCP revision 2026-07-28 makes the protocol stateless: the initialize handshake is gone (SEP-2575), and clients send protocol version and capabilities in _meta on each request and call server/discover for server capabilities. The SDK maintainers say v1 will not support 2026-07-28, and v1 gets bug and security fixes only until about 2027-01-27. Claude Code's v2 MCP runtime (v2.1.274+) requests 2026-07-28 from stdio servers by default.

The HTTP-only parts of the revision (Mcp-Method and Mcp-Name headers, session id removal) don't apply to a stdio server. The handshake change, JSON Schema 2020-12 tool schemas (SEP-2106) and the SDK move do.

Proposed behavior

Move squirrel mcp to the v2 SDK (@modelcontextprotocol/server) so it serves both 2026-07-28 clients and 2025-era clients.

Caveat: Claude Code will not register a channel server that negotiates 2026-07-28. If squirrel channel (#569) shares code with squirrel mcp, the channel entry point must keep the legacy handshake.

Alternatives considered

Staying on v1 until clients force the move. That deadline is the v1 maintenance window (about January 2027).

Who it helps

Anyone running squirrel mcp with an MCP client on the 2026-07-28 protocol.

Acceptance Criteria

  • squirrel mcp serves a 2026-07-28 client (no initialize, server/discover returns the server's capabilities) and a 2025-11-25 client from the same binary.
  • The CLI no longer depends on @modelcontextprotocol/sdk v1.
  • squirrel channel still negotiates the legacy handshake, so Claude Code keeps registering it as a channel.
  • scripts/mcp-smoke.ts and tests/mcp/* pass against both protocol versions.
  • The new behavior is documented (supported MCP protocol versions in docs/).

Generated by Claude Code

Activity

  1. added
    enhancement
    P2
    size: S
    on Oct 8, 2026
  2. nc9 commented on Oct 10, 2026

    @nc9
    ContributorAuthor

    Ticked 1, 4 and 5 (#572, shipped in v0.0.106): tests/mcp/protocol.test.ts serves both eras, scripts/mcp-smoke.ts --protocol legacy|2026-07-28, and "Supported protocol versions" in docs/cli/mcp.mdx. Left: squirrel channel still imports the v1 Server and StdioServerTransport (apps/cli/src/channel/server.ts:8-9), so apps/cli/package.json still depends on @modelcontextprotocol/sdk ^1.31.0. Switching the channel to the v2 Server with a plain server.connect(new StdioServerTransport()) (not serveStdio) keeps the legacy handshake and lets the v1 dependency go.

  3. nc9 commented on Oct 11, 2026

    @nc9
    ContributorAuthor

    Done. The 2026-07-28 revision shipped in #572 (local server, v0.0.108) and in the hosted servers; squirrel channel moved to the v2 Server with a plain stdio connect and 2025-era protocol versions only, so Claude Code keeps registering it as a channel (e2e pins the legacy era and refuses a client pinned to 2026-07-28); @modelcontextprotocol/sdk v1 is gone from the CLI and bun.lock (#654, 8998cdf); the notices generator now also covers packages the v2 SDK bundles (follow-up #657 hardens it). Criteria ticked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2enhancementsize: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions