---
title: "Edit MCP client"
method: PUT
path: "/api/mcp/client/{id}"
tags: ["MCP"]
---

# Edit MCP client

`PUT /api/mcp/client/{id}`

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.

## Path parameters

- `id` string, required

## Request body

- object — MCP client configuration for updating an existing client (includes tool_pricing)
  - `client_id` string — Unique identifier for the MCP client
  - `name` string — Display name for the MCP client
  - `is_code_mode_client` boolean — Whether this client is available in code mode
  - `connection_type` 'http' | 'stdio' | 'sse' | 'inprocess' — Connection type for MCP client
  - `connection_string` string — HTTP or SSE URL (required for HTTP or SSE connections)
  - `stdio_config` object — STDIO configuration for MCP client
    - `command` string — Executable command to run
    - `args` string[] — Command line arguments
    - `envs` string[] — Environment variables required
  - `auth_type` 'none' | 'headers' | 'oauth' | 'per_user_oauth' | 'per_user_headers' — Authentication type for the MCP connection
  - `oauth_config_id` string — OAuth config ID for OAuth authentication. References the oauth_configs table. Only relevant when auth_type is "oauth".
  - `headers` object — Custom headers to include in requests. Only used when auth_type is "headers".
  - `tools_to_execute` string[] — Include-only list for tools. ["*"] => all tools are included [] => no tools are included ["tool1", "tool2"] => include only the specified tools
  - `tools_to_auto_execute` string[] — 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_pricing` object — 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_keys` boolean — 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_keys` string[] — 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.
  - `disabled` boolean — 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.
  - `tls_config` object — TLS configuration for HTTP and SSE connections. Not applicable to stdio or inprocess connection types.
    - `insecure_skip_verify` boolean — Disable TLS certificate verification. Takes priority over ca_cert_pem when both are set. Use only in development or trusted isolated environments. Not recommended for production.
    - `ca_cert_pem` string — PEM-encoded CA certificate to trust for MCP server connections. Use when the MCP server uses a self-signed or private CA certificate. Supports env.VAR_NAME syntax to read the certificate from an environment variable.
  - `vk_configs` object[] — When provided, replaces all virtual key assignments for this MCP client. Each entry specifies a virtual key and the tools it is allowed to call. To remove all VK access, provide an empty array []. Omit this field to leave existing VK assignments unchanged.
    - `virtual_key_id` string, required — ID of the virtual key
    - `tools_to_execute` string[], required — Tools this virtual key is allowed to call on this MCP server. ["*"] => all tools allowed ["tool1", "tool2"] => only the specified tools

## Response `200`

MCP client updated successfully

- SuccessResponse — Generic success response
  - `status` string
  - `message` string

## Other responses

- `400` — Bad request
- `500` — Internal server error

---

[API](https://skmtc.net/getbifrost/apis/bifrost-api.md) · [All operations](https://skmtc.net/getbifrost/apis/bifrost-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbifrost/bifrost-api/versions/f8cab88f64ea/schema)
