home / mcp / railway mcp server

Railway MCP Server

An unofficial and community-built MCP server for integrating with https://railway.app

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jason-tan-swe-railway-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@jasontanswe/railway-mcp",
        "<RAILWAY_API_TOKEN>"
      ],
      "env": {
        "RAILWAY_API_TOKEN": "<RAILWAY_API_TOKEN>"
      }
    }
  }
}

You can manage Railway.app infrastructure through an MCP server that lets you authenticate with Railway API tokens, manage projects and deployments, run services from GitHub or Docker images, and handle variables and networks directly from MCP clients. This guide shows how to install and use the Railway MCP Server with supported MCP clients, so you can orchestrate Railway resources via simple commands.

How to use

This MCP server exposes a set of commands you can run through compatible MCP clients to manage Railway resources. Typical workflows include authenticating with your Railway API token, listing and inspecting projects, creating or managing services from repositories or images, handling environment variables, and restarting deployments. You can invoke the server using an MCP client that runs a local command, or configure a client to launch the MCP with the provided CLI wrapper.

How to install

Prerequisites. Ensure you have Node.js 18 or newer installed and an active Railway account with an API token.

Install via MCP client helpers. The following commands show how to install and run the Railway MCP Server through popular MCP clients.

npx -y @smithery/cli install @jason-tan-swe/railway-mcp --client claude

For Cursor, run the MCP server with your Railway API token in the config string.

npx -y @smithery/cli@latest run @jason-tan-swe/railway-mcp --config "{\"railwayApiToken\":\"token\"}"

Manual installation notes

If you prefer to install manually for Cursor, you can run the MCP server using this command pattern with your token.

npx -y @jasontanswe/railway-mcp <RAILWAY_API_TOKEN>

Claude specific setup (config via MCP client)

To configure Railway MCP within Claude for Desktop, you can add the MCP server via the client’s configuration, using the following structure to provide the API token.

{
  "railway": {
    "command": "npx",
    "args": ["-y", "@jasontanswe/railway-mcp"],
    "env": {
      "RAILWAY_API_TOKEN": "your-railway-api-token-here"
    }
  }
}

Available tools

Authentication

Authenticate with Railway using your API token to enable subsequent actions across projects, services, deployments, and variables.

Project list

List all Railway projects in your account to understand scope and IDs for subsequent operations.

Project info

Retrieve detailed information about a specific project, including environments and settings.

Project create

Create a new Railway project, optionally specifying a team.

Project delete

Delete a project from your Railway account.

Service list

List all services within a specified project to manage workflows.

Service info

Get detailed information about a specific service, including build and runtime configuration.

Service create from repo

Create a new service by connecting a GitHub repository to Railway.

Service create from image

Create a new service from a Docker image.

Service delete

Remove a service from a project.

Service restart

Restart a service in a given environment to apply updates or recover from failures.

Service update

Update service configuration such as build command or start command.

Deployment list

View recent deployments for a service to monitor progress and history.

Deployment trigger

Trigger a new deployment for a service to apply changes.

Deployment logs

Fetch logs for a specific deployment to diagnose issues.

Deployment health check

Check the health and status of a deployment to verify availability.

Variable list

List all variables for a service or environment.

Variable set

Create or update a variable for a service/environment.

Variable delete

Delete a variable from a service/environment.

Database list types

List available database types that can be deployed.

Database deploy

Deploy a new database service.