Model Context Protocol · sdk · fg-0528

MCP TypeScript client fails with SdkError ERA_NEGOTIATION_FAILED against an older server

If you see 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), the cause and the fix for Model Context Protocol are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
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)the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to
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
Affected
@modelcontextprotocol/client 2.x with MCP protocol 2026-07-28, as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun