Skip to main content
MCP servers describe their tools with JSON schemas, which is what the tools field expects. So connecting Holo to one takes a single conversion function: list the server’s tools, pass them in, and send each call back to the server. This example uses the reference fetch server, which reads web pages as Markdown. Any other stdio server works the same way.
1

Install

The fetch server runs through uvx, which ships with uv.
2

Save the agent

mcp_agent.py
3

Run it

Output
Holo pages through the document on its own, using the raw and start_index arguments it found in the server’s tool schema.

How it works

  • Tool names come from the server. Holo sees fetch exactly as the server declares it, so the call can go straight back through session.call_tool. Add answer yourself: MCP servers do not provide it.
  • Results are text. MCP results are a list of content blocks. The loop keeps the text blocks and caps them at 8,000 characters.
  • Several servers. Open one ClientSession per server, merge their tool lists, and keep a map from tool name to session to route each call.
For remote servers, swap stdio_client for streamable_http_client from mcp.client.streamable_http. The rest of the loop stays as is.

Next steps

Hybrid agent

Mix screen and code tools in one loop.

Function calling

The format these tools use.