Deploy mcp-server-hub
One authenticated gateway for 5 MCP servers — one URL, one token
mcp-server-hub
Just deployed
Deploy and Host mcp-server-hub on Railway
mcp-server-hub is a production-ready, stateless Model Context Protocol (MCP) gateway. It hosts five MCP servers — web fetch, shared memory, GitHub, Postgres, and utilities — behind a single authenticated Streamable HTTP endpoint, giving AI agents like Claude, Cursor, and custom clients instant tool access with one Bearer token.
About Hosting mcp-server-hub
Hosting mcp-server-hub means running one always-on HTTP service that multiplexes several MCP servers behind a single URL and auth token. Railway builds it straight from the included multi-stage, non-root Dockerfile, injects a generated AUTH_TOKEN, and exposes a public HTTPS domain with a /health healthcheck. Because the hub is fully stateless — no sessions, no sticky routing — any replica can serve any request, so you can scale horizontally with zero extra configuration. Optional persistent memory and read-only Postgres access are toggled purely through environment variables. Set PUBLIC_URL to your Railway domain so the RFC 9728 auth metadata advertises the correct address to clients.
Common Use Cases
- Give Claude, Cursor, LibreChat, or a custom agent one endpoint for web fetch, memory, GitHub, and Postgres tools
- Shared team tool server: one deploy, one token, many AI clients
- Backend MCP infrastructure for an AI product or internal automation workflow
Dependencies for mcp-server-hub Hosting
- Node.js 20+ runtime (provided automatically by the Docker build)
- An MCP-compatible client and the official
@modelcontextprotocol/sdk
Deployment Dependencies
- MCP specification: https://modelcontextprotocol.io/specification
- Source repository: https://github.com/KbnCodes/mcp-server-hub
- npm package: https://www.npmjs.com/package/@kbncodes/mcp-server-hub
Implementation Details
Configure the hub entirely through environment variables:
AUTH_TOKEN(required) — Bearer token every client must present; auto-generated by this templateENABLED_SERVERS—all, or a comma-separated list such asfetch,memory,githubPUBLIC_URL— your Railway public domain, used for the auth challenge and RFC 9728 metadataGITHUB_TOKEN(optional) — enables the GitHub serverDATABASE_URL(optional) — enables the read-only Postgres server
Connect any MCP client by pointing it at https://.up.railway.app/ with the header:
Authorization: Bearer
Why Deploy mcp-server-hub on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying mcp-server-hub on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
mcp-server-hub
KbnCodes/mcp-server-hub