Skip to Content
MCP servers

Update an MCP server

Permissionmcp-servers:updateAuthentication
PATCH
/mcp-servers/{id}

Applies a partial update to the resulting configuration. Changing connection or authentication fields clears observed introspection state but preserves approved pins, so unreviewed tools remain blocked. Changing auth_mode automatically clears fields belonging to the previous mode.

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

Path Parameters

id*string
Formatuuid

Header Parameters

If-Match?string

Optional strong ETag (or *) from a prior response. A stale tag returns 412 without changing the resource.

Request Body

application/json
  1. body

Partial replacement fields. The complete resulting configuration must satisfy the same auth and safety invariants as creation. Slug is not patchable.

Properties1 <= properties
name?string
Length1 <= length <= 200
description?|
Lengthlength <= 2000
url?string
Match^https://
Formaturi
Lengthlength <= 4096
auth_mode?MCPAuthMode
Value in"none""bearer""oauth2"
auth_secret_ref?|
Match^[A-Za-z_][A-Za-z0-9_]{1,63}$
tool_allowlist?array<>
Itemsitems <= 500
timeout_ms?integer
Range500 <= value <= 60000
enforce_hashes?boolean
oauth_token_url?|
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?|
Lengthlength <= 2000
oauth_audience?|

Null restores automatic RFC 8707 resource derivation.

Match^https://
Formaturi
Lengthlength <= 4096

Response Body

Updated configuration, or the unchanged configuration for a semantic no-op.

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 PATCH 'https://api.kejue.co/v1/mcp-servers/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
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"}