Deploy MCP Proxy
Run stdio MCP servers as remote Streamable HTTP/SSE endpoints with a token
MCP Proxy
Just deployed
/data
Deploy and Host MCP Proxy on Railway
MCP Proxy (sparfenyuk/mcp-proxy) is an open-source bridge between MCP transports. It starts stdio-only Model Context Protocol servers and serves each one to remote AI clients over Streamable HTTP and SSE. This template runs it as one always-on endpoint with three servers built in (fetch, time and memory), locked behind a generated bearer token.
About Hosting MCP Proxy
Most MCP servers only speak stdio, so they normally run on your own machine, next to the client. Hosting MCP Proxy turns them into URLs that any client can reach: Claude Code, Cursor, VS Code, agent platforms or a teammate's laptop. This template builds MCP Proxy v0.15.0 (official image, pinned by digest) from a public GitHub repo. A small Caddy front listens on Railway's port and answers the health check; MCP Proxy itself listens on loopback and rejects any request without the token. A volume at /data keeps the memory server's knowledge graph and the npx/uvx package cache, so restarts and redeploys keep your data and don't download packages again.
Common Use Cases
- Give remote clients and hosted agents access to stdio-only MCP servers through one HTTPS URL per server
- Share one set of MCP tools (web fetch, time, a persistent knowledge-graph memory) across several machines or teammates
- Run your own npx or uvx MCP servers in the cloud by pasting a standard mcpServers JSON into one variable
Dependencies for MCP Proxy Hosting
- One service built from github.com/aalfath/mcp-proxy-railway-template (MCP Proxy, Python 3.13 and Node.js 24, plus a Caddy front)
- One Railway volume mounted at /data
Deployment Dependencies
- MCP Proxy source and docs: https://github.com/sparfenyuk/mcp-proxy
- Release v0.15.0: https://github.com/sparfenyuk/mcp-proxy/releases/tag/v0.15.0
- Bundled reference servers: https://github.com/modelcontextprotocol/servers
- Template repo and changelog: https://github.com/aalfath/mcp-proxy-railway-template
Implementation Details
What you get: one service, MCP Proxy, with a public Railway domain. Nothing to fill in at deploy time: MCP_PROXY_AUTH_TOKEN is generated for you.
After deploy: open the service's Variables tab and copy MCP_PROXY_AUTH_TOKEN. Each server has two endpoints:
- Streamable HTTP:
https://YOUR-DOMAIN/servers/NAME/mcp - SSE:
https://YOUR-DOMAIN/servers/NAME/sse
with NAME = fetch, time or memory. Client config (Claude Code, Cursor, VS Code and other clients that accept headers):
{
"mcpServers": {
"railway-fetch": {
"type": "http",
"url": "https://YOUR-DOMAIN/servers/fetch/mcp",
"headers": { "Authorization": "Bearer YOUR-TOKEN" }
}
}
}
Claude Code: claude mcp add --transport http railway-fetch https://YOUR-DOMAIN/servers/fetch/mcp --header "Authorization: Bearer YOUR-TOKEN"
Your own servers: add a MCP_SERVERS_JSON variable with a standard {"mcpServers": {...}} object (command, args, env); it replaces the bundled set. Pin package versions. Servers get only HOME, PATH and their own env unless you set MCP_PROXY_PASS_ENVIRONMENT=true. Servers that need Docker can't run here (no Docker-in-Docker); use their npx or uvx package.
Health and restarts: /healthz answers without a token; every other path, including /status, needs it. If MCP Proxy or a running server stops, the service exits with an error and Railway restarts it.
Resources: about 215 MB RAM with the three bundled servers, so it fits the Free plan's 0.5 GB. Each extra server adds about 40 to 120 MB.
Updates: the service builds from the template repo. When we publish a new MCP Proxy release or new server pins, Railway shows you an "update available" notice; read CHANGELOG.md in the repo, then apply it when you're ready.
Why Deploy MCP Proxy 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 Proxy 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 Proxy
aalfath/mcp-proxy-railway-template
