Skip to main content
POST
/
ai-agents
/
agent-builder
/
mcp-servers
Create MCP Server
curl --request POST \
  --url https://{appid}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/mcp-servers \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "name": "Weather Server",
  "slug": "weather-server",
  "description": "Provides weather data for cities",
  "url": "http://localhost:3001",
  "icon": "http://localhost:3001/icon.png"
}
'
{
  "_id": "myapp_my-mcp-server",
  "appId": "my-app-id",
  "slug": "my-mcp-server",
  "name": "My MCP Server",
  "description": "A Model Context Protocol server",
  "url": "https://mcp.example.com/sse",
  "icon": "https://example.com/icon.png",
  "createdAt": 1700000000000,
  "updatedAt": 1700000000000
}

Authorizations

apikey
string
header
required

API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).

Body

application/json
name
string
required

Name of the MCP server (human readable)

Example:

"Weather Server"

slug
string
required

Slug of the MCP server (unique, URL-safe)

Example:

"weather-server"

description
string
required

Description of the MCP server

Example:

"Provides weather data for cities"

url
string
required

URL of the MCP server

Example:

"http://localhost:3001"

icon
string

Icon for the MCP server

Example:

"http://localhost:3001/icon.png"

Response

MCP server created successfully

_id
string
Example:

"myapp_my-mcp-server"

appId
string
Example:

"my-app-id"

slug
string
Example:

"my-mcp-server"

name
string
Example:

"My MCP Server"

description
string
Example:

"A Model Context Protocol server"

url
string
Example:

"https://mcp.example.com/sse"

icon
string
Example:

"https://example.com/icon.png"

createdAt
number
Example:

1700000000000

updatedAt
number
Example:

1700000000000