65 lines
2 KiB
YAML
65 lines
2 KiB
YAML
/v0/publish:
|
|
post:
|
|
tags:
|
|
- servers
|
|
summary: Publish a server to the registry
|
|
description: Adds a new server to the MCP registry with authentication
|
|
operationId: publishServer
|
|
security:
|
|
- bearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
server_detail:
|
|
$ref: '#/components/schemas/ServerDetail'
|
|
repo_ref:
|
|
type: string
|
|
description: Repository reference used for authentication (defaults to server name if not provided)
|
|
responses:
|
|
'201':
|
|
description: Server published successfully
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
message:
|
|
type: string
|
|
example: Server publication successful
|
|
id:
|
|
type: string
|
|
example: 1234567890abcdef12345678
|
|
'400':
|
|
description: Invalid request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
example: Name is required
|
|
'401':
|
|
description: Authentication failed
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
example: Authentication is required for publishing
|
|
'500':
|
|
description: Server error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
example: Failed to publish server details
|