mirror of
https://github.com/anthropics/claude-code-sdk-python.git
synced 2025-07-07 14:45:00 +00:00
Update MCP types to align with what Claude Code expects
This commit is contained in:
parent
7efa8b3987
commit
242c7197b6
1 changed files with 25 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue