Railway

Deploy mcp-server-hub

One authenticated gateway for 5 MCP servers — one URL, one token

Deploy 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

Implementation Details

Configure the hub entirely through environment variables:

  • AUTH_TOKEN (required) — Bearer token every client must present; auto-generated by this template
  • ENABLED_SERVERSall, or a comma-separated list such as fetch,memory,github
  • PUBLIC_URL — your Railway public domain, used for the auth challenge and RFC 9728 metadata
  • GITHUB_TOKEN (optional) — enables the GitHub server
  • DATABASE_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

More templates in this category

View Template
Rocky Linux
[Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
31
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51