# MCP request timeout after tool execution

If my MCP client times out, has the tool already executed?

At the 750 ms deadline the server had completed one lookup. An explicit retry of the same lookup increased the server count to two.

Tested at 2026-11-10T01:50:19.685Z

## Environment

- sdk: 1.30.0

- zod: 4.5.4

- node: v24.22.0

- platform: darwin/arm64

- transport: Streamable HTTP (stateless JSON response, 127.0.0.1)

## Observations

- Client deadline: 750 ms

- SDK error code: -32001

- Reads at timeout / after manual retry: 1 / 2

## Interpretation

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.

## Scope

The local fixture delayed a reply after a read-only lookup. The client explicitly repeated it. This run covers a client deadline; proxy disconnections, automatic retries and desktop clients require separate tests.

## Reproduce

```sh
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-execution
```

## Sources

- [MCP specification · Cancellation](https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/cancellation)

[Run evidence](https://www.niubiagent.com/lab/timeout-after-tool-execution.json)

[Reproduction script](https://www.niubiagent.com/lab/reproduce.mjs)

[Canonical report](https://www.niubiagent.com/lab/timeout-after-tool-execution)
