Add an MCP server
Add an MCP server that your assistants can use during a call. Authenticate with the headers the server expects, such as an API key or a bearer token you obtained from its provider; the platform stores them encrypted and sends them with every request. Then attach the server to an assistant with a tool of type mcp in llm_config.tools.
The URL must use https:// and resolve to a public address.
Authorization
BearerAuth API key authentication. Get your key from the dashboard.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/mcp-servers" \ -H "Content-Type: application/json" \ -d '{ "name": "Mailbox", "url": "https://mcp.example.com/mcp" }'{
"mcp_server": {
"id": "2f1c9a7e-4b3d-4e8a-9c21-6d5f0b7a8e13",
"name": "Mailbox",
"url": "https://mcp.example.com/mcp",
"transport": "streamable_http",
"header_names": [
"Authorization"
],
"timeout_seconds": 20,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
}{
"error": "Invalid API key",
"message": "string"
}{
"error": "Invalid API key",
"message": "string"
}{
"error": "Invalid API key",
"message": "string"
}Get an MCP server GET
Retrieve one MCP server. Header values are never returned; `header_names` shows which are set.
Update an MCP server PATCH
Change an MCP server. Only the fields you send are changed. `headers` replaces all stored headers: leave it out to keep them, send `{}` to remove them. Use this to renew a token that expires. When `url` points to a different host (scheme, host or port) than before, send `headers` in the same request, `{}` if the new host needs none: stored headers never go to a new host, and without them the request is refused with 400. The change applies from the next call; calls in progress keep the connection they opened.