This is not “Mirobody as an MCP server.” It’s the reverse: you bring external MCP tools into the agent’s reasoning. The platform executes the calls server-side — unlike client function tools, there is no handoff back to you.
Attach a server
The OpenAI-native Responsestools entry, on the Agent API:
Mix freely with your
type: "function" client tools in the same tools array. Limits: ≤ 8 servers per request, ≤ 64 tools total.
What you get back
MCP calls are server-side tool steps — they appear in the response’s top-leveltool_steps (name mcp__{label}__{tool}, with arguments and result) and stream as response.mirobody_tool_call events. The output array stays pure OpenAI item types; there is no function_call handoff for MCP tools.
Errors
In the web app
End users of the Mirobody web app can attach their own MCP servers in Settings → MCP — the chat agent picks them up automatically each turn. A misconfigured or down server is skipped there (chat never fails because of it); on the API surface the same problem is an explicit400, because you asked for that server in this request.
When to prefer client function tools
If your tool needs to run inside your own process (private network, local state, human confirmation), use client function tools instead: the model hands off withfunction_call, you execute, and you resume the run — the openai-agents SDK automates that loop.