npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cmsmcp/gateway

v0.3.2

Published

Universal REST API gateway for CMS MCP Hub — exposes all MCP tools as HTTP endpoints with OpenAPI spec, works with ChatGPT, Gemini, n8n, LangChain, and any HTTP client

Downloads

26

Readme

@cmsmcp/gateway

Universal REST API gateway for CMS MCP Hub -- exposes all MCP tools as HTTP endpoints with auto-generated OpenAPI spec and a web dashboard.

npm version License: MIT

Works with: ChatGPT, Gemini, Python, n8n, Make, Zapier, LangChain, cURL, Postman, and any HTTP client.

Quick Start

npx @cmsmcp/gateway

The gateway spawns MCP servers as child processes, discovers all their tools via the MCP protocol, and exposes them as standard REST endpoints. It auto-generates an OpenAPI 3.0 spec and serves a web dashboard for browsing and testing tools.

Configuration

Option 1: gateway.json

Create a gateway.json file in your working directory:

{
  "port": 3777,
  "apiKey": "your-secret-key",
  "servers": [
    {
      "name": "wordpress",
      "command": "npx",
      "args": ["-y", "@cmsmcp/wordpress"],
      "env": {
        "WORDPRESS_URL": "https://yoursite.com",
        "WORDPRESS_USERNAME": "admin",
        "WORDPRESS_APP_PASSWORD": "xxxx xxxx xxxx"
      }
    },
    {
      "name": "shopify",
      "command": "npx",
      "args": ["-y", "@cmsmcp/shopify"],
      "env": {
        "SHOPIFY_STORE": "mystore",
        "SHOPIFY_ACCESS_TOKEN": "shpat_xxx"
      }
    }
  ]
}

Option 2: Environment Variables

| Variable | Default | Description | |----------|---------|-------------| | GATEWAY_CONFIG | gateway.json | Path to config file | | GATEWAY_PORT | 3777 | HTTP port | | GATEWAY_API_KEY | cmsmcp-dev-key | API key for authentication | | GATEWAY_BASE_URL | http://localhost:{port} | Public base URL |

Auto-detected CMS environment variables (no gateway.json needed):

| Variables | Auto-adds | |-----------|-----------| | WORDPRESS_URL + WORDPRESS_USERNAME | WordPress MCP server | | WOOCOMMERCE_URL + WOOCOMMERCE_CONSUMER_KEY | WooCommerce MCP server |

API Endpoints

| Method | URL | Description | |--------|-----|-------------| | GET | / | Web dashboard -- browse and test all tools | | GET | /health | Server health status | | GET | /openapi.json | OpenAPI 3.0 spec (import into Postman, Swagger UI, etc.) | | GET | /api/tools | List all available tools across all connected servers | | POST | /api/{server}/{tool} | Execute any tool with JSON body parameters |

Authentication

All /api/* endpoints require the X-API-Key header:

curl -H "X-API-Key: your-secret-key" http://localhost:3777/api/tools

Examples

List WordPress posts

curl -X POST http://localhost:3777/api/wordpress/wp_list_posts \
  -H "X-API-Key: your-key" \
  -H "Content-Type: application/json" \
  -d '{"per_page": 5}'

Create a Shopify product

curl -X POST http://localhost:3777/api/shopify/shopify_create_product \
  -H "X-API-Key: your-key" \
  -H "Content-Type: application/json" \
  -d '{"title": "New Product", "body_html": "<p>Description</p>", "vendor": "MyStore"}'

Get WooCommerce store dashboard

curl -X POST http://localhost:3777/api/woocommerce/woo_store_dashboard \
  -H "X-API-Key: your-key" \
  -H "Content-Type: application/json" \
  -d '{}'

Use with Python

import requests

BASE = "http://localhost:3777"
HEADERS = {"X-API-Key": "your-key", "Content-Type": "application/json"}

# List all tools
tools = requests.get(f"{BASE}/api/tools", headers=HEADERS).json()

# Call a tool
result = requests.post(
    f"{BASE}/api/wordpress/wp_list_posts",
    headers=HEADERS,
    json={"per_page": 10}
).json()

Architecture

HTTP Client / Dashboard
        |
   [ Gateway ]  (:3777)
    /    |    \
  MCP   MCP   MCP    (stdio child processes)
   |     |     |
  WP  Shopify  Woo

The gateway communicates with each MCP server over stdio, translating HTTP requests into MCP tool calls and returning the results as JSON.

Development

# Build
npx turbo build --filter=@cmsmcp/gateway

# Test
npx turbo test --filter=@cmsmcp/gateway

# Dev mode (watch)
npx turbo dev --filter=@cmsmcp/gateway

# Run locally
node packages/gateway/dist/index.js

License

MIT