toolhive-registry-server
An API server that implements the official MCP Registry API, providing standardised access to MCP servers from multiple backends, including file-based and other API-compliant registries.
Description
An API server that implements the official MCP Registry API, providing standardised access to MCP servers from multiple backends, including file-based and other API-compliant registries.
README
Discover, govern, and control access to MCP servers and skills across your organization
The ToolHive Registry Server aggregates MCP servers and skills from Git repos, Kubernetes clusters, upstream registries, and internal APIs into named catalogs that your teams and AI clients can query. Each catalog has its own access control and audit trail, so you decide which entries are visible to which users -- and have a record of who accessed what.
It implements the official Model Context Protocol (MCP) Registry API specification. If you're not familiar with MCP: it's an open protocol that lets AI assistants connect to external tools and data sources. This server is the governance layer that sits between your MCP infrastructure and the teams consuming it.
- Features
- Quickstart
- Core Concepts
- API Endpoints
- Configuration
- The ToolHive Platform
- Documentation
- Contributing
- JWT claim-based visibility: Control which MCP servers and skills each user or team can see, per registry. A "production" registry can expose only vetted entries while a "dev-team" registry shows everything.
- OAuth 2.0/OIDC authentication: Plug in your existing identity provider (Okta, Auth0, Azure AD). OAuth is the default; anonymous mode is available for development.
- Role-based administration: Separate roles for managing sources, registries, and entries. Scope each role to specific JWT claims so teams manage their own resources.
- SIEM-compliant audit logging: Structured log covering all API operations with NIST SP 800-53 AU-3 compliant fields, dedicated file output, and configurable event filtering.
- Five source types: Pull entries from Git repos, upstream MCP registries, local files, Kubernetes clusters, or publish them via the Admin API.
- Compose catalogs from multiple sources: Each registry aggregates one or more sources, listed in order of precedence. One source can feed multiple registries, so the same internal catalog can serve different teams with different visibility rules.
- Background sync: Sources are polled on configurable intervals with retry logic. Registries stay current without manual intervention.
- Kubernetes-native discovery: A built-in reconciler watches for MCP server CRDs across namespaces and syncs them into the registry automatically. Per-entry access control via CRD annotations, multi-namespace support, and leader election for HA.
- OpenTelemetry: Distributed tracing and metrics out of the box.
- Standards-compliant: Implements the official MCP Registry API specification. Clients that speak the spec work out of the box.
- PostgreSQL backend: Database storage with automatic migrations.
- Go 1.26 or later (for building from source)
- Task for build automation
- PostgreSQL 16+
# Build the binary
task build
# Run with Git source
thv-registry-api serve --config examples/config-git.yaml
# Run with local file
thv-registry-api serve --config examples/config-file.yamlThe server starts on http://localhost:8080 by default.
# Using Task (recommended - ensures fresh state)
task docker-up
# Or detached mode
task docker-up-detached
# Access the API
curl http://localhost:8080/registry/default/v0.1/servers
# Stop and clean up
task docker-downNote: The
task docker-upcommand ensures a fresh start by rebuilding the image and clearing all volumes (database + registry data). This prevents stale state issues.
Most organizations have MCP servers and skills in more than one place -- a public catalog, an internal Git repo, a Kubernetes cluster running live instances. The Registry Server models this with two primitives: sources (where entries come from) and registries (what consumers query).
A source is a connection to where MCP server and skill entries live. It tells the server "go look here for entries." Sources come in five types:
| Type | What it does | Example | Sync |
|---|---|---|---|
| API | Pulls from an upstream registry API | The official MCP Registry at registry.modelcontextprotocol.io | Auto |
| Git | Clones entries from a Git repo | A version-controlled internal catalog | Auto |
| File | Reads from the local filesystem | A curated registry.json on disk |
Auto |
| Managed | Entries published via the Admin API | Dynamically registered internal servers | On-demand |
| Kubernetes | Discovers deployed MCP servers | Servers running in your K8s clusters | On-demand |
A registry is a named catalog that aggregates one or more sources into a single consumer-facing endpoint. Each registry can pull from different sources and enforce its own access control via JWT claims. Sources are listed in order -- when the same entry appears in multiple sources, the first source in the list wins.
Why they are separate: Sources and registries have a many-to-many relationship. One source can feed multiple registries, and one registry can pull from multiple sources. This lets you compose different catalogs for different audiences from the same underlying data:
Source: "official-catalog" ──┐
Source: "internal-tools" ──┼──> Registry: "production" (curated, vetted)
│
Source: "internal-tools" ──┼──> Registry: "dev-team" (everything)
Source: "k8s-deployed" ──┘
In this example, the "production" registry only exposes vetted entries from the official catalog and internal tools, while the "dev-team" registry includes everything plus live Kubernetes-discovered servers.
Configuration example:
sources:
- name: official-catalog
format: upstream
api:
endpoint: https://registry.modelcontextprotocol.io
syncPolicy:
interval: "1h"
- name: internal-tools
format: toolhive
git:
repository: https://github.com/myorg/mcp-catalog.git
branch: main
path: registry.json
syncPolicy:
interval: "30m"
registries:
- name: production
sources:
- official-catalog
- internal-tools
- name: dev-team
sources:
- internal-toolsSee Configuration Guide for complete details.
Fully compatible with the upstream MCP Registry API specification:
GET /registry/{registryName}/v0.1/servers- List servers from a specific registryGET /registry/{registryName}/v0.1/servers/{name}/versions- List all versions of a serverGET /registry/{registryName}/v0.1/servers/{name}/versions/{version}- Get a specific server version
Note: Git, API, File, and Kubernetes sources are read-only through the registry API.
ToolHive-specific endpoints for managing sources, registries, and entries:
Source management (requires manageSources role):
GET /v1/sources- List all configured sourcesGET /v1/sources/{name}- Get a source by namePUT /v1/sources/{name}- Create or update a sourceDELETE /v1/sources/{name}- Delete a sourceGET /v1/sources/{name}/entries- List entries for a source
Registry management (reads: authenticated; writes require manageRegistries role):
GET /v1/registries- List all configured registries with statusGET /v1/registries/{name}- Get registry details and sync statusGET /v1/registries/{name}/entries- List entries for a registry (requiresmanageRegistriesrole)PUT /v1/registries/{name}- Create or update a registryDELETE /v1/registries/{name}- Delete a registry
Entry management (requires manageEntries role):
POST /v1/entries- Publish a server or skill entryDELETE /v1/entries/{type}/{name}/versions/{version}- Delete a published entryPUT /v1/entries/{type}/{name}/claims- Update entry claims
Read-only endpoints for discovering skills within a registry:
GET /registry/{registryName}/v0.1/x/dev.toolhive/skills- List skills (paginated)GET /registry/{registryName}/v0.1/x/dev.toolhive/skills/{namespace}/{name}- Get latest version of a skillGET /registry/{registryName}/v0.1/x/dev.toolhive/skills/{namespace}/{name}/versions- List all versions of a skillGET /registry/{registryName}/v0.1/x/dev.toolhive/skills/{namespace}/{name}/versions/{version}- Get a specific skill version
GET /health- Health checkGET /readiness- Readiness checkGET /version- Version informationGET /v1/me- Returns the caller's identity and rolesGET /.well-known/oauth-protected-resource- OAuth discovery (RFC 9728)
- Registry API: Standards-compliant MCP discovery for clients and upstream integrations
- Admin API: Manage sources and registries, publish entries, query registry status
See the MCP Registry API specification for full API details.
All configuration is done via YAML files. The server requires a --config flag.
sources:
- name: local
format: toolhive
file:
path: /data/registry.json
registries:
- name: my-registry
sources:
- local
auth:
mode: anonymous # Use "oauth" for production
database:
host: localhost
port: 5432
user: registry
database: registry- Configuration reference - Complete configuration options
- Environment variables - Using environment variables for configuration
- Database setup - PostgreSQL configuration, migrations, and security
- Authentication - OAuth/OIDC setup and security
The Registry Server is one component of the ToolHive platform. Together, they cover the full MCP lifecycle:
- Registry Server (this project) handles discovery and governance -- it knows what MCP servers and skills exist, who can access them, and tracks all operations.
- ToolHive Operator handles deployment -- it deploys and manages MCP servers on Kubernetes, using registry metadata to drive lifecycle decisions. MCP servers deployed by the Operator automatically appear in the registry.
- ToolHive Enterprise UI ties it all together -- catalog browsing, search, and admin management backed by the registry API.
See the ToolHive documentation for the complete platform architecture.
- Configuration reference - All configuration options
- Environment variables - Environment variable overrides
- Database setup - PostgreSQL setup and migrations
- Authentication - OAuth/OIDC security
- Observability - OpenTelemetry tracing and metrics
- Registry sync - How background sync works
- Kubernetes deployment - K8s deployment and HA
- Docker deployment - Docker Compose setup
- API documentation - Auto-generated OpenAPI docs
- CLI reference - Command-line interface docs
- Examples - Working configuration examples
We welcome contributions! See the Contributing guide to get started, including development setup, build commands, architecture overview, and project structure.
- Code of conduct - Community guidelines
- Security policy - Report security vulnerabilities
This project is licensed under the Apache 2.0 License.
Part of the ToolHive project - Simplify and secure MCP servers
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| v1.2.0 | ## What's Changed * Remove internal-only endpoints from OpenAPI docs by @rdimitrov in https://github.com/stacklok/toolhive-registry-server/pull/722 * Bump `github.com/moby/spdystream` to v0.5.1 by @blkt in https://github.com/stacklok/toolhive-registry-server/pull/735 * Update github actions by @renovate[bot] in https://github.com/stacklok/toolhive-registry-server/pull/733 * Update docker images by @renovate[bot] in https://github.com/stacklok/toolhive-registry-server/pull/732 * Add database pass | High | 4/20/2026 |
| v1.1.2 | ## What's Changed * Add gzip response compression middleware by @blkt in https://github.com/stacklok/toolhive-registry-server/pull/729 * Bump toolhive to v0.20.0 to fix groupRef type mismatch by @ChrisJBurns in https://github.com/stacklok/toolhive-registry-server/pull/728 * Release v1.1.2 by @stacklokbot in https://github.com/stacklok/toolhive-registry-server/pull/730 **Full Changelog**: https://github.com/stacklok/toolhive-registry-server/compare/v1.1.1...v1.1.2 | High | 4/15/2026 |
| v1.1.1 | ## What's Changed * Fix integration test port contention by @blkt in https://github.com/stacklok/toolhive-registry-server/pull/704 * Improve commit messages by Claude by @blkt in https://github.com/stacklok/toolhive-registry-server/pull/705 * Update README with marketing and product feedback by @rdimitrov in https://github.com/stacklok/toolhive-registry-server/pull/706 * Update github actions by @renovate[bot] in https://github.com/stacklok/toolhive-registry-server/pull/707 * Update index.docker | High | 4/14/2026 |
| v1.1.0 | ## What's Changed * Add commit message conventions to agents by @blkt in https://github.com/stacklok/toolhive-registry-server/pull/698 * Add `WithSkipAuthz` to bypass claims filtering in auth-only mode by @blkt in https://github.com/stacklok/toolhive-registry-server/pull/697 * Refactor audit middleware to per-route annotation by @blkt in https://github.com/stacklok/toolhive-registry-server/pull/696 * Fix smoke-test skill for Compose v5 by @blkt in https://github.com/stacklok/toolhive-registry-se | High | 4/12/2026 |
| v1.0.2 | ## What's Changed * Fix underfilled pages in ListSources and ListRegistries by @lujunsan in https://github.com/stacklok/toolhive-registry-server/pull/688 * Add integration tests for authz gap coverage by @rdimitrov in https://github.com/stacklok/toolhive-registry-server/pull/689 * Stop pinning Go to patch versions, use stable in CI by @rdimitrov in https://github.com/stacklok/toolhive-registry-server/pull/693 * Add SIEM-compliant audit logging by @rdimitrov in https://github.com/stacklok/toolhiv | High | 4/11/2026 |
