-
Notifications
You must be signed in to change notification settings - Fork 503
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
The bundled Claude CLI in the manylinux_2_17_x86_64 wheel silently exits when MCP servers are configured via ClaudeAgentOptions.mcp_servers.
Environment
claude-agent-sdk: 0.1.18- Platform:
linux/amd64(Cloud Run, Docker) - Python: 3.11
Behavior
- Agent initializes successfully, MCP server shows
status: connected - First
SystemMessage(init)received with all tools registered - Agent immediately exits with
tool_use_count: 0,text_output: '' - No error messages logged
Reproduction
options = ClaudeAgentOptions(
mcp_servers={"my-server": {...}}, # Any MCP config
# other options...
)
async with ClaudeSDKClient(options=options) as client:
await client.query("hello")
async for msg in client.receive_messages():
print(msg) # Only receives SystemMessage(init), then exitsWorkaround
Use the npm-installed CLI instead of bundled:
options = ClaudeAgentOptions(
cli_path="/usr/local/bin/claude", # Force global CLI
mcp_servers={...},
)Notes
- Works fine on
macosx_11_0_arm64(Mac ARM) - Works fine on
linux/amd64whenmcp_servers=None - Only fails on
linux/amd64+ MCP servers configured
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working