[DOCS] Missing strict_mcp_config Parameter in Python SDK ClaudeAgentOptions

Resolved 💬 3 comments Opened Jan 24, 2026 by coygeek Closed Feb 28, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://platform.claude.com/docs/en/agent-sdk/python

Section/Topic

The ClaudeAgentOptions dataclass definition (lines 455-488) and the corresponding properties table (lines 490-526).

Current Documentation

CLI Reference documents the flag:

| `--strict-mcp-config` | Only use MCP servers from `--mcp-config`, ignoring all other MCP configurations | `claude --strict-mcp-config --mcp-config ./mcp.json` |

TypeScript SDK documents the option:

| `strictMcpConfig` | `boolean` | `false` | Enforce strict MCP validation |

Python SDK ClaudeAgentOptions:
The strict_mcp_config parameter is absent from both the dataclass definition and the properties table.

What's Wrong or Missing?

The Python SDK documentation is missing the strict_mcp_config parameter that exists in both:

  1. The CLI (--strict-mcp-config)
  2. The TypeScript SDK (strictMcpConfig)

This creates a feature gap where Python SDK users cannot configure strict MCP validation through the documented API, even though the underlying CLI supports it.

Following Python naming conventions, the parameter should be strict_mcp_config (snake_case).

Suggested Improvement

Add the parameter to the ClaudeAgentOptions dataclass:

@dataclass
class ClaudeAgentOptions:
    # ... existing fields ...
    strict_mcp_config: bool = False  # Add this field

Add to the properties table:

| Property | Type | Default | Description |
|----------|------|---------|-------------|
| strict_mcp_config | bool | False | When True, only use MCP servers from the specified mcp_servers configuration, ignoring user/project/local MCP settings |

Impact

Medium - Makes feature difficult to understand

Additional Context

  • Mirror locations:
  • platform.claude.com/docs/en/agent-sdk/python.md (lines 455-488, 490-526)
  • platform.claude.com/docs/en/agent-sdk/typescript.md (line 130)
  • code.claude.com/docs/en/cli-reference.md (line 68)
  • This may be a documentation gap rather than a feature gap - the Python SDK may already support this via extra_args passthrough
  • If the parameter isn't actually supported in Python SDK, this should be filed as a feature request instead

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗