Connect your own MCP server
Register a remote MCP server so your agents can call its tools — via the console or REST.
list_mcp_serverslist_toolsupdate_agentBring your own tools: register a remote MCP server and its tools become available to attach to your agents. There is no "create MCP server" tool on purpose — registering a server means trusting it to run against your tenant, so it is a deliberate action in the console (or a REST call), not something an agent does on its own.
1. Register the server
In the console: Tools / MCP → Add MCP server — give it a name, choose the transport (Streamable HTTP or SSE), and the URL plus any auth headers.
Or by REST, with your tenant key ($BASE = https://api.agent4.io/v1):
curl -X POST $BASE/mcp-servers -H "X-API-Key: $KEY" -H 'Content-Type: application/json' \
-d '{"name":"my-tools","transport":"streamable_http",
"config":{"url":"https://tools.example.com/mcp","headers":{"Authorization":"Bearer …"}}}'Only remote transports are accepted. stdio (local commands) is rejected — the server runs on the
platform, not your machine, so a local command would be both useless to you and a code-execution risk.
2. See its tools
list_mcp_servers() # the MCP servers registered on your tenant
list_tools() # every tool you can attach to an agent, including the ones from your servers3. Attach the tools to an agent
update_agent(name="Support", tools=["web_search", "…"]) # use tool names exactly as list_tools() reports themThe agent can now call those tools during a conversation. Keep the set focused — a handful of relevant tools beats a big pile (see Design principles).