Skip to content

Commit 1821f68

Browse files
authored
docs: Clean up API documentation (#236)
- Move API examples from docs into swagger.yaml - Align openapi.yaml docs with implementation
1 parent 1a6dc93 commit 1821f68

File tree

7 files changed

+327
-566
lines changed

7 files changed

+327
-566
lines changed

README.md

Lines changed: 1 addition & 200 deletions
Original file line numberDiff line numberDiff line change
@@ -200,206 +200,7 @@ Publishing requires GitHub OAuth validation:
200200
GET /v0/swagger/index.html
201201
```
202202

203-
The API is documented using Swagger/OpenAPI. This page provides a complete reference of all endpoints with request/response schemas and allows you to test the API directly from your browser.
204-
205-
### Health Check
206-
207-
```
208-
GET /v0/health
209-
```
210-
211-
Returns the health status of the service:
212-
```json
213-
{
214-
"status": "ok"
215-
}
216-
```
217-
218-
### Registry Endpoints
219-
220-
#### List Registry Server Entries
221-
222-
```
223-
GET /v0/servers
224-
```
225-
226-
Lists MCP registry server entries with pagination support.
227-
228-
Query parameters:
229-
- `limit`: Maximum number of entries to return (default: 30, max: 100)
230-
- `cursor`: Pagination cursor for retrieving next set of results
231-
232-
Response example:
233-
```json
234-
{
235-
"servers": [
236-
{
237-
"id": "123e4567-e89b-12d3-a456-426614174000",
238-
"name": "Example MCP Server",
239-
"url": "https://example.com/mcp",
240-
"description": "An example MCP server",
241-
"created_at": "2025-05-17T17:34:22.912Z",
242-
"updated_at": "2025-05-17T17:34:22.912Z"
243-
}
244-
],
245-
"metadata": {
246-
"next_cursor": "123e4567-e89b-12d3-a456-426614174000",
247-
"count": 30
248-
}
249-
}
250-
```
251-
252-
#### Get Server Details
253-
254-
```
255-
GET /v0/servers/{id}
256-
```
257-
258-
Retrieves detailed information about a specific MCP server entry.
259-
260-
Path parameters:
261-
- `id`: Unique identifier of the server entry
262-
263-
Response example:
264-
```json
265-
{
266-
"id": "01129bff-3d65-4e3d-8e82-6f2f269f818c",
267-
"name": "io.github.gongrzhe/redis-mcp-server",
268-
"description": "A Redis MCP server (pushed to https://github.com/modelcontextprotocol/servers/tree/main/src/redis) implementation for interacting with Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.",
269-
"repository": {
270-
"url": "https://github.com/GongRzhe/REDIS-MCP-Server",
271-
"source": "github",
272-
"id": "907849235"
273-
},
274-
"version_detail": {
275-
"version": "0.0.1-seed",
276-
"release_date": "2025-05-16T19:13:21Z",
277-
"is_latest": true
278-
},
279-
"packages": [
280-
{
281-
"registry_name": "docker",
282-
"name": "@gongrzhe/server-redis-mcp",
283-
"version": "1.0.0",
284-
"package_arguments": [
285-
{
286-
"description": "Docker image to run",
287-
"is_required": true,
288-
"format": "string",
289-
"value": "mcp/redis",
290-
"default": "mcp/redis",
291-
"type": "positional",
292-
"value_hint": "mcp/redis"
293-
},
294-
{
295-
"description": "Redis server connection string",
296-
"is_required": true,
297-
"format": "string",
298-
"value": "redis://host.docker.internal:6379",
299-
"default": "redis://host.docker.internal:6379",
300-
"type": "positional",
301-
"value_hint": "host.docker.internal:6379"
302-
}
303-
]
304-
}
305-
]
306-
}
307-
```
308-
309-
#### Publish a Server Entry
310-
311-
```
312-
POST /v0/publish
313-
```
314-
315-
Publishes a new MCP server entry to the registry. Authentication is required via Bearer token in the Authorization header.
316-
317-
Headers:
318-
- `Authorization`: Bearer token for authentication (e.g., `Bearer your_token_here`)
319-
- `Content-Type`: application/json
320-
321-
Request body example:
322-
```json
323-
{
324-
"description": "<your description here>",
325-
"name": "io.github.<owner>/<server-name>",
326-
"packages": [
327-
{
328-
"registry_name": "npm",
329-
"name": "@<owner>/<server-name>",
330-
"version": "0.2.23",
331-
"package_arguments": [
332-
{
333-
"description": "Specify services and permissions.",
334-
"is_required": true,
335-
"format": "string",
336-
"value": "-s",
337-
"default": "-s",
338-
"type": "positional",
339-
"value_hint": "-s"
340-
}
341-
],
342-
"environment_variables": [
343-
{
344-
"description": "API Key to access the server",
345-
"name": "API_KEY"
346-
}
347-
]
348-
},{
349-
"registry_name": "docker",
350-
"name": "@<owner>/<server-name>-cli",
351-
"version": "0.123.223",
352-
"runtime_hint": "docker",
353-
"runtime_arguments": [
354-
{
355-
"description": "Specify services and permissions.",
356-
"is_required": true,
357-
"format": "string",
358-
"value": "--mount",
359-
"default": "--mount",
360-
"type": "positional",
361-
"value_hint": "--mount"
362-
}
363-
],
364-
"environment_variables": [
365-
{
366-
"description": "API Key to access the server",
367-
"name": "API_KEY"
368-
}
369-
]
370-
}
371-
],
372-
"repository": {
373-
"url": "https://github.com/<owner>/<server-name>",
374-
"source": "github"
375-
},
376-
"version_detail": {
377-
"version": "0.0.1-<publisher_version>"
378-
}
379-
}
380-
```
381-
382-
Response example:
383-
```json
384-
{
385-
"message": "Server publication successful",
386-
"id": "1234567890abcdef12345678"
387-
}
388-
```
389-
390-
### Ping Endpoint
391-
392-
```
393-
GET /v0/ping
394-
```
395-
396-
Simple ping endpoint that returns environment configuration information:
397-
```json
398-
{
399-
"environment": "dev",
400-
"version": "registry-<sha>"
401-
}
402-
```
203+
The API is documented using Swagger/OpenAPI. This page provides a complete reference of all endpoints with request/response schemas and examples, and allows you to test the API directly from your browser.
403204

404205
## Configuration
405206

docs/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The MCP Registry is the official centralized metadata repository for publicly-ac
1818
There are four underlying concepts:
1919
- "MCP Server Registry API" (or "MCP Registry API"): The OpenAPI specification defined in [openapi.yaml](./server-registry-api/openapi.yaml). This is a reusable API specification that anyone building any sort of "MCP server registry" should consider adopting / aligning with.
2020
- "Official MCP Registry" (or "MCP Registry"): The application that lives at `https://registry.modelcontextprotocol.io`. This registry currently only catalogs MCP servers, but may be extended in the future to also catalog MCP client/host apps and frameworks.
21-
- "Official MCP Registry API": The REST API that lives at `https://registry.modelcontextprotocol.io/api`, with an OpenAPI specification defined at [official-registry-openapi.yaml](./server-registry-api/official-registry-openapi.yaml)
21+
- "Official MCP Registry API": The REST API that lives at `https://registry.modelcontextprotocol.io/api`, with an OpenAPI specification defined at [swagger.yaml](../internal/docs/swagger.yaml)
2222
- "MCP server registry" (or "MCP registry"): A third party, likely commercial, implementation of the MCP Server Registry API or derivative specification.
2323

2424
### Is the MCP Registry a package registry?

docs/server-registry-api/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ The centralized, publicly available catalog ("Official MCP Registry") needs addi
1010

1111
References:
1212
- [openapi.yaml](./openapi.yaml) - A reusable API specification (MCP Server Registry API) that anyone building any sort of "MCP server registry" should consider adopting / aligning with.
13-
- [examples.md](./api_examples.md) - Example manifestations of the OpenAPI specification
14-
- [official-registry-openapi.ayml](./official-registry-openapi.yaml) - The specification backing the Official MCP Registry; a derivative of the MCP Server Registry API specification.
13+
- [swagger.yaml](../../internal/docs/swagger.yaml) - The specification backing the Official MCP Registry; a derivative of the MCP Server Registry API specification.

0 commit comments

Comments
 (0)