VocalDocscontracts 1.65.0

Register an MCP server

POST /v1/mcp-servers

PropertyValue
Operationcreate_mcp_server
GroupMCP servers
Scopemcp:write
Route classcontrol
IdempotencyIdempotency-Key accepted: a retry with the same key replays the first answer
AuditAudited mcp.server.create (mutation)
Released in1.60.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Registers a third-party MCP server and creates its Connection (1.60.0), needs_reauth until an oauth Connection is authorized or a bearer token is entered, active for none. The endpoint is checked through the egress guard (validation_failed with egress_denied), and a name already taken is mcp_server_name_taken. The first listing follows as a task.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the mcp:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X POST "$VOCAL_API/v1/mcp-servers" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "crm-hub",
    "endpoint": "https://example.test/a",
    "auth": "oauth"
  }'

Parameters

NameInTypeRequiredDescription
idempotency-keyheaderstringnoA client-chosen key, kept 24 hours per Organization, environment and route. A replay returns the stored response.

Request body

Content type application/json, required: McpServerCreateRequest.

FieldTypeRequiredDescription
authMcpServerAuthyes
default_timeout_msintegerno5,000 when omitted (a target).
endpointMcpEndpointyes
nameMcpServerNameyes

Responses

StatusContent typeShapeError codes
201application/jsonMcpServer
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
409application/jsonErrorEnvelopeidempotency_in_progress, idempotency_key_reused
422application/jsonErrorEnvelopevalidation_failed
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 201 answer

The shape is McpServer.

FieldTypeRequiredDescription
allowed_toolsarray of UpstreamToolNameyesThe tools a Member with mcp:write approved; a tool not listed is never offered to any Agent.
authMcpServerAuthyes
authorization_serverstring or nullyesThe issuer the client discovered for oauth (RFC 9728, RFC 8414); null before discovery or for other auth.
connection_idConnectionIdyesThe Connection the registration created for its credential.
created_atTimestampyes
default_timeout_msintegeryes
drift_countintegernoHow many pinned tools the latest listing found changed or removed (1.61.0): above 0 exactly while status is drift_pending; absent from an api before 1.61.0.
endpointMcpEndpointyes
idMcpServerIdyes
last_listed_atTimestamp or nullyes
nameMcpServerNameyes
object"mcp_server"yes
organization_idOrganizationIdyes
pinsarray of McpToolPinyes
protocol_versionstring or nullyesThe negotiated MCP revision; null before the first listing.
revisionintegeryes
statusMcpServerStatusyes
updated_atTimestampyes