Skip to main content
The chat agent ships with built-in tools over the Subject’s health data (search_health_indicators, fetch_health_data, read_file, eval). You can extend it with your own remote MCP tools by passing mcp_servers on a chat request.
This is not “Mirobody as an MCP server.” It’s the reverse: you bring external MCP tools into the agent’s data-gathering, where they run alongside the built-in tools. The platform proxies the calls.

mcp_servers

FieldTypeDescription
namestringLabel for the server.
urlstringRemote MCP endpoint.
access_tokenstringOptional bearer token forwarded to your server.

Example

curl https://mcp.thetahealth.cn/v1/chat/completions \
  -H "Authorization: Bearer $MIROBODY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "model": "mirobody-expert",
        "messages": [{"role": "user", "content": "Cross-check my labs against our formulary."}],
        "user": "alice",
        "mcp_servers": [
          {"name": "formulary", "url": "https://tools.example.com/mcp", "access_token": "..."}
        ]
      }'
The agent decides when to call your tools while gathering data; their results feed the same tool_steps channel as the built-ins. See Chat for the response shape.