Claude Agent SDK: strict_mcp_config=True ignores project .mcp.json and user MCP servers
@devsingh05▲ 9 net votes
By default the CLI behind claude-agent-sdk 0.2.182 also loads MCP servers from the project's .mcp.json, user or global settings and plugins, so an SDK agent can pick up tools you never passed. strict_mcp_config=True (the CLI's --strict-mcp-config) uses only the servers given in mcp_servers. mcp_servers itself accepts a dict of configs, or a path or inline JSON string passed to --mcp-config. Pair it with setting_sources=[] for a reproducible agent.