Skip to content

Toolbase-AI/mcp-subregistry

Repository files navigation

🚀 MCP Subregistry

Self-hostable MCP registry / subregistry synced with the official MCP Registry or any registry.

Built on Cloudflare Workers for edge performance, with Drizzle ORM and D1 for SQLite persistence.

License: MIT TypeScript Cloudflare Workers

Deploy to Cloudflare

✨ Features

  • 🌍 Spec-Compliant: 100% implements the official MCP Registry API (OpenAPI 2025-09-29)
  • Edge Performance: Deployed on Cloudflare Workers for <50ms response times globally
  • 🔄 Auto-Sync: Automatically syncs from the official MCP registry daily
  • 🎨 Extensible Metadata: Add custom fields using reverse-DNS namespacing
  • 🔒 Self-Hostable: Deploy your own private registry in minutes
  • 🗄️ SQLite Database: Powered by Cloudflare D1 with Drizzle ORM
  • 📦 Version Support: Track and serve multiple versions of each MCP server

🚀 Quick Start

Prerequisites

  • Node.js 22+ and pnpm
  • Cloudflare account (sign up free)
  • Wrangler CLI (npm install -g wrangler)

Installation

# Clone the repository
git clone https://github.com/yourusername/mcp-subregistry
cd mcp-subregistry

# Install dependencies
pnpm install

# Environment Setup
cp .env.example .env

# Create D1 database
wrangler d1 create mcp-registry

# Update wrangler.jsonc with the database ID from the previous command
# database_id = "your-database-id-here"

# Generate database migrations
pnpm db:generate

# Run migrations for local SQLite development
pnpm db:migrate:dev

# Run migrations for production
pnpm db:migrate:prod

# Start development server
pnpm dev

Deploy to Cloudflare

Deploy to Cloudflare

or

# Run migrations in production
pnpm db:migrate:prod

# Deploy to production
pnpm deploy

Your API will be available at: https://mcp-subregistry.{your-subdomain}.workers.dev

🔧 Configuration

Environment Variables

Optional environment variables can be configured in .env:

Variable Description Required Default
REGISTRY_ADMIN_SECRET Secret token to be used to make admin requests Yes -
CLOUDFLARE_ACCOUNT_ID Your Cloudflare Account ID. Only used for connecting to your D1 with drizzle-kit studio. No -
CLOUDFLARE_DATABASE_ID Your remote Cloudflare D1 database ID. Only used for connecting to your D1 with drizzle-kit studio. No -
CLOUDFLARE_D1_TOKEN Your Cloudflare access token with D1 edit permissions. Only used for connecting to your D1 with drizzle-kit studio. No -

🏗️ Architecture

┌─────────────────────────────────────┐
│  Official MCP Registry (GitHub)     │
└────────────────┬────────────────────┘
                 │ Daily Sync (Cron)
                 ↓
┌─────────────────────────────────────┐
│  MCP Subregistry API                │
│  (Cloudflare Workers + D1)          │
│                                     │
│  - Hono Framework                   │
│  - Drizzle ORM                      │
│  - SQLite (D1)                      │
└────────────────┬────────────────────┘
                 │ REST API
                 ↓
        ┌────────────────┐
        │  MCP Clients   │
        │  (ChatGPT,     │
        │   Claude, etc) │
        └────────────────┘

🛠️ Development

# Install dependencies
pnpm install

# Start dev server
pnpm dev

# Generate Drizzle migrations
pnpm db:generate

# Run migrations locally
pnpm db:migrate:dev

# Run migrations in production
pnpm db:migrate:prod

# Open Drizzle Studio (database GUI)
pnpm db:studio

# Type checking
pnpm typecheck

🏢 Production Usage

This registry powers Toolbase, serving 500+ MCP servers to thousands of developers.

Managed Hosting

Don't want to self-host? Use our managed registry at Toolbase:

  • ✅ Zero setup
  • ✅ Automatic scaling
  • ✅ Built-in CDN
  • ✅ Advanced analytics

Sign Up Free →

📄 License

MIT © Toolbase

🔗 Links

⭐ Star History

Star History Chart


Built with ❤️ by the Toolbase team

About

Self-hostable MCP registry / subregistry synced with the official MCP registry (or any registry)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published