Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions src/claude_code_sdk/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,32 @@


# 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
Expand Down