Skip to main content
POST
/
api
/
mcp
/
client
Add MCP client
curl --request POST \
  --url http://localhost:8080/api/mcp/client \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "connection_type": "http",
  "connection_string": "<string>",
  "client_id": "<string>",
  "is_code_mode_client": true,
  "is_ping_available": true,
  "auth_type": "none",
  "oauth_config_id": "<string>",
  "headers": {},
  "oauth_config": {
    "client_id": "<string>",
    "client_secret": "<string>",
    "authorize_url": "<string>",
    "token_url": "<string>",
    "registration_url": "<string>",
    "scopes": [
      "<string>"
    ]
  },
  "tools_to_execute": [
    "<string>"
  ],
  "tools_to_auto_execute": [
    "<string>"
  ],
  "allow_on_all_virtual_keys": false
}
'
{
  "status": "success",
  "message": "Operation completed successfully"
}

Body

application/json

MCP client configuration for creating a new client (tool_pricing not available at creation). The schema varies based on connection_type:

  • HTTP/SSE: connection_string is required
  • STDIO: stdio_config is required
  • InProcess: server instance must be provided programmatically (Go package only)
name
string
required

Display name for the MCP client

connection_type
enum<string>
required

Connection type for MCP client

Available options:
http
connection_string
string
required

HTTP URL (required for HTTP connection type)

client_id
string

Unique identifier for the MCP client (optional, auto-generated if not provided)

is_code_mode_client
boolean
is_ping_available
boolean
default:true

Whether the MCP server supports ping for health checks. If true, uses lightweight ping method for health checks. If false, uses listTools method for health checks instead.

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. Set after OAuth flow is completed. 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".

oauth_config
object

OAuth configuration for initiating OAuth flow. Only include this when creating a client with auth_type "oauth". This will trigger the OAuth flow and return an authorization URL.

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

allow_on_all_virtual_keys
boolean
default:false

When true, this MCP client's tools are available to all virtual keys by default, without requiring an explicit virtual key assignment. An explicit virtual key config always overrides this setting for that key.

Response

MCP client added successfully

Generic success response

status
string
Example:

"success"

message
string
Example:

"Operation completed successfully"