Railway
Deploy your xmcp application to Railway.
For the complete documentation index, see llms.txt. Markdown variants of every page are available by appending .md to the URL.Railway can run your xmcp server as a Node.js service, exposing your tools over Streamable HTTP.
Start with an existing standalone xmcp project or create one with pnpm create xmcp-app@latest, choosing HTTP transport. The HTTP transport example demonstrates the server and build scripts used here.
Configure your server
Set the HTTP host to 0.0.0.0 so Railway can reach your server:
Keep your existing tools and other configuration. The default HTTP port is 3001 and the default MCP endpoint is /mcp.
Ensure your package.json includes these scripts and Node.js version, then commit your project and lockfile to GitHub:
The build requires the @xmcp-dev/compiler development dependency included by the scaffolder. Install development dependencies during the build.
Deploy from GitHub
- Create a project at railway.com/new, select Deploy from GitHub repo, and choose your repository.
- In the service's Variables, set
PORTto3001and add any environment variables your tools need. This matches xmcp's default HTTP port. If you configure a differenthttp.port, use that value forPORTand rebuild; the HTTP port is compiled into the server. - In Settings, use
pnpm run buildas the build command andnode dist/http.jsas the start command. Railway detects Node.js and installs dependencies using your lockfile. For a project using npm, usenpm run buildinstead. - Set the healthcheck path to
/health, xmcp's built-in health endpoint, and deploy the service. - Under Settings → Networking, select Generate Domain. If prompted for a target port, use the same value as
PORT.
Your MCP endpoint is https://<your-domain>/mcp. If you customized http.endpoint, use that path instead. Add this URL to an MCP client to list and call your tools.
You can also check that the server is running with:
Learn more in Railway's Node.js deployment guide and healthcheck documentation.
