Expand description
MCP (Model Context Protocol) client — stdio and HTTP+SSE transport, JSON-RPC 2.0.
Supports the bounded subset needed for tool proxy:
initialize/initializedhandshaketools/listto discover toolstools/callto invoke them
Also supports:
resources/listandresources/readprompts/listandprompts/get
Structs§
- Json
RpcError - A JSON-RPC 2.0 error object.
- Json
RpcRequest - A JSON-RPC 2.0 request.
- Json
RpcResponse - A JSON-RPC 2.0 response.
- McpClient
- An MCP client owns a transport and manages JSON-RPC communication.
- McpPrompt
- A prompt template exposed by an MCP server.
- McpPrompt
Argument - An argument to an MCP prompt template.
- McpPrompt
Message - A message in an MCP prompt response.
- McpResource
- A resource exposed by an MCP server.
- McpResource
Content - Content returned from reading an MCP resource.
- McpServer
- Configuration for a single MCP server.
- McpServer
Config - Configuration for a single MCP server in the Claude Code
.mcp.jsonformat. - McpTool
- A tool that wraps an MCP server tool. Registered with a namespaced name
mcp__<server_name>__<tool_name>. - McpTool
Spec - A tool spec as returned by the MCP server’s
tools/list. - Server
Capabilities - Capabilities advertised by an MCP server during the initialize handshake.
Functions§
- discover_
mcp_ servers - Discover MCP server configurations from the workspace.
- dispatch_
request - Dispatch a JSON-RPC request to the appropriate handler.
- load_
mcp_ config - Load MCP server configurations from a JSON file. Expected format: