Skip to main content
Glama
CORS Doctor MCP Server

CORS Doctor MCP Server

_mcp-template-gated — MCP server template WITH the paywall gate baked in

This is the reusable factory template for every NEW MCP in the fleet. It is born with the server-side paywall gate already wired, so a new MCP can never again ship the premium tier for free (the bug that made conversion impossible on the first 10 servers).

The gate (the whole point)

  • src/mcpServer.ts — the locally-installed package. The FREE tier (deep=false) runs here. The PREMIUM tier (deep=true) does NOT run here: it is forwarded to the hosted /pro/run endpoint with Authorization: Bearer <KEY>. No key → an upsell (the premium is never executed for free).

  • src/server.ts — the hosted side. /pro/run is gated by two coexisting payment lanes:

    • x402 (USDC per call, for AI agents) via x402-express.

    • Stripe prepaid API key (for humans) — a valid Bearer key skips x402. The 402 body always shows BOTH lanes (pay_with_card_stripe + x402 accepts).

  • src/stripeLane.ts — Stripe Checkout → webhook mints an API key into KV.

  • src/kv.ts — Cloudflare KV (key store + funnel counters), degrades gracefully.

  • src/engine.ts — EXAMPLE engine. Replace run(input,{deep}) with the real logic. Keep the contract: deep=false cheap/local, deep=true premium/server-only.

Related MCP server: Browser Runtime MCP

Make a new MCP from this template

  1. Copy the folder: cp -r _mcp-template-gated <new-name>.

  2. Replace placeholders across the repo:

    • CORS Doctor → human name, e.g. dns-doctor

    • cors-doctor → npm/url slug, e.g. dns-doctor

    • SERVICE_KEY → the buyer's env var, e.g. DNS_DOCTOR_KEY (PowerShell one-liner is in the comment block of scripts/rename.txt.)

  3. In package.json/server.json/stripeLane.ts env defaults set:

    • STRIPE_KEY_PREFIX (e.g. dns_), STRIPE_PLAN_NAME, SERVICE_KEY_ENV, SERVICE_PRO_URL, homepage/PUBLIC_BASE_URL = the Vercel URL.

  4. Write the real engine.ts and the real tool schema/description in mcpServer.ts.

  5. npm install && npx tsc — must build clean.

Verify the gate (regla 7 — not done until this passes)

FORCE_LISTEN=true PORT=8899 PRO_API_KEYS=test_key X402_ENABLED=true node dist/server.js &
curl -s -o /dev/null -w "%{http_code}\n" "http://127.0.0.1:8899/run?target=x"                                  # 200 (free)
curl -s -o /dev/null -w "%{http_code}\n" "http://127.0.0.1:8899/pro/run?target=x"                              # 402 (no key)
curl -s -o /dev/null -w "%{http_code}\n" -H "Authorization: Bearer test_key" "http://127.0.0.1:8899/pro/run?target=x"  # 200 (paid key)
curl -s -o /dev/null -w "%{http_code}\n" -H "Authorization: Bearer wrong"    "http://127.0.0.1:8899/pro/run?target=x"  # 402 (bad key)

MCP stdio: deep=true without a key must print the UPSELL (never run premium); deep=false returns the local free result.

Production env (set in Vercel, sourced from config/)

STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, CLOUDFLARE_ACCOUNT_ID/API_TOKEN/KV_NAMESPACE_ID, optionally SERVICE_KEY. Everything degrades gracefully if a lane is unconfigured — the x402 gate + 402 always work even with no Stripe/KV. Never set the deep engine to run client-side.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    • Plausible MCP server for ChatGPT, Claude and any AI agent: list sites, get site stats, get top pages, get traffic sources, create site, add goal, create shared link and invite guest in your own Plausible account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Plausible yourself; Cotlet does not store your password and you need no Plausible API key. About the official Plausible API: Plausible has an official API, but a limited one (checked 22 Oct 2026). The Stats API only reads data and needs the Business plan, the Sites API that creates sites, goals and shared links is Enterprise only, and there is no official MCP server. Setup and FAQ: https://cotlet.dev/integrations/plausible-api-mcp-server

    • Toast MCP server for ChatGPT, Claude and any AI agent: list menus, list menu items, 86 a menu item, set menu hours, get sales summary, list time entries, fix time entry and create shift in your own Toast account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Toast yourself; Cotlet does not store your password and you need no Toast API key. About the official Toast API: Toast has an API, but the access a restaurant creates for itself is read-only (checked 28 Oct 2026). Standard API access needs Restaurant Management Suite (RMS) Essentials or higher and the Manage Integrations permission, and it cannot write. Setup and FAQ: https://cotlet.dev/integrations/toast-api-mcp-server

      https://cotlet.dev/mcp/v1/toast
    • Procore MCP server for ChatGPT, Claude and any AI agent: list RFIs, create RFI, list submittals, create punch list item, create observation and add manpower entry in your own Procore account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Procore yourself; Cotlet does not store your password and you need no Procore API key. About the official Procore API: Procore has a REST API with OAuth 2.0 and a sandbox, but publishes no MCP server for your own AI agent (checked 5 Nov 2026). The API runs through an app that you register in the Developer Portal and a company admin installs. Setup and FAQ: https://cotlet.dev/integrations/procore-api-mcp-server

      https://cotlet.dev/mcp/v1/procore
    • Anaplan MCP server for ChatGPT, Claude and any AI agent: list models, list actions, upload import file, run import, run process, run export, get model history and add user in your own Anaplan account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Anaplan yourself; Cotlet does not store your password and you need no Anaplan API key. About the official Anaplan API: Yes. Anaplan has an official REST API, the Integration API v2.0, and an official MCP server, the Anaplan AI Gateway, but Anaplan's help says the AI Gateway gives external AI systems read-only access (checked 5 Nov 2026). Setup and FAQ: https://cotlet.dev/integrations/anaplan-api-mcp-server

      https://cotlet.dev/mcp/v1/anaplan

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables security scanning of code projects to identify common vulnerabilities like XSS, injections, SSRF, and path traversal issues. Provides local, offline scanning with severity-grouped results and actionable fix suggestions for improving code security.
      38 npm
      -
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to monitor and debug browser runtime errors, console logs, and page diagnostics in real time via a Chrome extension and local MCP server.
      4
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables token counting, usage tracking, and cost calculation for LLM APIs, with a proxy server mode to automatically intercept and monitor API requests from clients like Cursor and Windsurf.
      15 npm
      1
      MIT