Skip to main content
POST
/
api
/
captain
/
agents
/
{id}
/
mcp
/
servers
Add MCP server
curl --request POST \
  --url http://localhost:63372/api/captain/agents/{id}/mcp/servers \
  --header 'Content-Type: application/json' \
  --cookie captain_session= \
  --data '
{
  "name": "filesystem",
  "enabled": true,
  "transport": "stdio",
  "command": "npx",
  "args": [
    "-y",
    "@modelcontextprotocol/server-filesystem",
    "/tmp"
  ],
  "env": {}
}
'
{
  "ok": true
}

Authorizations

captain_session
string
cookie
required

HMAC-signed session cookie returned by /api/captain/auth/login. Valid for 7 days. Invalidated when password changes.

Path Parameters

id
string
required

Agent ID

Body

application/json
name
string
required
Example:

"filesystem"

enabled
boolean
required
Example:

true

transport
enum<string>
required
Available options:
stdio,
sse,
http
Example:

"stdio"

command
string | null
Example:

"npx"

args
string[] | null
Example:
[
"-y",
"@modelcontextprotocol/server-filesystem",
"/tmp"
]
url
string | null
Example:

null

env
object
Example:
{}

Response

Success

ok
boolean
required
Example:

true