Local SDK experiment
MCP request timeout after tool execution
At the 750 ms deadline the server had completed one lookup. An explicit retry of the same lookup increased the server count to two.
Observations
If my MCP client times out, has the tool already executed?
- Client deadline
- 750 ms
- SDK error code
- -32001
- Reads at timeout / after manual retry
- 1 / 2
Interpreting the result
Before retrying an operation with side effects, check its recorded outcome or reuse a server-supported idempotency key. A client deadline alone leaves execution status uncertain.
Reproduce this run
Run the commands in an empty directory. Download the script first to inspect the requests and assertions.
mkdir -p niubiagent-mcp-lab && cd niubiagent-mcp-lab
npm install --prefix . --ignore-scripts --no-audit --no-fund @modelcontextprotocol/sdk@1.30.0 zod@4.5.4
curl -fsSLo reproduce.mjs https://www.niubiagent.com/lab/reproduce.mjs
node reproduce.mjs timeout-after-tool-executionDownload reproduction script ↓