Get an API key
McpClient

createMcpTools()

createMcpTools(servers, { clients? }) → object

Turns connected servers into engine-shaped tools — the same shape as customTools, so they are permissioned and counted like everything else.

engine shapecategory from the serverclients are reused
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

import { createMcpTools } from "iagenify";

const servers = await api.mcp.forAgent(["example"]);
const tools = createMcpTools(servers);
// { example_search_docs: { description, parameters, category, run } }
from iagenify import create_mcp_tools

servers = api.mcp.for_agent(["example"])
tools = create_mcp_tools(servers)
# {"example_search_docs": {"description", "parameters", "category", "run"}}

The shape

FieldFrom
descriptionThe server's tool description.
parametersIts schema, sanitised.
categoryThe server's, not the tool's.
runCalls the server, carrying any header annotations.

The category is the server's

The protocol's read-only hint is not used

It is declared by the server about itself, which is not proof. A third-party tool running without a permission in auto mode would be the worst possible regression here, so the category comes from the connection — exec by default.

clients reuses connections

Pass a map and the clients built for each server are kept in it, so a run calling several tools of one server shakes hands once.

The engine does this itself

agents.create({ mcp }) calls forAgent() and then this, every run. Use it directly only when you are assembling a tool catalogue of your own.