v1

latestOpenAPI 3.1.0Apache 2.02026-07-264001921002.3 KB
MCP

Edit MCP client

Updates an existing MCP client's configuration. Unlike client creation, tool_pricing can be included to set per-tool execution costs since tools are already fetched. Optionally provide vk_configs to manage which virtual keys have access to this MCP server and with which tools. When provided, this fully replaces all existing VK assignments in a single atomic transaction. Set disabled: true to shut down the client's connection and workers without removing it. Set disabled: false to reconnect a previously disabled client.

put/api/mcp/client/{id}

Path parameters

idstring required

MCP client ID

Request body

client_idstring

Unique identifier for the MCP client

namestring

Display name for the MCP client

is_code_mode_clientboolean

Whether this client is available in code mode

connection_type'http' | 'stdio' | 'sse' | 'inprocess'

Connection type for MCP client

connection_stringstring

HTTP or SSE URL (required for HTTP or SSE connections)

auth_type'none' | 'headers' | 'oauth' | 'per_user_oauth' | 'per_user_headers'

Authentication type for the MCP connection

oauth_config_idstring

OAuth config ID for OAuth authentication. References the oauth_configs table. Only relevant when auth_type is "oauth".

headersobject

Custom headers to include in requests. Only used when auth_type is "headers".

tools_to_executestring[]

Include-only list for tools. ["*"] => all tools are included [] => no tools are included ["tool1", "tool2"] => include only the specified tools

tools_to_auto_executestring[]

List of tools that can be auto-executed without user approval. Must be a subset of tools_to_execute. ["*"] => all executable tools can be auto-executed [] => no tools are auto-executed ["tool1", "tool2"] => only specified tools can be auto-executed

tool_pricingobject

Per-tool cost in USD for execution. Key is the tool name, value is the cost per execution. Example: {"read_file": 0.001, "write_file": 0.002} Note: Only available when updating an existing client after tools have been fetched.

allow_on_all_virtual_keysboolean

When true, this MCP client's tools are accessible to all virtual keys without requiring explicit per-key assignment. All tools are allowed by default. If a virtual key has an explicit MCP config for this client, that config takes precedence and overrides this behaviour.

per_user_header_keysstring[]

For per_user_headers clients only. Updating this list flips every existing active per-user credential row to needs_update; callers will be sent back to the submission form on their next tool call to satisfy the new schema.

disabledboolean

When true, the client's connection, health monitor, and tool syncer are shut down. The client entry is preserved so it can be re-enabled later by sending disabled: false. Disabled clients do not expose tools to inference requests.

Response

MCP client updated successfully

statusstring
messagestring

Example response

{
  "status": "success",
  "message": "Operation completed successfully"
}