modelcontextprotocol/registry
MCP Registry
A community driven registry service for Model Context Protocol (MCP) servers.
Development Status
This project is being built in the open and is currently in the early stages of development. Please see the overview discussion for the project scope and goals. If you would like to contribute, please check out the contributing guidelines.
Overview
The MCP Registry service provides a centralized repository for MCP server entries. It allows discovery and management of various MCP implementations with their associated metadata, configurations, and capabilities.
Features
- RESTful API for managing MCP registry entries (list, get, create, update, delete)
- Health check endpoint for service monitoring
- Support for various environment configurations
- Graceful shutdown handling
- MongoDB and in-memory database support
- Comprehensive API documentation
- Pagination support for listing registry entries
Getting Started
Prerequisites
- Go 1.18 or later
- MongoDB
- Docker (optional, but recommended for development)
Running
The easiest way to get the registry running is to use docker compose
. This will setup the MCP Registry service, import the seed data and run MongoDB in a local Docker environment.
|
|
This will start the MCP Registry service and MongoDB with Docker, exposing it on port 8080.
Building
If you prefer to run the service locally without Docker, you can build and run it directly using Go.
|
|
This will create the registry
binary in the current directory. Youβll need to have MongoDB running locally or with Docker.
By default, the service will run on http://localhost:8080
.
Project Structure
|
|
API Documentation
The API is documented using Swagger/OpenAPI. You can access the interactive Swagger UI at:
|
|
This provides a complete reference of all endpoints with request/response schemas and allows you to test the API directly from your browser.
API Endpoints
Health Check
|
|
Returns the health status of the service:
|
|
Registry Endpoints
List Registry Server Entries
|
|
Lists MCP registry server entries with pagination support.
Query parameters:
limit
: Maximum number of entries to return (default: 30, max: 100)cursor
: Pagination cursor for retrieving next set of results
Response example:
|
|
Get Server Details
|
|
Retrieves detailed information about a specific MCP server entry.
Path parameters:
id
: Unique identifier of the server entry
Response example:
|
|
Publish a Server Entry
|
|
Publishes a new MCP server entry to the registry. Authentication is required via Bearer token in the Authorization header.
Headers:
Authorization
: Bearer token for authentication (e.g.,Bearer your_token_here
)Content-Type
: application/json
Request body example:
|
|
Response example:
|
|
Ping Endpoint
|
|
Simple ping endpoint that returns environment configuration information:
|
|
Configuration
The service can be configured using environment variables:
Variable | Description | Default |
---|---|---|
MCP_REGISTRY_APP_VERSION |
Application version | dev |
MCP_REGISTRY_COLLECTION_NAME |
MongoDB collection name | servers_v2 |
MCP_REGISTRY_DATABASE_NAME |
MongoDB database name | mcp-registry |
MCP_REGISTRY_DATABASE_URL |
MongoDB connection string | mongodb://localhost:27017 |
MCP_REGISTRY_GITHUB_CLIENT_ID |
GitHub App Client ID | |
MCP_REGISTRY_GITHUB_CLIENT_SECRET |
GitHub App Client Secret | |
MCP_REGISTRY_LOG_LEVEL |
Log level | info |
MCP_REGISTRY_SEED_FILE_PATH |
Path to import seed file | data/seed.json |
MCP_REGISTRY_SEED_IMPORT |
Import seed.json on first run |
true |
MCP_REGISTRY_SERVER_ADDRESS |
Listen address for the server | :8080 |
Testing
Run the test script to validate API endpoints:
|
|
You can specify specific endpoints to test:
|
|
License
See the LICENSE file for details.
Contributing
See the CONTRIBUTING file for details.