Model Context Protocol · sdk · fg-0528

MCP TypeScript client fails with SdkError ERA_NEGOTIATION_FAILED against an older server

ERA_NEGOTIATION_FAILED: Version negotiation failed: the server did not offer pinned protocol version 2026-07-28 via server/discover (no fallback in pin mode)

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

Cause

2026-07-28 drops the initialize handshake and adds server/discover. A v2 client pinned to that version, or one whose supportedProtocolVersions lists only 2026 revisions, has nothing to fall back to when the server still speaks a 2025 revision.

Fix

Use versionNegotiation mode auto and keep a 2025 revision in the supported list, so the probe falls back to initialize. Use mode legacy for servers that exit on any request before initialize.

Apply

const client = new Client({ name: 'app', version: '1.0.0' }, { versionNegotiation: { mode: 'auto' } });
await client.connect(transport);
console.error(client.getProtocolEra()); // 'legacy' against 2025 servers

Affects: @modelcontextprotocol/client 2.x with MCP protocol 2026-07-28, as of 2026-10

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp