Skip to main content
POST
/
api
/
mcp
/
servers
curl -X POST https://api.example.com/api/mcp/servers \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "projectId": "proj_123",
    "name": "My MCP Server",
    "description": "Production MCP server",
    "transportType": "http",
    "url": "https://mcp-server.example.com",
    "connectionType": "proxy"
  }'
{
  "success": true,
  "message": "MCP server created successfully",
  "serverId": "mcp_abc123"
}

Request Body

projectId
string
required
Project ID to associate the server with
name
string
required
Server name (minimum 1 character)
transportType
string
required
Transport protocol type. Must be one of: stdio, http, or sse
description
string
Server description
url
string
Server URL for HTTP/SSE transport
connectionType
string
default:"proxy"
Connection type: direct or proxy
command
string
Command to execute for stdio transport
args
string
Command arguments
env
object
Environment variables as key-value pairs
customHeaders
array
Custom HTTP headers
oauthClientId
string
OAuth client ID
oauthClientSecret
string
OAuth client secret
oauthScope
string
OAuth scope
proxyUrl
string
Proxy server URL
proxyAuthToken
string
Proxy authentication token
proxyAuthHeader
string
default:"Authorization"
Proxy authentication header name
requestTimeout
number
Request timeout in milliseconds
maxTotalTimeout
number
Maximum total timeout in milliseconds

Response

success
boolean
Whether the server was created successfully
message
string
Success message or error details
serverId
string
Unique identifier for the created server
curl -X POST https://api.example.com/api/mcp/servers \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "projectId": "proj_123",
    "name": "My MCP Server",
    "description": "Production MCP server",
    "transportType": "http",
    "url": "https://mcp-server.example.com",
    "connectionType": "proxy"
  }'
{
  "success": true,
  "message": "MCP server created successfully",
  "serverId": "mcp_abc123"
}