Quick Answer
MCP Error -32602 is the JSON-RPC 2.0 Invalid params error. When the error message says "Unsupported Protocol Version", the server rejected the protocolVersion value your client sent in the initialize request. The fastest fix is to update both your MCP client and server to the same current SDK release so they negotiate a mutually supported protocol version automatically.
60-Second Fix Checklist
Work through this list top-to-bottom before diving deeper.
- Check the error message exactly. Is it literally "Unsupported Protocol Version"? A different message on a -32602 code points to a different invalid parameter.
- Find the
protocolVersionvalue your client is sending. Check your client config or SDK source — look for a hardcoded string like"2024-11-05"or similar. - Find the protocol version(s) your server accepts. Check the server's SDK version and its changelog or source.
- Update your client SDK to the latest release:
npm update @modelcontextprotocol/sdk(or your language equivalent). - Update your server SDK to the same latest release.
- Remove any hardcoded
protocolVersionoverrides in client or server configuration. - If deployed behind a proxy, verify the proxy is not rewriting JSON-RPC request bodies.
- Re-run the initialize handshake with MCP Inspector to confirm negotiation succeeds.
- Check server logs for the rejected version string to pinpoint exactly which component is out of date.
What Does MCP Error -32602 Mean?
The JSON-RPC 2.0 specification reserves a small set of error codes in the -32700 to -32600 range for protocol-level errors. Code -32602 means "Invalid params" — the method exists, but the parameters passed to it are wrong in some way: missing required fields, wrong types, values outside the accepted range, or in the case of MCP initialization, an unrecognized protocolVersion string.
Importantly, -32602 is not exclusively a protocol-version error. You can receive this code for any malformed parameter in any MCP request. The error message field is what implementation authors use to explain which parameter is invalid. "Unsupported Protocol Version" is one specific message several MCP implementations attach when the bad parameter is protocolVersion.
For a complete reference of all MCP error codes and what they mean, see the MCP Error Codes guide.
Invalid Params vs. Unsupported Protocol Version
| Aspect | JSON-RPC Meaning | MCP Specialization |
|---|---|---|
| Error code | -32602 | Same |
| Standard meaning | Invalid params | Any structurally wrong parameter |
| "Unsupported Protocol Version" message | Not defined by JSON-RPC | Implementation-specific message for bad protocolVersion |
| When triggered | Any method | Primarily during initialize |
| Root fix | Correct the invalid parameter | Align protocolVersion between client and server |
Do not assume every -32602 you encounter is a protocol version problem. Always read the message field first.
How MCP Protocol Version Negotiation Works
Every MCP session starts with an initialize request. This is not optional — it is the first message the client must send before any tool calls, resource reads, or prompt requests. Inside that request, the client declares which protocolVersion it wants to speak.
Typical initialize request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {
"roots": { "listChanged": true },
"sampling": {}
},
"clientInfo": {
"name": "my-mcp-client",
"version": "1.0.0"
}
}
}
Server success response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2024-11-05",
"capabilities": {
"tools": {},
"resources": {}
},
"serverInfo": {
"name": "my-mcp-server",
"version": "2.1.0"
}
}
}
Server error response when version is unsupported:
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32602,
"message": "Unsupported Protocol Version",
"data": {
"requested": "2023-01-01",
"supported": ["2024-11-05"]
}
}
}
What the server does with protocolVersion
The server checks whether it supports the version the client requested. If it does, it echoes back the agreed version. If it does not, it returns a -32602 error. Per the MCP specification, the server may also respond with a different supported version — in that case a conforming client should either accept it or disconnect. The handshake does not involve multi-round negotiation; it is a single client proposal followed by a server accept or reject.
Notice: protocolVersion is a protocol-level field, not your server application version, SDK package version, or HTTP version. Confusing these is the most common mistake developers make when debugging this error.
Common Causes of Unsupported Protocol Version
| Cause | How to Verify | Fix |
|---|---|---|
Client SDK is outdated and sends a deprecated protocolVersion | Check SDK version: npm list @modelcontextprotocol/sdk | Update client SDK to latest release |
| Server SDK is outdated and doesn't recognize a newer client version | Check server-side SDK version same way | Update server SDK |
protocolVersion hardcoded in client config or source | Search codebase for the version string | Remove hardcode; let SDK set it |
protocolVersion hardcoded in server config | Check server startup config or env vars | Remove hardcode |
| Proxy or gateway rewrites or strips the JSON-RPC body | Test with direct connection bypassing proxy | Fix proxy config or disable body rewriting |
| Multiple MCP clients targeting same server, only one fails | Compare SDK versions of both clients | Update failing client SDK |
| Remote deployment uses a different server package version than local | Compare package.json or lockfile on remote vs local | Align package versions in deployment |
initialize params object is malformed (missing clientInfo, wrong types) | Inspect raw request with MCP Inspector | Fix params structure per current MCP spec |
| Environment variable pins a specific protocol version | Search env vars for version strings | Remove or update the pinned version |
Fix MCP Error -32602 Unsupported Protocol Version
1. Let the SDK manage protocolVersion (highest priority)
The single most common source of this error is a developer who manually set protocolVersion somewhere — in a config file, an environment variable, or directly in code. Remove it. The official MCP SDKs set the correct value automatically based on the SDK version you are running.
// WRONG — do not hardcode protocolVersion
const client = new Client({
name: 'my-client',
version: '1.0.0',
}, {
protocolVersion: '2023-01-01' // this will break against newer servers
});
// CORRECT — let the SDK negotiate
const client = new Client({
name: 'my-client',
version: '1.0.0',
});
2. Update SDK dependencies on both sides
If you are not hardcoding a version, the problem is almost certainly an SDK version mismatch. Update both client and server.
TypeScript / Node.js:
# Check current versions
npm list @modelcontextprotocol/sdk
# Update
npm update @modelcontextprotocol/sdk
# or pin to latest
npm install @modelcontextprotocol/sdk@latest
Python:
# Check current version
pip show mcp
# Update
pip install --upgrade mcp
After updating, check the SDK changelog to confirm which protocolVersion strings the new version sends. Both sides need to support at least one common version.
3. Check the server logs for the rejected version string
Before upgrading blindly, confirm which protocolVersion value was actually rejected. Most server implementations log the incoming initialize request or at minimum log the error data. The data field in the error response often contains both the requested and supported versions — check that first.
4. Diagnose proxies and middleware
If the error appears in production but not locally, a proxy is the primary suspect. Verify:
- The proxy is not set to parse and rewrite JSON bodies.
- If using an API gateway (AWS API Gateway, Kong, nginx), confirm it is passing the raw POST body through unchanged.
- Test by connecting directly to the server port, bypassing the proxy, to see if initialization succeeds.
5. Align deployment versions
For remote deployment failures, compare the exact package lockfile versions between local and the deployment environment:
# Local
cat package-lock.json | grep -A2 '@modelcontextprotocol/sdk'
# Remote (via SSH or CI logs)
cat package-lock.json | grep -A2 '@modelcontextprotocol/sdk'
If they differ, pin to the same version in your package.json and redeploy.
Check the initialize Request and protocolVersion
If you are building a custom client or debugging a third-party one, inspect the raw initialize payload. The correct structure per the current MCP specification requires:
jsonrpc:"2.0"method:"initialize"params.protocolVersion: a string matching a version the server supports (e.g.,"2024-11-05")params.capabilities: an object (can be empty{})params.clientInfo: an object withname(string) andversion(string)
Common structural mistakes that also produce -32602:
// Missing clientInfo — will produce Invalid params
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {}
}
}
// protocolVersion as a number instead of string
{
"params": {
"protocolVersion": 20241105,
"capabilities": {},
"clientInfo": { "name": "test", "version": "1.0" }
}
}
Both of these will produce -32602 with a message that may or may not say "Unsupported Protocol Version" — the message depends on how the server implementation validates params.
Client and Server Support Different MCP Protocol Versions
When one client works and another fails against the same server, the diagnostic path is straightforward:
- Identify the SDK version of the working client. That version's
protocolVersionstring is what the server accepts. - Identify the SDK version of the failing client. It's sending a different
protocolVersion. - Update the failing client's SDK to match or exceed the working client's version.
If updating the failing client is not immediately possible (e.g., it's a third-party tool you don't control), check whether the server can be configured to support additional protocol versions for backward compatibility. Some server implementations expose a setting for this; most do not.
Do not assume updating everything to latest is always safe. If you maintain the server and it is used by many clients you do not control, check whether newer SDK versions still accept the protocol versions older clients will send before upgrading the server.
Unsupported Protocol Version in Claude Code and Laravel Boost
Claude Code
Claude Code (Anthropic's CLI coding tool) uses MCP to connect to external servers. If you see -32602 with "Unsupported Protocol Version" while using Claude Code, the cause is almost always that the MCP server you have configured is running an SDK that sends or expects a protocol version Claude Code's MCP client does not support. The fix is to update the MCP server's SDK to a version that matches what Claude Code's bundled MCP client expects. Check the Claude Code release notes or GitHub issues for the current supported protocolVersion string if the SDK auto-detection is not resolving it.
Laravel Boost
Laravel Boost integrates MCP into Laravel applications. Developers have reported -32602 errors when the Laravel Boost package version and the MCP client version do not agree on protocolVersion. Verify the Laravel Boost package version with composer show and cross-reference with the package's changelog to confirm which MCP protocol version it implements. Update the package with composer update and re-test.
Note: Product-specific MCP integrations change frequently. Always verify current behavior against the official package repository and changelog rather than relying on third-party sources.
MCP Error -32602 Troubleshooting Table
| Symptom | Likely Cause | How to Verify | Fix |
|---|---|---|---|
| Error on every client | Server SDK outdated | Check server SDK version | Update server SDK |
| Error on one client, not another | Client SDK version mismatch | Compare SDK versions of both clients | Update failing client SDK |
| Error locally and remotely | Hardcoded protocolVersion | Search codebase and env vars | Remove hardcode |
| Error remotely only | Proxy rewriting body or mismatched deployment version | Bypass proxy test; compare lockfiles | Fix proxy config or align versions |
| Error message differs from "Unsupported Protocol Version" | Different invalid param (not protocolVersion) | Read the full error message and data field | Fix the specific invalid parameter |
| Error after SDK update | New SDK sends a version the server doesn't accept yet | Check server SDK version | Update server SDK too |
| Error in CI but not locally | Different package versions in CI environment | Compare package-lock.json or poetry.lock | Lock versions consistently |
data field shows empty supported versions list | Server initialization bug | Check server logs | File bug report or roll back server version |
How to Debug with MCP Inspector
MCP Inspector is the official debugging tool for MCP servers. It shows you the raw JSON-RPC traffic, which is exactly what you need to diagnose a protocol negotiation failure.
Install and run MCP Inspector:
npx @modelcontextprotocol/inspector
Connect it to your server (stdio or SSE transport). MCP Inspector will:
- Send a real
initializerequest to your server. - Display the full request payload — you can see the exact
protocolVersionbeing sent. - Display the full server response — you will see either the negotiated version in
resultor the -32602 error inerror. - If an error is returned, the
datafield (when present) shows which versions the server supports.
This tells you immediately whether the problem is the version string itself, a structural issue with the params, or something else entirely.
You can also use MCPForge's online MCP server tester to run a quick initialization check against a publicly accessible server endpoint without installing anything locally.
What to look for in the Inspector output:
params.protocolVersionin the outgoing request — is it the version you expect?error.data.supportedin the error response — does the server tell you which versions it accepts?result.protocolVersionin a successful response — confirms negotiation completed.
How to Confirm the Fix
After applying a fix, verify the entire initialization lifecycle works correctly:
- Initialize succeeds: The
initializeresponse containsresult.protocolVersion(noerrorfield). - Protocol version matches: The version in the response is the one both sides agreed on.
- Capabilities are exchanged:
result.capabilitiescontains the server's declared capabilities. - Initialized notification sent: The client sends the
notifications/initializednotification after receiving the initialize response. - Normal operations work: Tool calls (
tools/call), resource reads (resources/read), and prompt fetches succeed without errors.
If step 1 succeeds but later operations fail, you may have fixed the protocol version issue but have a different problem — likely a capability or authorization issue rather than a version one. See the MCP -32603 internal error guide if you see new errors after initialization succeeds.
How to Prevent MCP Protocol Version Errors
These practices eliminate this class of error before it reaches production:
Never hardcode protocolVersion. The official SDKs manage this automatically. Hardcoding it means every SDK upgrade becomes a potential breakage point.
Keep client and server SDKs synchronized. When you update one side, update the other at the same time. Add both to the same dependency update workflow.
Pin SDK versions in production lockfiles. Use package-lock.json, poetry.lock, or equivalent to ensure your CI and production environments run exactly the same SDK version as local development.
Add an initialization health check. In production deployments, run a lightweight smoke test after deployment that performs a full MCP initialize handshake and verifies the response before routing real traffic.
// Minimal initialization smoke test
async function verifyMCPConnection(transport: Transport): Promise<void> {
const client = new Client({ name: 'health-check', version: '1.0.0' });
await client.connect(transport);
// If connect() resolves without throwing, initialization succeeded
await client.close();
console.log('MCP initialization OK');
}
Test proxy configurations in staging. If your MCP server sits behind a reverse proxy, run a full initialize exchange through the proxy in staging before deploying to production. Body-rewriting proxy rules are easy to miss until they break JSON-RPC traffic.
Watch for SDK releases. The MCP protocol is actively evolving. Subscribe to the @modelcontextprotocol/sdk release notifications on GitHub so you know when a new protocolVersion is introduced and can plan coordinated upgrades.
For broader production deployment guidance, including transport configuration and monitoring, see the running MCP in production guide.
MCP Error -32602 at a Glance
| Field | Value |
|---|---|
| JSON-RPC error code | -32602 |
| Standard meaning | Invalid params |
| MCP context | Often signals bad or unsupported protocolVersion in initialize |
| Where it occurs | During MCP session initialization (can also occur on other calls) |
| Most common root cause | SDK version mismatch between client and server |
| Fastest fix | Update both client and server SDK to latest release |
| Verification tool | MCP Inspector (npx @modelcontextprotocol/inspector) |
If you are seeing a different error code entirely, the MCP -32601 Method Not Found guide and the MCP -32000 Connection Closed guide cover the next most common initialization and transport failures.
Want to analyze your API security?
Import your OpenAPI spec and generate a Security Report automatically.
Official Sources
- MCP transports specification - official
MCP-Protocol-VersionHTTP header behavior and unsupported-version response guidance. - MCP base protocol overview - official JSON-RPC request and error structure.
- JSON-RPC 2.0 specification - authoritative reference for
-32602 Invalid paramsand related JSON-RPC errors.