Skip to Content
MCP servers

Register an MCP server

Permissionmcp-servers:createRetriesIdempotency-Key requiredAuthentication
POST
/mcp-servers

Registers a public HTTPS Streamable HTTP MCP endpoint. Credentials are referenced by stable secret names and are never stored inline. Tool discovery is an explicit follow-up introspection operation using MCP 2025-11-25 with negotiated 2025-06-18 compatibility.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Header Parameters

Idempotency-Key*string

Required. Reuse the same key to retry this write safely. Retries and idempotency.

Match^[A-Za-z0-9!#$%&'*+.^_`|~-]+$
Length1 <= length <= 255

Request Body

application/json
  1. body

auth_mode=none forbids every credential field; bearer requires auth_secret_ref; oauth2 uses a pre-registered client-credentials grant, requires both OAuth credential refs, and forbids auth_secret_ref. Every OAuth token request includes an RFC 8707 resource indicator. Empty optional strings normalize to null.

slug*string

Immutable public identifier.

Match^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$
Length2 <= length <= 48
name*string
Length1 <= length <= 200
description?|
Lengthlength <= 2000
url*string

Public HTTPS Streamable HTTP MCP endpoint. Userinfo, fragments, private DNS/IP targets, and redirects to unsafe targets are rejected.

Match^https://
Formaturi
Lengthlength <= 4096
auth_mode?string
Default"none"
Value in"none""bearer""oauth2"
auth_secret_ref?|
Match^[A-Za-z_][A-Za-z0-9_]{1,63}$
tool_allowlist?array<>

Empty means all successfully discovered tools are allowed, subject to hash enforcement.

Itemsitems <= 500
Default[]
timeout_ms?integer
Range500 <= value <= 60000
Default10000
enforce_hashes?boolean
Defaulttrue
oauth_token_url?|

Public HTTPS token endpoint. Null enables MCP 2025-11-25 endpoint-specific/root protected-resource discovery followed by RFC 8414 or OpenID Connect discovery.

Match^https://
Formaturi
Lengthlength <= 4096
oauth_client_id_ref?|
Match^[A-Za-z_][A-Za-z0-9_]{1,63}$
oauth_client_secret_ref?|
Match^[A-Za-z_][A-Za-z0-9_]{1,63}$
oauth_scope?|

Space-separated OAuth scope tokens; at most 100 unique printable ASCII tokens.

Lengthlength <= 2000
oauth_audience?|

RFC 8707 resource indicator sent in every token request. When null, the discovered canonical resource or configured MCP URL is used automatically.

Match^https://
Formaturi
Lengthlength <= 4096

Response Body

MCP server registered. The complete safe configuration is returned.

application/json
  1. response
id*string
Formatuuid
slug*string
name*string
description*string|null
url*string
Formaturi
auth_mode*MCPAuthMode
Value in"none""bearer""oauth2"
auth_secret_ref*string|null
tool_allowlist*array<>
Itemsitems <= 500
timeout_ms*integer
enforce_hashes*boolean
pinned_tool_hashes*

Map of remote MCP tool name to SHA-256 of the sanitized description and input schema.

observed_tool_hashes*

Map of remote MCP tool name to SHA-256 of the sanitized description and input schema.

approved_tools*array<>
Itemsitems <= 500
observed_tools*array<>
Itemsitems <= 500
attachment_status*MCPAttachmentStatus

Machine-readable readiness of this registration for agent attachment.

Value in"not_introspected""hash_enforcement_disabled""approved_catalog_invalid""ready_with_drift""ready""archived"
oauth_token_url*|
Formaturi
oauth_client_id_ref*string|null
oauth_client_secret_ref*string|null
oauth_scope*string|null
oauth_audience*|

Explicit resource override, or null when the runtime derives it from discovery/the MCP URL.

Formaturi
last_introspected_at*|
Formatdate-time
last_introspection_error*|

Sanitized machine reason for the last failed introspection; never contains an upstream body or secret.

archived_at*|
Formatdate-time
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X POST 'https://api.kejue.co/v1/mcp-servers' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "slug": "string",  "name": "string",  "url": "http://example.com"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "slug": "string",  "name": "string",  "description": "string",  "url": "http://example.com",  "auth_mode": "none",  "auth_secret_ref": "string",  "tool_allowlist": [    "string"  ],  "timeout_ms": 0,  "enforce_hashes": true,  "pinned_tool_hashes": {    "property1": "string",    "property2": "string"  },  "observed_tool_hashes": {    "property1": "string",    "property2": "string"  },  "approved_tools": [    {      "name": "string",      "description": "string",      "input_schema": {},      "hash": "string"    }  ],  "observed_tools": [    {      "name": "string",      "description": "string",      "input_schema": {},      "hash": "string"    }  ],  "attachment_status": "not_introspected",  "oauth_token_url": "http://example.com",  "oauth_client_id_ref": "string",  "oauth_client_secret_ref": "string",  "oauth_scope": "string",  "oauth_audience": "http://example.com",  "last_introspected_at": "2019-08-24T14:15:22Z",  "last_introspection_error": "string",  "archived_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}