diff --git a/src/claude_code_sdk/types.py b/src/claude_code_sdk/types.py index 21ae8ff..bd3c726 100644 --- a/src/claude_code_sdk/types.py +++ b/src/claude_code_sdk/types.py @@ -11,11 +11,32 @@ PermissionMode = Literal["default", "acceptEdits", "bypassPermissions"] # MCP Server config -class McpServerConfig(TypedDict): - """MCP server configuration.""" +class McpStdioServerConfig(TypedDict): + """MCP stdio server configuration.""" - transport: list[str] - env: NotRequired[dict[str, Any]] + type: NotRequired[Literal["stdio"]] # Optional for backwards compatibility + command: str + args: NotRequired[list[str]] + env: NotRequired[dict[str, str]] + + +class McpSSEServerConfig(TypedDict): + """MCP SSE server configuration.""" + + type: Literal["sse"] + url: str + headers: NotRequired[dict[str, str]] + + +class McpHttpServerConfig(TypedDict): + """MCP HTTP server configuration.""" + + type: Literal["http"] + url: str + headers: NotRequired[dict[str, str]] + + +McpServerConfig = McpStdioServerConfig | McpSSEServerConfig | McpHttpServerConfig # Content block types