Skip to content

Commit c93d97e

Browse files
committed
docs: clarify strict_mcp_config docstring
--strict-mcp-config does not control error handling for invalid MCP configs; it restricts the CLI to only use MCP servers passed via mcp_servers/--mcp-config, ignoring filesystem and settings-based MCP configurations (.mcp.json, user/global settings, plugins). Update the docstring to describe the actual behavior.
1 parent ce9d2eb commit c93d97e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/claude_agent_sdk/types.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,8 +1509,11 @@ class ClaudeAgentOptions:
15091509
"""
15101510

15111511
strict_mcp_config: bool = False
1512-
"""When ``True``, the CLI raises an error on invalid MCP server configuration
1513-
instead of warning to stderr. Matches the TypeScript SDK's ``strictMcpConfig``."""
1512+
"""When ``True``, only use MCP servers passed via :attr:`mcp_servers`,
1513+
ignoring all other MCP configurations the CLI would otherwise load (e.g.
1514+
project ``.mcp.json``, user/global settings, plugin-provided servers).
1515+
Maps to the CLI's ``--strict-mcp-config`` flag and matches the TypeScript
1516+
SDK's ``strictMcpConfig`` option."""
15141517

15151518
permission_mode: PermissionMode | None = None
15161519
"""Permission mode for the session.

0 commit comments

Comments
 (0)