Agent MCP
Every agent is reachable as an MCP server, so an MCP client (or another agent) can connect to it and call it as a tool. The endpoint speaks JSON-RPC over the MCP Streamable HTTP transport.
Requests require an Authorization: Bearer YOUR_API_KEY header.
Unlike the rest of this reference, the agent-MCP endpoint lives under the
/api/v1 segment — not v2. Use the URL below exactly. It may not be
enabled on every deployment; if you get a 404, confirm it's available.
This endpoint implements the Model Context Protocol. Point any MCP-compatible client at the URL below with your API key as a bearer token, and it can discover and invoke the agent.
Endpoint
https://{your-deployment-host}/tenants/{tenant-id}/api/v1/agent-mcp/{aid}/mcp/Where {aid} is the agent ID.
Send messages
POST /agent-mcp/{aid}/mcp/
Sends one or more JSON-RPC messages to the agent's MCP server. Set Content-Type: application/json and Accept: application/json, text/event-stream.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| aid | path | string | Yes | Agent ID. |
Responses
- 200 — one or more JSON-RPC responses (returned directly, or as an SSE stream when the client accepts
text/event-stream). - 202 — accepted, with no body, when the input contains only notifications.
Request
curl -X POST 'https://{your-deployment-host}/tenants/{tenant-id}/api/v1/agent-mcp/{aid}/mcp/' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }'Open a stream
GET /agent-mcp/{aid}/mcp/
Opens a Server-Sent Events stream for server-initiated JSON-RPC requests and notifications, per the MCP Streamable HTTP transport.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| aid | path | string | Yes | Agent ID. |
Response — 200, an SSE stream of JSON-RPC requests/notifications from the server.