class documentation
Client for standard MCP JSON-RPC requests over HTTP.
| Method | __init__ |
Initialize an MCP client from the configured endpoints. |
| Method | call |
Call a discovered tool on the selected MCP server. |
| Method | list |
Return configured servers without exposing their API keys. |
| Method | reset |
Reset the selected server and MCP session for a new agent run. |
| Method | select |
Initialize a server and return its public details and MCP tools. |
| Class Variable | __slots__ |
Undocumented |
| Property | enabled |
Return whether at least one MCP endpoint is configured. |
| Static Method | _append |
Undocumented |
| Static Method | _decode |
Undocumented |
| Static Method | _header |
Undocumented |
| Static Method | _normalize |
Undocumented |
| Static Method | _public |
Undocumented |
| Method | _find |
Undocumented |
| Method | _headers |
Undocumented |
| Method | _list |
Undocumented |
| Method | _request |
Undocumented |
| Instance Variable | _http |
Undocumented |
| Instance Variable | _next |
Undocumented |
| Instance Variable | _protocol |
Undocumented |
| Instance Variable | _selected |
Undocumented |
| Instance Variable | _servers |
Undocumented |
| Instance Variable | _session |
Undocumented |
Call a discovered tool on the selected MCP server.
| Parameters | |
serverstr | The selected server id. |
toolstr | The original MCP tool name. |
arguments:dict | Tool arguments from the model. |
| Returns | |
str | The JSON-encoded MCP tool result. |
Initialize a server and return its public details and MCP tools.
| Parameters | |
serverstr | The id of the configured server to select. |
| Returns | |
tuple[dict, list[dict]] | Public server details and raw MCP tool schemas. |
def _request(self, server:
dict, method: str, params: dict | None = None, include_id: bool = True) -> tuple[ dict | None, object]:
¶
Undocumented