
Railway MCP Server
Community server to manage Railway.app projects, services, and deployments via your agent.
Add to your client
Copy the config for your MCP client and paste it into its config file.
npx -y @jasontanswe/railway-mcpPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"railway-mcp-server": {
"command": "npx",
"args": [
"-y",
"@jasontanswe/railway-mcp"
],
"env": {
"RAILWAY_API_TOKEN": "<your-railway-api-token>"
}
}
}
}Before you start
- Node.js 18+ (required for the built-in fetch API)
- An active Railway account
- A Railway API token, created at railway.app/account/tokens (an account- or team-scoped token)
- An MCP-capable client such as Claude Desktop, Cursor, Cline, or Windsurf
About Railway MCP Server
Railway MCP Server is a community-built server that connects an MCP client (Claude Desktop, Cursor, Cline, Windsurf) to the Railway.app platform API. It lets your agent manage Railway infrastructure conversationally: create and inspect projects, deploy services from a GitHub repo or a Docker image, manage environment variables, trigger deployments, and tail deployment logs.
The server runs locally over stdio and talks to Railway's GraphQL API using a personal API token. Tool names follow a noun-verb convention grouped by resource (projects, services, deployments, variables, databases), so an agent can walk from project-list down to a specific deployment-logs call.
It is distributed as the npm package @jasontanswe/railway-mcp and can be installed manually or via Smithery. It is not an official Railway product, but it is actively maintained and documented for use with Claude Desktop and Cursor.
Tools & capabilities (15)
configureSet or update the Railway API token for the session.
project-listList all projects on your Railway account.
project-infoGet details and environments for a specific project.
project-createCreate a new Railway project.
project-deleteDelete a project.
service-listList the services within a project.
service-create-from-repoDeploy a new service from a GitHub repository.
service-create-from-imageDeploy a new service from a Docker image.
service-updateUpdate a service's configuration (e.g. build/start commands, region).
service-restartRestart a running service in a given environment.
deployment-triggerTrigger a new deployment for a service.
deployment-logsFetch logs for a specific deployment.
variable-setSet or update an environment variable on a service.
variable-bulk-setSet multiple environment variables at once.
database-deployDeploy a database (e.g. Postgres, MySQL, Redis, Mongo) into a project.
When to use it
- Use it when you want to spin up a new Railway service from a GitHub repo or Docker image without leaving your editor.
- Use it when you need to set, copy, or bulk-update environment variables across services and environments.
- Use it when you want your agent to trigger a deployment and then tail the deployment logs to debug a failure.
- Use it when you need to provision a managed database (Postgres, Redis, MySQL, Mongo) into an existing project.
- Use it when you want to audit your projects, services, and environments programmatically through an agent.
Quick setup
- 1Generate a Railway API token at railway.app/account/tokens.
- 2Add the server to your client config, e.g. command `npx` with args `-y @jasontanswe/railway-mcp` and `RAILWAY_API_TOKEN` set in the env block (Cursor accepts the token as a trailing CLI arg).
- 3Alternatively run `npx -y @smithery/cli install @jason-tan-swe/railway-mcp --client claude` to auto-configure Claude Desktop.
- 4Restart your MCP client so it picks up the new server.
- 5Verify by asking the agent to run `project-list`, or call `configure` to set the token if you did not pass it via env.
Security notes
The Railway API token grants control over your projects and deployments, so generate a dedicated token and revoke it if exposed. This is an unofficial community project, so review the source before granting production access.
Railway MCP Server FAQ
Where do I get the Railway API token?
Create one at railway.app/account/tokens. You can use an account token or a team/project-scoped token; the server reads it from the RAILWAY_API_TOKEN environment variable (or via the configure tool).
Is this an official Railway server?
No. It is a community project (npm package @jasontanswe/railway-mcp) and is not maintained by Railway itself, though it uses Railway's public API.
Which clients does it work with?
It is documented and tested with Claude Desktop and Cursor, with Cline and Windsurf listed as supported but less battle-tested. Any stdio MCP client should work.
Why do I get a Node fetch or undefined error on startup?
The server relies on the built-in fetch API, so you need Node.js 18 or newer. Upgrade Node if you see fetch-related runtime errors.
Alternatives to Railway MCP Server
GitHub's official server for repos, issues, PRs, and Actions — local Docker or hosted remote.
Official AWS Labs server that lets agents call any AWS API via the AWS CLI surface.
Grafana's official server for dashboards, Prometheus/Loki queries, alerts, and incidents.
Compare Railway MCP Server with: