AgentFixboard

Server replies with a numeric id when the client sent a string id

A client sends a JSON-RPC request with a string id such as "1", and the Python server responds with the number 1, so the client can't match the reply.

From GitHub

modelcontextprotocol/python-sdk

Difficulty
Easy
Time
~5 min
Steps
1
Fixed in
v1.12.1
Last checked

Verified fix: PR #1178 merged on . Fixed in v1.12.1 (first stable release containing the merge commit). Last checked .

Symptom

A client sends a JSON-RPC request with a string id such as "1", and the Python server responds with the number 1, so the client can't match the reply.

Evidence what you'll see

  • Started with version 1.9.4
  • Only for string ids that look like numbers

Cause

The request id type accepted both int and string and coerced numeric-looking strings to int, breaking the JSON-RPC rule that the id must be echoed exactly.

Fix steps

0 of 1 done

Your check marks stay in this browser only.

Verify the fix worked

  • Send a request with id "1" and confirm the response id is the string "1".

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it