Attach or update an agent MCP server
Attach a connector to an agent, or update its settings if it is already attached (upsert). Only the settings you send change; null clears a setting.
PUT
cURL
Which settings can I send?
Which settings can I send?
server_id comes from your MCP catalog (GET /mcp/servers); custom MCP servers you added in Settings are listed there too, keyed by their secret. Identity is taken from the path, so the body carries settings only: which account to use, approval mode, per-tool approvals and tool restrictions.Attach may succeed before OAuth is completed; auth_status reports the catalog’s authentication state.Authorizations
A personal API key or an OAuth 2.0 access token. Personal API keys also require the x-auth-key header with your user ID.
Path Parameters
Body
application/json
Connector settings for PUT /agents/{agent_id}/mcp-servers/{server_id}. Identity comes from the path; unknown keys are dropped.
Response
The attached (or updated) MCP server.