toolery.mcp_server

Expose a toolery catalog’s search as an MCP server — one search tool for agents.

Optional — needs pip install 'toolery[mcp]' (py2mcp). Instead of handing an agent a schema per asset, this gives it a single search tool over your whole catalog: the “one search tool, not fifty schemas” idea made concrete. Point any MCP host at the toolery serve command (see toolery.cli).

toolery.mcp_server.make_server(catalog: Catalog, *, name: str = 'toolery')[source]

Build (but don’t run) an MCP server exposing catalog’s search as one tool.

toolery.mcp_server.search_tool(catalog: Catalog)[source]

Return a search(query, limit=10) function (an MCP-shaped tool) bound to catalog.

Its signature and docstring become the MCP tool schema and description.

toolery.mcp_server.serve(catalog: Catalog, *, name: str = 'toolery', transport: str = 'stdio') None[source]

Serve catalog’s search as an MCP server (blocks until the host disconnects).