Skip to main content
Glama

Railway MCP Server

A Model Context Protocol (MCP) server for integrating with the Railway.app platform.

Table of Contents

Related MCP server: Railway MCP Server

Features

Status

Meaning

āœ…

Complete

šŸš§šŸ”Øā³

Being Built or Needs Testing

āŒ

Not Built at the moment

  • āœ… Authentication with Railway API tokens

  • āœ… Project management (list, info, delete)

  • āœ… Deployment management (list, restart)

  • āœ… Service management (create from GitHub repo or Docker image, list)

  • āœ… Variable management (list, create/update, delete)

  • āœ… Service Network management

  • āœ… Volume management

  • āŒ Full support for all templates

    • šŸš§šŸ”Øā³ Database template support

    • Automatic database and networking workflows

  • šŸš§šŸ”Øā³ Most commonly used workflows

  • āŒ Automatic GitHub repository linking for services

Installation

Prerequisites

Quick Start

This MCP server is designed to work with MCP Clients like:

  • Claude for Desktop | āœ… Battle-Tested

  • Cursor | āœ… Needs Testing

  • Cline | šŸš§šŸ”Øā³ Needs Testing

  • Windsurf | šŸš§šŸ”Øā³ Needs Testing

  • Other MCP Clients | šŸš§šŸ”Øā³ Needs Testing

Installing via Smithery

To install railway-mcp automatically, we recommend using Smithery

Claude Desktop

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

Cursor

npx -y @smithery/cli@latest run @jason-tan-swe/railway-mcp --config "{\"railwayApiToken\":\"token\"}"
  1. Head to your cursor settings and find the MCP section

  2. Click 'Add new MCP server'

  3. Name it however, you like, we recommend railway-mcp for better clarity

  4. Paste this command into the 'Command' section, where <RAILWAY_API_TOKEN> is your accounts Railway token:

npx -y @jasontanswe/railway-mcp <RAILWAY_API_TOKEN>
  1. Create or edit your Claude for Desktop config file:

    • macOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

  2. Add the railway-mcp server to your configuration with your API token:

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

When you have multiple MCP servers, your config file might look like this:

{
  "mcpServers": {
    // ... All of your existing MCP servers ...

    // Add the railway-mcp server to your configuration with your API token
    "railway": {
      "command": "npx",
      "args": ["-y", "@jasontanswe/railway-mcp"],
      "env": {
        "RAILWAY_API_TOKEN": "your-railway-api-token-here"
      }
    }
  }
}
  1. Restart Claude for Desktop

  2. You can now start using Railway tools directly in Claude. For example:

Please list all my Railway projects
  1. Alternatively, if you don't want to add your token to the configuration file, you can configure it within Claude using:

Please configure the Railway API with my token: {YOUR_API_TOKEN_HERE}

Recommendations and Other Information

This server best combines with MCP-clients that have access to terminal or with Git (Cursor, Windsurf). Using this MCP with others is recommended as railway-mcp orchestrates containers and streamlines your deployment process seamlessly.

For Claude

  • Out of the box, Claude does not have terminal access, so it cannot trigger deployments as it will not be able to get the latest commit.

  • Spinning up different services and monitoring them are the best use case with Claude.

For Cursor

  • Use with GitHub MCP or have the repository already setup on GitHub and cloned locally on your machine to leverage full integration with railway-mcp.

  • When Cursor makes a change, it may forget to push it's changes to GitHub causing it to try and deploy a commit that Railway cannot pull.

    • SOLUTION: Always ask or include somewhere in your prompt: Have you pushed our changes to GitHub yet?

Security Considerations

  • Railway API tokens provide full access to your account. Keep them secure.

  • When using the environment variable method, your token is stored in the Claude Desktop configuration file.

  • Sensitive variable values are automatically masked when displayed.

  • All API calls use HTTPS for secure communication.

  • The server's memory-only token storage means your token is never written to disk outside of the configuration file.

Troubleshooting

If you encounter issues:

  1. Token Authentication Issues

    • Ensure your API token is valid and has the necessary permissions

    • If using the environment variable method, check that the token is correctly formatted in the config file

    • Try using the configure tool directly in Claude if the environment token isn't working

  2. Server Connection Issues

    • Check that you've installed the latest version of the server

    • Verify that Node.js version 18 or higher is installed

    • Restart Claude for Desktop after making changes to the configuration

  3. API Errors

    • Verify that you're using correct project, environment, and service IDs

    • Check Railway's status page for any service disruptions

    • Railway API has rate limits - avoid making too many requests in a short period

Contributing

We welcome contributions from the community! Please see our Contributing Guidelines for details on how to get started, development guidelines, and debugging information.

Available Tools

Authentication

  • configure - Set your Railway API token (only needed if not provided in environment variables)

Projects

  • project-list - List all projects in your account

  • project-info - Get detailed information about a specific project

  • project-create - Create a new project with optional team ID

  • project-delete - Delete a project

  • project-environments - List all environments in a project

Services

  • service-list - List all services in a specific project

  • service-info - Get detailed information about a specific service

  • service-create-from-repo - Create a new service from a GitHub repository

  • service-create-from-image - Create a new service from a Docker image

  • service-delete - Delete a service from a project

  • service-restart - Restart a service in a specific environment

  • service-update - Update service configuration (build command, start command, etc.) | 🚧 Needs Testing

Deployments

  • deployment-list - List recent deployments for a service

  • deployment-trigger - Trigger a new deployment for a service

  • deployment-logs - Get logs for a specific deployment

  • deployment-health-check - Check the health/status of a deployment

Variables

  • variable-list - List variables for a service or environment

  • variable-set - Create or update a variable

  • variable-delete - Delete a variable

  • variable-bulk-set - Bulk update variables for a service | 🚧 Needs Testing

  • variable-copy - Copy variables between environments | 🚧 Needs Testing

Databases

  • database-list-types - List all available database types that can be deployed

  • database-deploy - Deploy a new database service

Setting up a new service

  1. List projects to get the project ID

  2. Create a new service from a template

  3. Add environment variables

  4. View the service deployment

Managing environment variables

  1. List projects to find your project ID

  2. List variables to see what's currently set

  3. Create or update variables as needed

  4. Delete any obsolete variables

Available Tools

38 tools
configure_api_tokenA

[UTILITY] Configure the Railway API token for authentication (only needed if not set in environment variables)

āš”ļø Best for: āœ“ Initial setup āœ“ Token updates āœ“ Authentication configuration

āš ļø Not for: Ɨ Project configuration Ɨ Service settings Ɨ Environment variables

→ Next steps: project_list, service_list

→ Related: project_create

Inputs: token (required).

database_list_typesA

[QUERY] List all available database types that can be deployed using Railway's official templates

āš”ļø Best for: āœ“ Discovering supported database types āœ“ Planning database deployments āœ“ Checking template availability

āš ļø Not for: Ɨ Listing existing databases Ɨ Getting database connection details

→ Alternatives: service_create_from_image

→ Next steps: database_deploy

→ Related: database_deploy, service_create_from_image

Inputs: no named parameters.

deployment_listA

[API] List recent deployments for a service in a specific environment

āš”ļø Best for: āœ“ Viewing deployment history āœ“ Monitoring service updates

→ Prerequisites: service_list

→ Next steps: deployment_logs, deployment_trigger

→ Related: service_info, service_restart

Inputs: projectId (required), serviceId (required), environmentId (required), limit.

deployment_logsA

[API] Get logs for a specific deployment

āš”ļø Best for: āœ“ Debugging deployment issues āœ“ Monitoring deployment progress āœ“ Checking build output

āš ļø Not for: Ɨ Service runtime logs Ɨ Database logs

→ Prerequisites: deployment_list

→ Next steps: deployment_status

→ Related: service_info, deployment_trigger

Inputs: deploymentId (required), limit.

deployment_statusA

[API] Check the current status of a deployment

āš”ļø Best for: āœ“ Monitoring deployment progress āœ“ Verifying successful deployments āœ“ Checking for deployment failures

āš ļø Not for: Ɨ Service runtime logs Ɨ Database logs

→ Prerequisites: deployment_list, deployment_trigger

→ Next steps: deployment_logs

→ Related: service_info, service_restart, deployment_wait

Inputs: deploymentId (required).

deployment_triggerA

[API] Trigger a new deployment for a service

āš”ļø Best for: āœ“ Deploying code changes āœ“ Applying configuration updates āœ“ Rolling back to previous states

āš ļø Not for: Ɨ Restarting services (use service_restart) Ɨ Updating service config (use service_update) Ɨ Database changes

→ Prerequisites: service_list

→ Alternatives: service_restart

→ Next steps: deployment_logs, deployment_status

→ Related: variable_set, service_update

Inputs: commitSha (required), projectId (required), serviceId (required), environmentId (required).

domain_checkA

[API] Check if a domain is available for use

āš”ļø Best for: āœ“ Validating domain availability āœ“ Pre-deployment checks āœ“ Domain planning

→ Next steps: domain_create

→ Related: domain_list

Inputs: domain (required).

domain_createA

[API] Create a new domain for a service

āš”ļø Best for: āœ“ Setting up custom domains āœ“ Configuring service endpoints āœ“ Adding HTTPS endpoints

āš ļø Not for: Ɨ TCP proxy setup (use tcp_proxy_create) Ɨ Internal service communication

→ Prerequisites: service_list, domain_check

→ Alternatives: tcp_proxy_create

→ Next steps: domain_update

→ Related: service_info, domain_list

Inputs: serviceId (required), environmentId (required), domain, suffix, +1 more.

domain_deleteA

[API] Delete a domain from a service

āš”ļø Best for: āœ“ Removing unused domains āœ“ Cleaning up configurations āœ“ Domain management

āš ļø Not for: Ɨ Temporary domain disabling Ɨ Port updates (use domain_update)

→ Prerequisites: domain_list

→ Alternatives: domain_update

→ Related: service_update

Inputs: id (required).

domain_listA

[API] List all domains (both service and custom) for a service

āš”ļø Best for: āœ“ Viewing service endpoints āœ“ Managing domain configurations āœ“ Auditing domain settings

→ Prerequisites: service_list

→ Next steps: domain_create, domain_update

→ Related: service_info, tcp_proxy_list

Inputs: projectId (required), serviceId (required), environmentId (required).

domain_updateA

[API] Update a domain's configuration

āš”ļø Best for: āœ“ Changing target ports āœ“ Updating domain settings āœ“ Reconfiguring endpoints

āš ļø Not for: Ɨ Changing domain names (delete and recreate instead) Ɨ TCP proxy configuration

→ Prerequisites: domain_list

→ Next steps: domain_list

→ Related: service_update

Inputs: id (required), targetPort (required).

list_service_variablesA

[API] List all environment variables for a service

āš”ļø Best for: āœ“ Viewing service configuration āœ“ Auditing environment variables āœ“ Checking connection strings

→ Prerequisites: service_list

→ Next steps: variable_set, variable_delete

→ Related: service_info, variable_bulk_set

Inputs: projectId (required), environmentId (required), serviceId.

project_createA

[API] Create a new Railway project

āš”ļø Best for: āœ“ Starting new applications āœ“ Setting up development environments āœ“ Creating project spaces

āš ļø Not for: Ɨ Duplicating existing projects

→ Next steps: service_create_from_repo, service_create_from_image, database_deploy

→ Related: project_delete, project_update

Inputs: name (required), teamId.

project_deleteA

[API] Delete a Railway project and all its resources

āš”ļø Best for: āœ“ Removing unused projects āœ“ Cleaning up test projects

āš ļø Not for: Ɨ Temporary project deactivation Ɨ Service-level cleanup (use service_delete)

→ Prerequisites: project_list, project_info

→ Alternatives: service_delete

→ Related: project_create

Inputs: projectId (required).

project_environmentsC

List all environments in a project

Inputs: projectId (required).

project_infoA

[API] Get detailed information about a specific Railway project

āš”ļø Best for: āœ“ Viewing project details and status āœ“ Checking environments and services āœ“ Project configuration review

→ Prerequisites: project_list

→ Next steps: service_list, variable_list

→ Related: project_update, project_delete

Inputs: projectId (required).

project_listA

[API] List all projects in your Railway account

āš”ļø Best for: āœ“ Getting an overview of all projects āœ“ Finding project IDs āœ“ Project discovery and management

→ Next steps: project_info, service_list

→ Related: project_create, project_delete

Inputs: no named parameters.

service_create_from_imageA

[API] Create a new service from a Docker image

āš”ļø Best for: āœ“ Custom database deployments āœ“ Pre-built container deployments āœ“ Specific version requirements

āš ļø Not for: Ɨ Standard database deployments (use database_deploy) Ɨ GitHub repository deployments (use service_create_from_repo) Ɨ Services needing build process

→ Prerequisites: project_list

→ Alternatives: database_deploy, service_create_from_repo

→ Next steps: variable_set, service_update, tcp_proxy_create

→ Related: volume_create, deployment_trigger

Inputs: image (required), projectId (required), name.

service_create_from_repoA

[API] Create a new service from a GitHub repository

āš”ļø Best for: āœ“ Deploying applications from source code āœ“ Services that need build processes āœ“ GitHub-hosted projects

āš ļø Not for: Ɨ Pre-built Docker images (use service_create_from_image) Ɨ Database deployments (use database_deploy) Ɨ Static file hosting

→ Prerequisites: project_list

→ Alternatives: service_create_from_image, database_deploy

→ Next steps: variable_set, service_update

→ Related: deployment_trigger, service_info

Inputs: repo (required), projectId (required), name.

service_deleteA

[API] Delete a service from a project

āš”ļø Best for: āœ“ Removing unused services āœ“ Cleaning up test services āœ“ Project reorganization

āš ļø Not for: Ɨ Temporary service stoppage (use service_restart) Ɨ Updating service configuration (use service_update)

→ Prerequisites: service_list, service_info

→ Alternatives: service_restart

→ Related: project_delete

Inputs: projectId (required), serviceId (required).

service_infoA

[API] Get detailed information about a specific service

āš”ļø Best for: āœ“ Viewing service configuration and status āœ“ Checking deployment details āœ“ Monitoring service health

→ Prerequisites: service_list

→ Next steps: deployment_list, variable_list

→ Related: service_update, deployment_trigger

Inputs: projectId (required), serviceId (required), environmentId (required).

service_listA

[API] List all services in a specific Railway project

āš”ļø Best for: āœ“ Getting an overview of a project's services āœ“ Finding service IDs āœ“ Checking service status

→ Prerequisites: project_list

→ Next steps: service_info, deployment_list

→ Related: project_info, variable_list

Inputs: projectId (required).

service_restartA

[API] Restart a service in a specific environment

āš”ļø Best for: āœ“ Applying configuration changes āœ“ Clearing service state āœ“ Resolving runtime issues

āš ļø Not for: Ɨ Deploying new code (use deployment_trigger) Ɨ Updating service config (use service_update) Ɨ Long-term service stoppage (use service_delete)

→ Prerequisites: service_list

→ Alternatives: deployment_trigger

→ Related: service_info, deployment_logs

Inputs: serviceId (required), environmentId (required).

service_updateA

[API] Update a service's configuration

āš”ļø Best for: āœ“ Changing service settings āœ“ Updating resource limits āœ“ Modifying deployment configuration

āš ļø Not for: Ɨ Updating environment variables (use variable_set) Ɨ Restarting services (use service_restart) Ɨ Triggering new deployments (use deployment_trigger)

→ Prerequisites: service_list, service_info

→ Next steps: deployment_trigger

→ Related: service_restart, variable_set

Inputs: projectId (required), serviceId (required), environmentId (required), region, +6 more.

tcp_proxy_createA

[API] Create a new TCP proxy for a service

āš”ļø Best for: āœ“ Setting up database access āœ“ Configuring external connections āœ“ Exposing TCP services

āš ļø Not for: Ɨ HTTP/HTTPS endpoints (use domain_create) Ɨ Internal service communication

→ Prerequisites: service_list

→ Alternatives: domain_create

→ Next steps: tcp_proxy_list

→ Related: service_info, service_update

Inputs: serviceId (required), environmentId (required), applicationPort (required).

tcp_proxy_deleteA

[API] Delete a TCP proxy

āš”ļø Best for: āœ“ Removing unused proxies āœ“ Security management āœ“ Endpoint cleanup

āš ļø Not for: Ɨ Temporary proxy disabling Ɨ Port updates

→ Prerequisites: tcp_proxy_list

→ Related: service_update

Inputs: proxyId (required).

tcp_proxy_listA

[API] List all TCP proxies for a service in a specific environment

āš”ļø Best for: āœ“ Viewing TCP proxy configurations āœ“ Managing external access āœ“ Auditing service endpoints

→ Prerequisites: service_list

→ Next steps: tcp_proxy_create

→ Related: domain_list, service_info

Inputs: serviceId (required), environmentId (required).

template_deployA

[WORKFLOW] Deploy a new service from a template

āš”ļø Best for: āœ“ Starting new services from templates āœ“ Quick service deployment āœ“ Using pre-configured templates

āš ļø Not for: Ɨ Custom service configurations Ɨ GitHub repository deployments (use service_create_from_repo)

→ Prerequisites: template_list

→ Alternatives: service_create_from_repo, service_create_from_image, database_deploy

→ Next steps: service_info, variable_list

→ Related: service_update, deployment_trigger

Inputs: projectId (required), templateId (required), environmentId (required), teamId.

template_get_workflow_statusA

[API] Get the status of a workflow

āš”ļø Best for: āœ“ Checking workflow status

āš ļø Not for: Ɨ Creating new services

→ Next steps: service_info

→ Related: template_list, template_deploy

Inputs: workflowId (required).

template_listA

[API] List all available templates on Railway

āš”ļø Best for: āœ“ Discovering available templates āœ“ Planning service deployments āœ“ Finding template IDs and sources

āš ļø Not for: Ɨ Listing existing services Ɨ Getting service details

→ Alternatives: service_create_from_repo, service_create_from_image

→ Next steps: service_create_from_template

→ Related: database_list_types

Inputs: searchQuery.

variable_bulk_setA

[WORKFLOW] Create or update multiple environment variables at once

āš”ļø Best for: āœ“ Migrating configuration between services āœ“ Initial service setup āœ“ Bulk configuration updates

āš ļø Not for: Ɨ Single variable updates (use variable_set) Ɨ Temporary configuration changes

→ Prerequisites: service_list

→ Alternatives: variable_set

→ Next steps: deployment_trigger, service_restart

→ Related: variable_list, service_update

Inputs: projectId (required), variables (required), environmentId (required), serviceId.

variable_copyA

[WORKFLOW] Copy variables from one environment to another

āš”ļø Best for: āœ“ Environment migration āœ“ Configuration sharing āœ“ Environment duplication

āš ļø Not for: Ɨ Single variable updates (use variable_set) Ɨ Temporary configuration changes

→ Prerequisites: service_list

→ Alternatives: variable_set

→ Next steps: deployment_trigger, service_restart

→ Related: variable_list, service_update

Inputs: projectId (required), sourceEnvironmentId (required), targetEnvironmentId (required), overwrite, +1 more.

variable_deleteA

[API] Delete a variable for a service in a specific environment

āš”ļø Best for: āœ“ Removing unused configuration āœ“ Security cleanup āœ“ Configuration management

āš ļø Not for: Ɨ Temporary variable disabling Ɨ Bulk variable removal

→ Prerequisites: service_list

→ Next steps: deployment_trigger, service_restart

→ Related: variable_list, variable_set

Inputs: name (required), projectId (required), environmentId (required), serviceId.

variable_setA

[API] Create or update an environment variable

āš”ļø Best for: āœ“ Setting configuration values āœ“ Updating connection strings āœ“ Managing service secrets

āš ļø Not for: Ɨ Bulk variable updates (use variable_bulk_set) Ɨ Temporary configuration changes

→ Prerequisites: service_list

→ Alternatives: variable_bulk_set

→ Next steps: deployment_trigger, service_restart

→ Related: variable_list, variable_delete

Inputs: name (required), value (required), projectId (required), environmentId (required), +1 more.

volume_createA

[API] Create a new persistent volume for a service

āš”ļø Best for: āœ“ Setting up database storage āœ“ Configuring persistent data āœ“ Adding file storage

āš ļø Not for: Ɨ Temporary storage needs Ɨ Static file hosting Ɨ Memory caching

→ Prerequisites: service_list

→ Next steps: volume_list

→ Related: service_update, database_deploy

Inputs: mountPath (required), projectId (required), serviceId (required), environmentId (required).

volume_deleteA

[API] Delete a volume from a service

āš”ļø Best for: āœ“ Removing unused storage āœ“ Storage cleanup āœ“ Resource management

āš ļø Not for: Ɨ Temporary data removal Ɨ Data backup (use volume_backup first)

→ Prerequisites: volume_list

→ Related: service_update

Inputs: volumeId (required).

volume_listA

[API] List all volumes in a project

āš”ļø Best for: āœ“ Viewing persistent storage configurations āœ“ Managing data volumes āœ“ Auditing storage usage

→ Prerequisites: project_list

→ Next steps: volume_create

→ Related: service_info, database_deploy

Inputs: projectId (required).

volume_updateC

Update a volume's properties

Inputs: name (required), volumeId (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 38 tools

    Disambiguation4/5

    Most tools have distinct purposes due to consistent naming, but there is some overlap among creation tools (e.g., service_create_from_image, service_create_from_repo, template_deploy) that could cause confusion. Descriptions help, but an agent might still misselect.

    Naming Consistency4/5

    The majority follow a verb_noun pattern (e.g., project_create, service_list). However, some deviate like database_list_types (noun_verb_noun) and configure_api_token (verb with underscore). Overall consistent but with minor exceptions.

    Tool Count2/5

    38 tools is excessive for typical MCP servers, which often have 10-20. While Railway is a broad platform, many tools are granular (e.g., separate tools for each CRUD operation on domains, TCP proxies, volumes) leading to an overwhelming surface.

    Completeness4/5

    The tool set covers most major operations for the Railway platform: projects, services, deployments, domains, variables, volumes, TCP proxies, templates. Minor gaps exist, such as no direct volume backup or database management beyond listing types and deployment.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables management of Railway.app infrastructure through natural language, including deploying services from GitHub repos or Docker images, managing environment variables, monitoring deployments, and configuring networking and volumes.
      36
      132 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables management of Railway.app infrastructure through natural language, allowing users to deploy services, manage environment variables, monitor deployments, and configure projects directly from MCP clients like Claude.
      38
      132 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A team-wide, remote MCP server that lets Claude operate Railway projects through natural language, with safety guardrails to prevent irreversible actions without human approval.
      -