Skip to main content
Glama
KonghaYao

mcp-skills-registry

by KonghaYao

monorepo – MCPP Aggregation Server Example

Demonstrates the monorepo topology of MCPP 3.7: a single HTTP endpoint, with path routing to sub servers.

Shape

                    ┌─────────────────────────────────────────────┐
  客户端             │ monorepo(单一 HTTP server,端口 8787)      │
                    │                                             │
  /openspec/mcp   ──► OpenSpec skills sub server                  │
  /mattpocock/mcp ──► Matt Pocock skills sub server               │
  其他路径         ──► 404                                         │
                    └─────────────────────────────────────────────┘
  • Each path is an independent MCP endpoint; skills, resources, and sessions are isolated from each other.

  • src/registry.ts is the single route registry shared by the local entry point, Cloudflare Worker, and tests.

  • stdio has no URL/path concept, so it is not suitable for this aggregation form.

Related MCP server: MCP Skill Registry

Initialization

bun run init

This command installs dependencies, reproduces third-party skills according to skills.lock.json, and generates a static registry that can be bundled into the Worker.

Common Commands

bun dev                     # 构建 skills 后启动 http://127.0.0.1:8787/
bun run demo                # 端到端 smoke 测试
bun run skills:sync         # 按 lock 同步第三方 skills
bun run skills:update       # 更新第三方 commit 并重新生成 registry
bun run deploy:dry-run      # 验证 Cloudflare Worker bundle
bun run deploy              # 部署 Cloudflare Worker

Directory Structure

├── src/
│   ├── index.ts                 # 本地网关和纯 fetch handler
│   ├── registry.ts              # 唯一 sub server 注册表
│   └── static-skills.ts         # 静态 skills resource 挂载器
├── servers/
│   ├── openspec/
│   │   ├── server.ts
│   │   ├── skills/              # 生成、Git ignored
│   │   └── skills.generated.ts  # 生成、Git ignored
│   └── mattpocock/
│       ├── server.ts
│       ├── skills/              # 生成、Git ignored
│       └── skills.generated.ts  # 生成、Git ignored
├── install-skills.js            # manifest + lock 同步器
├── generate-skills-registry.js  # 静态 registry 生成器
├── skills.json                  # source 声明
├── skills.lock.json             # 锁定 commit,提交进 Git
├── test/smoke.ts
├── worker.ts
└── wrangler.jsonc

Reproducible Skills Build

skills.json + skills.lock.json
            │
            ▼
     install-skills.js
            │ copy 锁定 commit
            ▼
 servers/<id>/skills/
            │
            ▼
generate-skills-registry.js
            │
            ▼
servers/<id>/skills.generated.ts
            │ static import
            ▼
      Bun / Worker bundle

Neither the generated directory nor the generated registry are committed; a fresh clone fully restores them via bun run init. The sub server does not read node:fs at runtime, so the Worker bundle will include the SKILL.md content.

Cloudflare Deployment

bun run deploy:dry-run
bun run deploy

The session registry is in isolated memory; for production with multiple concurrent instances, session state must be externalized to Durable Objects.

Related MCP Connectors

Related MCP Servers