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: projectId (required), serviceId (required), environmentId (required), commitSha (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: environmentId (required), serviceId (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), environmentId (required), serviceId (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: projectId (required), image (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: projectId (required), repo (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: environmentId (required), serviceId (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: environmentId (required), serviceId (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), environmentId (required), variables (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), serviceId, +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: projectId (required), environmentId (required), name (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: projectId (required), environmentId (required), name (required), value (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: projectId (required), environmentId (required), serviceId (required), mountPath (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: volumeId (required), name (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 38 tools

    Disambiguation4/5

    Tools are well-differentiated with clear purposes, though some overlap exists (e.g., deployment_trigger vs service_restart, variable_set vs variable_bulk_set). Descriptions include 'Best for' and 'Not for' sections that effectively clarify boundaries, preventing most confusion.

    Naming Consistency5/5

    All tools follow a consistent snake_case verb_noun pattern (e.g., project_list, service_create_from_repo, variable_delete). The naming is highly predictable and readable across all 38 tools, with no deviations in style.

    Tool Count2/5

    With 38 tools, the count is excessive for a Railway server, making it overwhelming for agents to navigate. While the domain is broad (projects, services, deployments, variables, domains, volumes, templates, databases), many tools could be consolidated or omitted without losing functionality.

    Completeness5/5

    The tool set provides comprehensive coverage of Railway's domain, including full CRUD operations for projects, services, deployments, variables, domains, volumes, and templates. There are no obvious gaps, and tools support complete workflows from setup to management.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      F
      maintenance
      Enables interaction with Railway cloud platform through the CLI to manage projects, services, deployments, and environments. Supports creating projects, deploying templates, managing environment variables, and monitoring logs through natural language commands.
      14
      9,720 npm
      190
      MIT
    • 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
      MIT
    • A
      license
      A
      quality
      Not graded
      maintenance
      Enables management of Railway.app infrastructure through natural language, including deploying services, managing environment variables, monitoring deployments, and handling databases and volumes.
      36
      MIT