Saltar para o conteúdo principal
POST
/
public
/
api
/
v1
/
external-mcps
Create an External MCP server (auth + sync discovery)
curl --request POST \
  --url https://api.gennia.ai/public/api/v1/external-mcps \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "authHeaderName": "X-Api-Key",
  "authHeaders": [
    {}
  ],
  "authValue": "sk_live_abc123",
  "name": "GitHub MCP",
  "rejectIfNotConnected": true,
  "url": "https://mcp.example.com/sse"
}
'
{
  "authHeaderName": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "errorMessage": "<string>",
  "lastDiscoveredAt": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tools": [
    {}
  ],
  "updatedAt": "2023-11-07T05:31:56Z",
  "url": "<string>"
}

Autorizações

X-Api-Key
string
header
obrigatório

Corpo

application/json

Body for registering a new external MCP server in the workspace.

authType
enum<string>
obrigatório

Authentication scheme used to talk to the MCP server.

Opções disponíveis:
NONE,
API_KEY,
BEARER_TOKEN,
CUSTOM_HEADER,
OAUTH_AUTHORIZATION_CODE
authHeaderName
string

Optional legacy header name; for CUSTOM_HEADER prefer authHeaders.

Exemplo:

"X-Api-Key"

authHeaders
object[]

Required when authType = CUSTOM_HEADER. Each entry: {name, value}.

authValue
string

Required when authType = API_KEY or BEARER_TOKEN. The credential value.

Exemplo:

"sk_live_abc123"

name
string

Display name of the external MCP server.

Maximum string length: 255
Exemplo:

"GitHub MCP"

rejectIfNotConnected
boolean

When true, fail with 422 MCP_DISCOVERY_FAILED instead of persisting with status=ERROR.

Exemplo:

true

url
string

HTTPS URL of the external MCP server.

Maximum string length: 2048
Pattern: ^https://.+
Exemplo:

"https://mcp.example.com/sse"

Resposta

Created

Workspace-registered External MCP server. Auth values are NEVER returned.

authHeaderName
string

Present when authType=CUSTOM_HEADER with a single legacy header.

authType
enum<string>
Opções disponíveis:
NONE,
API_KEY,
BEARER_TOKEN,
CUSTOM_HEADER
createdAt
string<date-time>
errorMessage
string
lastDiscoveredAt
string<date-time>
name
string
publicId
string<uuid>
status
enum<string>
Opções disponíveis:
PENDING,
CONNECTED,
ERROR,
PENDING_AUTHORIZATION,
EXPIRED
tools
object[]

Tools discovered on the server. {id,name,description,enabled}

updatedAt
string<date-time>
url
string