Skip to content

Register Mcp

POST
/v1/mcp/register
curl --request POST \
--url https://api.uavcrew.ai/v1/mcp/register \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "Production MCP Server", "environment": "dev", "endpoint_url": "https://mcp.example.com" }'

Register an MCP server connection.

This endpoint allows MCP servers to self-register using an organization’s API key. The API key must have the ‘mcp:register’ scope.

Flow:

  1. Validate API key and check scope
  2. Generate a connection token
  3. Perform health check on the MCP server
  4. Create/update MCPConnection record
  5. Return the connection token

The returned connection_token should be saved in the MCP server’s .env as MCP_API_KEY.

Media typeapplication/json
MCPRegisterRequest

Request body for MCP server registration.

object
name
required
Name

Friendly name for this MCP server

string
>= 1 characters <= 100 characters
environment
required
Environment

Deployment environment

string
Allowed values: dev uat prod
endpoint_url
required
Endpoint Url

Public URL where the MCP server is accessible

string format: uri
>= 1 characters <= 2083 characters

Successful Response

Media typeapplication/json
MCPRegisterResponse

Response from MCP server registration.

object
connection_id
required
Connection Id

UUID of the created/updated MCPConnection

string
connection_token
required
Connection Token

Token to authenticate MCP server requests (save as MCP_API_KEY)

string
status
required
Status

Connection status after registration

string
Allowed values: connected pending
message
required
Message

Human-readable status message

string
is_update
Is Update

Whether this updated an existing connection

boolean

Example

{
"status": "connected",
"is_update": false
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}