v1

latestOpenAPI 3.1.02026-07-177545150.1 KB
Server Management

Register Service Api

Register a service via JWT Bearer Token authentication (External API).

This endpoint provides the same functionality as POST /api/internal/register but uses modern JWT Bearer token authentication via nginx headers, making it suitable for external service-to-service communication.

Authentication: JWT Bearer token (via nginx X-User header) Authorization: Requires valid JWT token from auth system

Request body (form data):

  • name (required): Service name
  • description (required): Service description
  • path (required): Service path (e.g., /myservice)
  • proxy_pass_url (required): Proxy URL (e.g., http://localhost:8000)
  • tags (optional): Comma-separated tags
  • num_tools (optional): Number of tools
  • num_stars (optional): Star rating
  • is_python (optional): Is Python server (boolean)
  • license (optional): License name
  • overwrite (optional): Overwrite if exists (boolean, default true)
  • auth_provider (optional): Auth provider name
  • auth_type (optional): Auth type (e.g., oauth, basic)
  • supported_transports (optional): JSON array of transports
  • headers (optional): JSON object of headers
  • tool_list_json (optional): JSON array of tool definitions

Response:

  • 201 Created: Service registered successfully
  • 400 Bad Request: Invalid input data
  • 401 Unauthorized: Missing or invalid JWT token
  • 409 Conflict: Service already exists (unless overwrite=true)
  • 500 Internal Server Error: Server error

Example:

curl -X POST https://registry.example.com/api/servers/register \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -F "name=My Service" \
  -F "description=My MCP Service" \
  -F "path=/myservice" \
  -F "proxy_pass_url=http://localhost:8000"
post/api/servers/register

Response

Successful Response

{"stackTrail":"paths:/api/servers/register:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}