---
title: "MCP Servers"
description: "REST endpoints for mcp servers. Bearer-auth required."
section: "API"
group: "REST"
order: 45
---

## POST /api/mcp-servers

Create MCP server

**Request body**

```json
{
  "workspaceId": "string",
  "name": "string",
  "url": "string",
  "authType?": "none | api_key | oauth",
  "apiKey?": "string",
  "oauthClientId?": "string",
  "oauthClientSecret?": "string",
  "oauthTokenEndpoint?": "string",
  "oauthAuthorizationEndpoint?": "string",
  "oauthScopes?": "string",
  "headers?": {},
  "connectorId?": "string",
  "connectorConfig?": {}
}
```

**Response**

```json
{
  "id": "string",
  "workspaceId": "string",
  "name": "string",
  "url": "string",
  "authType": "none | api_key | oauth",
  "oauthClientId": "string",
  "oauthTokenEndpoint": "string",
  "oauthAuthorizationEndpoint": "string",
  "oauthScopes": "string",
  "oauthExpiresAt": "string",
  "headers?": "any",
  "connectorId": "string",
  "connectorConfig?": "any",
  "connectorStatus": "connected | disconnected | error | ",
  "createdBy": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
```

## PATCH /api/mcp-servers/{id}

Update MCP server

**Path parameters**

- `id` (required): The MCP server's prefixed ID (e.g. `mcp_...`).

**Request body**

```json
{
  "name?": "string",
  "url?": "string",
  "authType?": "none | api_key | oauth",
  "apiKey?": "string",
  "oauthClientId?": "string",
  "oauthClientSecret?": "string",
  "oauthTokenEndpoint?": "string",
  "oauthAuthorizationEndpoint?": "string",
  "oauthScopes?": "string",
  "headers?": {},
  "connectorId?": "string",
  "connectorConfig?": {}
}
```

**Response**

```json
{
  "id": "string",
  "workspaceId": "string",
  "name": "string",
  "url": "string",
  "authType": "none | api_key | oauth",
  "oauthClientId": "string",
  "oauthTokenEndpoint": "string",
  "oauthAuthorizationEndpoint": "string",
  "oauthScopes": "string",
  "oauthExpiresAt": "string",
  "headers?": "any",
  "connectorId": "string",
  "connectorConfig?": "any",
  "connectorStatus": "connected | disconnected | error | ",
  "createdBy": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
```
