Skip to main content
PUT
/
api
/
mcp
/
client
/
{id}
Edit MCP client
curl --request PUT \
  --url http://localhost:8080/api/mcp/client/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "client_id": "<string>",
  "name": "<string>",
  "is_code_mode_client": true,
  "connection_type": "http",
  "connection_string": "<string>",
  "stdio_config": {
    "command": "<string>",
    "args": [
      "<string>"
    ],
    "envs": [
      "<string>"
    ]
  },
  "auth_type": "none",
  "oauth_config_id": "<string>",
  "headers": {},
  "tools_to_execute": [
    "<string>"
  ],
  "tools_to_auto_execute": [
    "<string>"
  ],
  "tool_pricing": {}
}
'
{
  "status": "success",
  "message": "Operation completed successfully"
}

Path Parameters

id
string
required

MCP client ID

Body

application/json

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
enum<string>

Connection type for MCP client

Available options:
http,
stdio,
sse,
inprocess
connection_string
string

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

stdio_config
object

STDIO configuration for MCP client

auth_type
enum<string>

Authentication type for the MCP connection

Available options:
none,
headers,
oauth
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.

Response

MCP client updated successfully

Generic success response

status
string
Example:

"success"

message
string
Example:

"Operation completed successfully"