Mirror of https://github.com/modelcontextprotocol/registry — A community driven registry service for Model Context Protocol (MCP) servers.
  • Go 92.9%
  • PLpgSQL 3.1%
  • HTML 1.9%
  • Shell 1.6%
  • Makefile 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tadas Antanavicius a5f417b6f5
Split "general" server.json from "registry-specific" server.json (#167)
Closes #155

The "generalized" `server.json` is the one that can be used in a variety
of situations:

- Discoverability on a centralized registry (i.e. our official Registry
work)
- Discoverability on a decentralized .well-known endpoint
- As a response to an initialization call, so the client knows
information about the MCP server to which it is connecting
- As an input into crafting a [DXT
file](https://www.anthropic.com/engineering/desktop-extensions)
- Packaged in with the source code of an MCP server, so as to have a
structured way context

Of these, the official Registry is but one use case. The Registry has a
unique set of concerns for which we are optimizing, like whitelisting of
specific registries we trust to host MCP server source code for the
public community (`npm`, `pypi`, etc). It is not necessary to have such
a constraint for the generalized server.json, which may be used in, for
example, an internal context where such a validation doesn't make sense.

So I've done the following at a high level:
- Renamed the prior `schema.json` to be `registry-schema.json`
- Introduced a more generic `schema.json` to serve as the schema for the
generalized `server.json`
- Refactored `registry-schema.json` to be simply a constraint on the
base `schema.json`

I made a few small changes in this transition:
- Removed `gitlab` as an option in `repository.source` for
`registry-schema.json`. I'm fine going live with just GitHub support;
would be happy to take a contribution from e.g. Gitlab employees or a
motivated Gitlab customer to expand anytime.
- Removed `homebrew` as an option in `packages.registry_name`; never
really made sense, not a place where folks are publishing MCP servers
- Added `docker` to `packages.runtime_hint`; was just a missing
oversight
- Gave both schemas a global `$id`
~- Removed `release_date` from both schemas. Certainly not something
that makes sense for the generalized schema. It actually doesn't make
sense for the Registry schema either, because this is the server.json
that _users will submit_, i.e. the _input_ into the Registry publication
API. `release_date` will be a piece of _output_ metadata. The Registry
API will be free to append such extra metadata for GET /:id requests of
servers, and the data can be present in the OpenAPI spec, but it does
not need to be in the registry-server.json JSON schema.~
  - Note this is no longer in this PR; rebased on #168 which included it
- Removed unnecessary enums from the generalized `schema.json`
2025-07-09 14:02:43 -07:00
.github/workflows Fixed linter errors and fixed tests 2025-05-27 19:13:51 -06:00
.vscode Rename mcp.json to server.json (#106) 2025-06-03 18:52:46 +00:00
cmd/registry feat(database): support SeedFile import for memory database (#128) 2025-06-06 18:19:28 -04:00
data Resolve packages and remove unknown registries (#138) 2025-07-07 19:32:56 +00:00
docs Split "general" server.json from "registry-specific" server.json (#167) 2025-07-09 14:02:43 -07:00
integrationtests Fixed linter errors and fixed tests 2025-05-27 19:13:51 -06:00
internal feat(database): support SeedFile import for memory database (#128) 2025-06-06 18:19:28 -04:00
scripts feat(script): update publish test script 2025-05-27 19:13:51 -06:00
tools/publisher Add NuGet to the MCP Registry, similar to npm and Python 2025-07-07 12:28:19 -06:00
.dockerignore fix(docker): ignore local mongo .db during rebuild 2025-05-25 12:41:19 -07:00
.gitignore Add publisher binary to gitignore 2025-07-02 19:40:25 -06:00
.golangci.yml Fixed linter errors and fixed tests 2025-05-27 19:13:51 -06:00
CONTRIBUTING.md Contributing.md (#16) 2025-05-05 09:34:34 -07:00
docker-compose.yml chore(docker-compose): enhance environment variable configuration using interpolation 2025-06-02 11:33:09 -06:00
Dockerfile refactor(docker): replace CMD with ENTRYPOINT 2025-05-25 12:41:19 -07:00
go.mod go mod tidy 2025-05-27 19:13:51 -06:00
go.sum feat(tests): add comprehensive tests for health and publish handlers 2025-05-27 19:13:51 -06:00
LICENSE Init world. Basic registry API server 2025-04-22 17:09:44 -04:00
README.md feat(config): specify to use in-memory database (#74) 2025-06-04 07:26:48 -06:00

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.

# Build the Docker image
docker build -t registry .

# Run the registry and MongoDB with docker compose
docker compose up

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.

# Build a registry executable
go build ./cmd/registry

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/           # OpenApi specification
├── cmd/           # Application entry points
├── config/        # Configuration files
├── internal/      # Private application code
│   ├── api/       # HTTP server and request handlers
│   ├── config/    # Configuration management
│   ├── model/     # Data models
│   └── service/   # Business logic
├── pkg/           # Public libraries
├── scripts/       # Utility scripts
└── tools/         # Command line tools
    └── publisher/ # Tool to publish MCP servers to the registry

API Documentation

The API is documented using Swagger/OpenAPI. You can access the interactive Swagger UI at:

/v0/swagger/index.html

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

GET /v0/health

Returns the health status of the service:

{
  "status": "ok"
}

Registry Endpoints

List Registry Server Entries

GET /v0/servers

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:

{
  "servers": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "Example MCP Server",
      "url": "https://example.com/mcp",
      "description": "An example MCP server",
      "created_at": "2025-05-17T17:34:22.912Z",
      "updated_at": "2025-05-17T17:34:22.912Z"
    }
  ],
  "metadata": {
    "next_cursor": "123e4567-e89b-12d3-a456-426614174000",
    "count": 30
  }
}

Get Server Details

GET /v0/servers/{id}

Retrieves detailed information about a specific MCP server entry.

Path parameters:

  • id: Unique identifier of the server entry

Response example:

{
  "id": "01129bff-3d65-4e3d-8e82-6f2f269f818c",
  "name": "io.github.gongrzhe/redis-mcp-server",
  "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.",
  "repository": {
    "url": "https://github.com/GongRzhe/REDIS-MCP-Server",
    "source": "github",
    "id": "907849235"
  },
  "version_detail": {
    "version": "0.0.1-seed",
    "release_date": "2025-05-16T19:13:21Z",
    "is_latest": true
  },
  "packages": [
    {
      "registry_name": "docker",
      "name": "@gongrzhe/server-redis-mcp",
      "version": "1.0.0",
      "package_arguments": [
        {
          "description": "Docker image to run",
          "is_required": true,
          "format": "string",
          "value": "mcp/redis",
          "default": "mcp/redis",
          "type": "positional",
          "value_hint": "mcp/redis"
        },
        {
          "description": "Redis server connection string",
          "is_required": true,
          "format": "string",
          "value": "redis://host.docker.internal:6379",
          "default": "redis://host.docker.internal:6379",
          "type": "positional",
          "value_hint": "host.docker.internal:6379"
        }
      ]
    }
  ]
}

Publish a Server Entry

POST /v0/publish

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:

{
    "description": "<your description here>",
    "name": "io.github.<owner>/<server-name>",
    "packages": [
        {
            "registry_name": "npm",
            "name": "@<owner>/<server-name>",
            "version": "0.2.23",
            "package_arguments": [
                {
                    "description": "Specify services and permissions.",
                    "is_required": true,
                    "format": "string",
                    "value": "-s",
                    "default": "-s",
                    "type": "positional",
                    "value_hint": "-s"
                }
            ],
            "environment_variables": [
                {
                    "description": "API Key to access the server",
                    "name": "API_KEY"
                }
            ]
        },{
            "registry_name": "docker",
            "name": "@<owner>/<server-name>-cli",
            "version": "0.123.223",
            "runtime_hint": "docker",
            "runtime_arguments": [
                {
                    "description": "Specify services and permissions.",
                    "is_required": true,
                    "format": "string",
                    "value": "--mount",
                    "default": "--mount",
                    "type": "positional",
                    "value_hint": "--mount"
                }
            ],
            "environment_variables": [
                {
                    "description": "API Key to access the server",
                    "name": "API_KEY"
                }
            ]
        }
    ],
    "repository": {
        "url": "https://github.com/<owner>/<server-name>",
        "source": "github"
    },
    "version_detail": {
        "version": "0.0.1-<publisher_version>"
    }
}

Response example:

{
  "message": "Server publication successful",
  "id": "1234567890abcdef12345678"
}

Ping Endpoint

GET /v0/ping

Simple ping endpoint that returns environment configuration information:

{
  "environment": "dev",
  "version": "registry-<sha>"
}

Configuration

The service can be configured using environment variables:

Variable Description Default
MCP_REGISTRY_APP_VERSION Application version dev
MCP_REGISTRY_DATABASE_TYPE Database type mongodb
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:

./scripts/test_endpoints.sh

You can specify specific endpoints to test:

./scripts/test_endpoints.sh --endpoint health
./scripts/test_endpoints.sh --endpoint servers

License

See the LICENSE file for details.

Contributing

See the CONTRIBUTING file for details.