claude-agent-sdk-python icon indicating copy to clipboard operation
claude-agent-sdk-python copied to clipboard

Configuration to prevent parallel MCP server usage

Open abhijeethp opened this issue 3 months ago • 4 comments

Is there a configuration available to prevent parallel usage of MCP server tools? Right now claude code used via the agent SDK in python can trigger multiple tool calls with the same tool concurrently.

abhijeethp avatar Oct 13 '25 15:10 abhijeethp

This should only happen if a tool call is marked as read-only via annotation: https://modelcontextprotocol.io/legacy/concepts/tools#tool-annotations. Are you seeing otherwise?

ashwin-ant avatar Oct 14 '25 16:10 ashwin-ant

Yes, i have not defined read only annotations. my tool definition is simple with no annotations defined at all.

@mcp.tool()
def write(name: str, email: str):
....

And inspecting the code by default the read only tool annotation should be false:

abhijeethp avatar Oct 14 '25 19:10 abhijeethp

Hey @ashwin-ant & team, just bumping this ^

abhijeethp avatar Oct 24 '25 18:10 abhijeethp

I've seen multiple MCP tool calls for the same tool "triggered" concurrently, but it seems like they're not actually executing concurrently? Is this expected?

Finndersen avatar Nov 04 '25 11:11 Finndersen