Documentation Index
Fetch the complete documentation index at: https://docs.svantic.com/llms.txt
Use this file to discover all available pages before exploring further.
McpBridge
What it is
McpBridge is the SDK’s client for a Model Context Protocol (MCP) server. It spawns the server as a child process, performs the MCP handshake, discovers the tools it advertises, and lets you invoke them by name.
The normal path for agents is agent.register_mcp() — it wraps McpBridge and turns every MCP tool into an A2A capability automatically. You import McpBridge yourself only when you want to use MCP tools without publishing them.
When to use it
Reach forMcpBridge directly when:
- You’re writing a script or utility that needs to call a single MCP tool once.
- You want to inspect an MCP server’s tool list without registering it with Svantic.
- You’re building custom glue (e.g. forwarding MCP results to somewhere other than an agent capability).
agent.register_mcp().
Functional usage
Types
McpServerSpawnConfig
McpToolDescriptor
list_tools(). input_schema is the raw JSON Schema the MCP server advertised.
Constructor
server_name is a logical label (e.g. 'chrome-devtools'). Used for error messages and telemetry.
Methods
connect(config)
connect() on an already-connected bridge is a no-op.
list_tools()
Return the set of tools the MCP server advertised. Throws when not connected.
call_tool(tool_name, args)
Invoke a tool by name. Throws when not connected, when the tool rejects, or when the MCP server returns an error result.
close()
Shut down the child process and release resources. Idempotent.
Properties
| Property | Type | Description |
|---|---|---|
connected | boolean | true while the child process is alive. |
server_name | string | The label passed to the constructor. |
spawn_config | McpServerSpawnConfig | null | The config that was passed to connect(), or null before connect. |
