MCP Directory

Railway MCP Server

Community server to manage Railway.app projects, services, and deployments via your agent.

Verified
stdio (local)
API key
TypeScript

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
npx -y @jasontanswe/railway-mcp

Paste 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)

configure

Set or update the Railway API token for the session.

project-list

List all projects on your Railway account.

project-info

Get details and environments for a specific project.

project-create

Create a new Railway project.

project-delete

Delete a project.

service-list

List the services within a project.

service-create-from-repo

Deploy a new service from a GitHub repository.

service-create-from-image

Deploy a new service from a Docker image.

service-update

Update a service's configuration (e.g. build/start commands, region).

service-restart

Restart a running service in a given environment.

deployment-trigger

Trigger a new deployment for a service.

deployment-logs

Fetch logs for a specific deployment.

variable-set

Set or update an environment variable on a service.

variable-bulk-set

Set multiple environment variables at once.

database-deploy

Deploy 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

  1. 1Generate a Railway API token at railway.app/account/tokens.
  2. 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).
  3. 3Alternatively run `npx -y @smithery/cli install @jason-tan-swe/railway-mcp --client claude` to auto-configure Claude Desktop.
  4. 4Restart your MCP client so it picks up the new server.
  5. 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.

Featured
Verified
stdio (local)
API key
Go
7 tools
Updated 3 days agoRepo

Official AWS Labs server that lets agents call any AWS API via the AWS CLI surface.

Verified
stdio (local)
API key
Python
3 tools
Updated 5 days agoRepo

Grafana's official server for dashboards, Prometheus/Loki queries, alerts, and incidents.

Verified
stdio (local)
API key
Go
18 tools
Updated 6 days agoRepo