How do I host my existing MCP server on CMD+K?
Open MyMCP → New deployment → 'Host an existing MCP server'. Paste the public URL of your running MCP server (Anthropic TypeScript SDK, FastMCP, custom). CMD+K runs a handshake to discover its tools, then proxies all client traffic through mcp.commandplusk.com/<slug>, adding OAuth consent, end-user attribution, analytics, and metered billing on top — without changing your origin code.
What do I need?
- A running MCP server reachable over HTTPS.
- Whether end-users should authenticate, and if so how.
- A CMD+K workspace.
Step-by-step
- Make your MCP server publicly reachable. Deploy it anywhere with an HTTPS URL (Cloudflare Workers, Vercel, Fly, your own host). It must respond to standard MCP-over-HTTP.
- Open the new-deployment wizard. Dashboard → MyMCP → New deployment → 'Host an existing MCP server'.
- Paste the origin URL. e.g. https://my-mcp.example.com/. We run a tools/list handshake and show the discovered tools.
- Choose how end-users authenticate to your origin. Pass-through (no auth), shared secret header, or per-end-user OAuth with our consent UI in front.
- Publish. We assign the slug, mount the gateway, and the public URL is live.
How do I lock my origin to gateway-only traffic?
Generate a shared secret in the deployment settings. The gateway sends it on every proxied request as X-CMDK-Shared-Secret. Reject anything without it at your origin:
ts
// At your MCP origin
if (req.headers.get("x-cmdk-shared-secret") !== process.env.CMDK_SHARED_SECRET) {
return new Response("Forbidden", { status: 403 });
}Next steps
FAQ
- Does my origin code need to change?
- No. The gateway is a transparent reverse proxy that speaks standard MCP-over-HTTP. Your server keeps its own URL and you keep deploying as before.
- What does the gateway add?
- Public URL on mcp.commandplusk.com/<slug> (or your domain), OAuth consent UI for end-users, per-tool analytics, per-widget allowlists, metered billing, and rate limits.
- Can I keep my origin private?
- Yes. Lock down your origin to accept only requests with a shared secret header that CMD+K injects; everyone else gets a 403 from your origin.
- Does the gateway add latency?
- One extra hop. Typical added latency is 20–60ms depending on origin region. The analytics dashboard shows the breakdown per call.