mcp-gateway-worker
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-gateway-workerlist available tools"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Gateway Worker
Cloudflare Worker gateway that exposes MCP-compatible JSON-RPC (/mcp) and REST test endpoints (/tools, /tools/:name/call) over a single unified tool registry.
Live deployment
Worker URL:
https://mcp-gateway-worker.to-jamz.workers.devMCP endpoint:
https://mcp-gateway-worker.to-jamz.workers.dev/mcp
Related MCP server: Remote MCP Server with GitHub OAuth
Setup
pnpm install
pnpm wrangler secret put DOMAIN_SHARED_SECRET
pnpm devBuild and verify
pnpm install
pnpm build
pnpm testTargeted suites:
pnpm test:contract
pnpm test:validation
pnpm test:e2eDeploy to Cloudflare
pnpm wrangler login
pnpm wrangler secret put DOMAIN_SHARED_SECRET
pnpm wrangler deployProduction checklist before deploy:
Replace local values in
wrangler.toml(DOMAIN_A_URL,DOMAIN_B_URL,ALLOWED_ORIGINS).Replace
CLIENT_AUTH_TOKENand set least-privilegeCLIENT_ALLOWED_SCOPES.Confirm upstream domain workers are reachable from Cloudflare.
Environment and secrets
wrangler.toml local vars:
ENVIRONMENTDOMAIN_A_URLDOMAIN_B_URLALLOWED_ORIGINSAUTH_MODECLIENT_AUTH_TOKENCLIENT_ALLOWED_SCOPESUPSTREAM_TIMEOUT_MSREQUEST_BODY_MAX_BYTESTOOL_ARGUMENT_MAX_BYTES
Required secret:
DOMAIN_SHARED_SECRET
Authentication model
Client -> Gateway:
Authorization: Bearer <CLIENT_AUTH_TOKEN>(static-token mode).Gateway -> Domain workers:
Authorization: Bearer <DOMAIN_SHARED_SECRET>.Trusted scopes source:
CLIENT_ALLOWED_SCOPES(gateway does not trust raw scope headers directly for authorization).
Trust boundary
Gateway is the policy enforcement boundary for auth, scope checks, origin checks, and canonical error mapping.
Domain workers are upstream execution targets and are treated as untrusted for response shape (gateway validates upstream payloads).
Guardrails
Origin checks apply only when an
Originheader is present.Request and argument size limits are centralized via env-backed limits.
Upstream calls use timeout/retry handling and normalize exceptions to canonical
UPSTREAM_ERROR.
Endpoints
GET /health->{ "status": "ok", "environment": "..." }GET /tools-> unified tool catalogPOST /tools/:name/call-> REST tool invocationPOST /mcp-> MCP JSON-RPC (tools/list,tools/call)
Use this MCP from any IDE
Any IDE/editor MCP client that supports HTTP/JSON-RPC can connect to this endpoint:
URL:
https://mcp-gateway-worker.to-jamz.workers.dev/mcpMethod:
POSTHeader:
Authorization: Bearer <CLIENT_AUTH_TOKEN>Header:
Content-Type: application/json
Generic MCP client config shape:
{
"mcpServers": {
"mcp-gateway-worker": {
"transport": "http",
"url": "https://mcp-gateway-worker.to-jamz.workers.dev/mcp",
"headers": {
"Authorization": "Bearer <CLIENT_AUTH_TOKEN>"
}
}
}
}Quick connectivity test:
curl -s -X POST https://mcp-gateway-worker.to-jamz.workers.dev/mcp \
-H "Authorization: Bearer <CLIENT_AUTH_TOKEN>" \
-H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":"1","method":"tools/list","params":{}}'If your IDE uses a different MCP schema (for example command-based wrappers), map it to the same HTTP endpoint and headers above.
IDE-specific examples
The exact file path/key name can vary by IDE version, but these templates are the common setup patterns.
VS Code (MCP extension/client)
settings.json example:
{
"mcp.servers": {
"mcp-gateway-worker": {
"transport": "http",
"url": "https://mcp-gateway-worker.to-jamz.workers.dev/mcp",
"headers": {
"Authorization": "Bearer <CLIENT_AUTH_TOKEN>"
}
}
}
}Cursor
.cursor/mcp.json example:
{
"mcpServers": {
"mcp-gateway-worker": {
"transport": "http",
"url": "https://mcp-gateway-worker.to-jamz.workers.dev/mcp",
"headers": {
"Authorization": "Bearer <CLIENT_AUTH_TOKEN>"
}
}
}
}Windsurf
MCP config example:
{
"mcpServers": {
"mcp-gateway-worker": {
"transport": "http",
"url": "https://mcp-gateway-worker.to-jamz.workers.dev/mcp",
"headers": {
"Authorization": "Bearer <CLIENT_AUTH_TOKEN>"
}
}
}
}JetBrains AI Assistant / IDE MCP client
MCP server entry example:
{
"name": "mcp-gateway-worker",
"transport": "http",
"url": "https://mcp-gateway-worker.to-jamz.workers.dev/mcp",
"headers": {
"Authorization": "Bearer <CLIENT_AUTH_TOKEN>"
}
}If your IDE only supports command-based MCP launchers, create a tiny local proxy/wrapper that forwards to this HTTP endpoint with the same Authorization header.
Examples
curl -s http://127.0.0.1:8787/healthcurl -s http://127.0.0.1:8787/tools \
-H "Authorization: Bearer replace-me"curl -s -X POST http://127.0.0.1:8787/tools/sum/call \
-H "Authorization: Bearer replace-me" \
-H "content-type: application/json" \
-d '{"arguments":{"a":5,"b":7}}'curl -s -X POST http://127.0.0.1:8787/mcp \
-H "Authorization: Bearer replace-me" \
-H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":"1","method":"tools/list","params":{}}'Compatibility guard policy
Canonical MCP error payloads are treated as compatibility contracts.
tests/contract/mcp-errors.snapshot.test.tsenforces stableerror.code,error.data.error_code, and snapshot shape.Breaking payload changes require explicit contract/versioning updates and corresponding test updates.
Scripts
pnpm devpnpm buildpnpm testpnpm test:contractpnpm test:validationpnpm test:e2epnpm test:snapshots
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-quality-maintenanceA Cloudflare Workers-based implementation of Model Context Protocol (MCP) server that enables AI models like Claude to access custom tools without requiring authentication.Last updated
- Alicense-qualityDmaintenanceA Cloudflare Workers-deployed MCP server that provides secure remote access to MCP tools through GitHub OAuth authentication. Includes example tools for basic math operations, user info retrieval, and image generation with configurable user access controls.Last updated371Apache 2.0
- Alicense-qualityCmaintenanceA Cloudflare Workers MCP server that puts a SOC analyst's enrichment, investigation, and detection-context workflow behind a single endpoint. It aggregates over 20 threat-intel sources into 18 MCP tools for IP, domain, URL, hash, and CVE lookups.Last updatedMIT
- AlicenseAqualityAmaintenanceA zero-dependency MCP gateway: host your own tools, forward and curate tools from other MCP servers, expose them leanly to cut agent token cost, and gate every call through your own policy hooks before it runs.Last updated4041794MIT
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/jamalla/mcp-gateway-worker'
If you have feedback or need assistance with the MCP directory API, please join our Discord server