Skip to main content
Glama
Superman

MCP Server + Private Registry

by Superman

MCP Server + Private Registry

A TypeScript project with two components:

  1. MCP Server — a fetch_url tool that lets AI clients make HTTP requests

  2. Private MCP Registry — a REST API implementing the official MCP Registry OpenAPI spec for hosting your own server metadata


Setup

Requires conda and Node.js 22 (provided via the conda environment).

conda env create -f environment.yml
conda activate mcp
npm install
npm run build

MCP Server

A simple MCP server exposing one tool: fetch_url.

Tool: fetch_url

Parameter

Type

Required

Description

url

string (URL)

Yes

The URL to fetch

method

GET | POST

No

HTTP method (default: GET)

headers

object

No

Key-value request headers

body

string

No

Request body (POST only)

Run:

npm start

Test with MCP Inspector:

npx @modelcontextprotocol/inspector node dist/index.js
# Open http://localhost:6274

Add to Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "fetch": {
      "command": "node",
      "args": ["/path/to/mcp/dist/index.js"]
    }
  }
}

Note: Logs go to stderr — never stdout — to avoid corrupting the stdio JSON-RPC channel.


Private MCP Registry

A Hono-based HTTP server implementing the MCP Registry OpenAPI spec. Stores server metadata in a local SQLite database (via Node.js 22's built-in node:sqlite).

Environment Variables

Variable

Required

Description

REGISTRY_JWT_SECRET

Yes

Secret used to sign/verify JWT tokens

PORT

No

HTTP port (default: 3000)

REGISTRY_DB_PATH

No

SQLite file path (default: registry.db)

Quick Start

# 1. Generate an admin token (save this securely)
REGISTRY_JWT_SECRET=your-secret npm run generate-token

# 2. Start the registry
REGISTRY_JWT_SECRET=your-secret npm run registry

API Endpoints

Method

Path

Auth

Description

GET

/

No

Health check

GET

/v0.1/servers

No

List/search servers

GET

/v0.1/servers/:name/versions

No

List all versions of a server

GET

/v0.1/servers/:name/versions/:version

No

Get a specific version (latest supported)

POST

/v0.1/publish

JWT

Publish or update a server

PUT

/v0.1/servers/:name/versions/:version

JWT

Upsert a specific version

DELETE

/v0.1/servers/:name/versions/:version

JWT

Delete a version

Query params for GET /v0.1/servers: search, cursor, limit, updated_since

Example Usage

TOKEN="<your-generated-token>"

# Publish a server
curl -X POST http://localhost:3000/v0.1/publish \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "io.example/fetch-server",
    "version": "1.0.0",
    "description": "HTTP fetch MCP server",
    "repository": "https://github.com/example/fetch-server"
  }'

# List all servers
curl http://localhost:3000/v0.1/servers

# Get latest version (/ in name must be URL-encoded as %2F)
curl "http://localhost:3000/v0.1/servers/io.example%2Ffetch-server/versions/latest"

# Search
curl "http://localhost:3000/v0.1/servers?search=fetch"

# Delete a version
curl -X DELETE \
  -H "Authorization: Bearer $TOKEN" \
  "http://localhost:3000/v0.1/servers/io.example%2Ffetch-server/versions/1.0.0"

Server Name Format

Server names follow reverse-DNS convention: io.github.username/server-name or com.example/server-name. When used in URL path parameters, the / must be encoded as %2F.


Project Structure

src/
├── index.ts                  # MCP server entry point
└── registry/
    ├── index.ts              # Registry HTTP server entry point
    ├── db.ts                 # SQLite schema and query helpers
    ├── auth.ts               # JWT Bearer middleware
    ├── types.ts              # TypeScript types (OpenAPI spec)
    ├── generate-token.ts     # Admin JWT generator
    └── routes/
        ├── servers.ts        # GET endpoints
        └── publish.ts        # POST / PUT / DELETE endpoints
plans/
└── PLAN.md                   # Implementation plan

Tech Stack

  • Runtime: Node.js 22 (via conda)

  • Language: TypeScript 5

  • MCP SDK: @modelcontextprotocol/sdk

  • HTTP Framework: Hono

  • Database: node:sqlite (Node.js 22 built-in, experimental)

  • Auth: jose (JWT HS256)

-
security - not tested
F
license - not found
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Superman/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server