v1
latestOpenAPI 3.0.02026-07-26492143.5 KBAgents
Attach or update an agent MCP server
Attach an MCP server (connector) to an agent, or update its configuration if it's already attached (upsert).
The server_id is validated against the caller's MCP catalog. Catalog identity fields (type, server_id, secret_id, mcp_server_url) always come from the catalog and cannot be spoofed via the request body — the body carries only free-form connector configuration (e.g. approval mode, tool restrictions); any identity keys in it are ignored.
Attach may succeed before OAuth is completed; auth_status reflects the catalog's authentication state.
put/agents/{agent_id}/mcp-servers/{server_id}
Path parameters
agent_idstring required
ID of the agent.
server_idstring required
ID of the MCP server from the caller's catalog.
Request body
object required
Free-form connector configuration. Identity keys are catalog-derived and ignored.
Response
The attached (or updated) MCP server.
Example response
{
"agent_id": "abc123DEFghiJKL",
"created": true,
"auth_status": "authenticated"
}