Update MCP server

Update an existing MCP server for an assistant.

Request

PATCH https://superinterface.ai/api/cloud/assistants/{assistantId}/mcp-servers/{mcpServerId}

Authentication

Include your private API key in the request headers:
Authorization: Bearer YOUR_PRIVATE_API_KEY

Path Parameters

ParameterTypeDescription
assistantIdstringThe ID of the assistant
mcpServerIdstringThe ID of the MCP server

Request Body

ParameterTypeRequiredDescription
transportTypeTransportTypeYesTransport type (SSE or HTTP)
sseTransportobjectConditional{ url: string, headers: string } when transportType is SSE; headers must be a JSON string
httpTransportobjectConditional{ url: string, headers: string } when transportType is HTTP; headers must be a JSON string

Example request

curl -X PATCH "https://superinterface.ai/api/cloud/assistants/00cfe680-fee5-49b9-b386-6a7097eb8497/mcp-servers/10cfe680-fee5-49b9-b386-6a7097eb8497" \ -H "Authorization: Bearer YOUR_PRIVATE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "transportType": "HTTP", "httpTransport": { "url": "https://example.com/http", "headers": "{\"Authorization\":\"Bearer token\"}" } }'

Response

ParameterTypeDescription
mcpServerMcpServerUpdated MCP server

Example response

{ "mcpServer": { "id": "10cfe680-fee5-49b9-b386-6a7097eb8497", "transportType": "HTTP", "sseTransport": null, "httpTransport": { "id": "20cfe680-fee5-49b9-b386-6a7097eb8497", "url": "https://example.com/http", "headers": { "Authorization": "Bearer token" }, "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" }, "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" } }

Errors

The endpoint may return the following errors:

401 Unauthorized

This error occurs if the API key is invalid or missing.
{ "error": "Unauthorized", "message": "Invalid or missing API key" }