Register Mcp
POST
/v1/mcp/register
const url = 'https://api.uavcrew.ai/v1/mcp/register';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Production MCP Server","environment":"dev","endpoint_url":"https://mcp.example.com"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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:
- Validate API key and check scope
- Generate a connection token
- Perform health check on the MCP server
- Create/update MCPConnection record
- Return the connection token
The returned connection_token should be saved in the MCP server’s .env as MCP_API_KEY.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
MCPRegisterRequest
Request body for MCP server registration.
object
name
required
Name
Friendly name for this MCP server
string
environment
required
Environment
Deployment environment
string
endpoint_url
required
Endpoint Url
Public URL where the MCP server is accessible
string format: uri
Responses
Section titled “Responses”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
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>
ValidationErrorobject
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": {} } ]}