Skip to navigation

Connect an MCP server

Save a server. Attach it to agents with POST /v1/agents/{id}/mcp-servers.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
urlstringRequired<=2000 characters
namestringRequired1-255 characters
headersmap from strings to stringsOptional

e.g. {Authorization: Bearer …}

transportstring or nullOptionalDefaults to auto

auto, sse or streamable_http

allowed_toolslist of strings or nullOptional

Only these of its tools; all when left out

Response

Successful Response

Errors

422
Unprocessable Entity Error