## The problem

Reported in AWS Strands Agents: [BUG] - STDIO MCP tool not working.

## The fix

[zxkane (reporter)]: The client session is not running error means you called the agent outside the MCPClient context manager. Put everything inside the with block: with stdio_mcp_client: tools = client.list_tools_sync(); agent = Agent(tools=tools); agent("..."). The docs were unclear on this and the error message has since been improved.