logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

railway-mcp-gateway

Interface with the Railway.app platform via natural language processing, enabling users to orchestrate deployments, configure environment settings, and observe operational status of cloud services. This tool facilitates AI agents in managing Railway infrastructure projects.

Author

railway-mcp-gateway logo

antonioevans

MIT License

Quick Info

GitHub GitHub Stars 0
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

railwayservicescloudrailway appmanage railwayantonioevans railway

Railway Infrastructure Management Protocol (MCP) Interface

Railway Logo    MCP Integration

Harness the power of Large Language Models (like Claude) and other MCP clients to govern your Railway.app resources. Provision services, modify environment configurations, and track application lifecycle events using conversational commands.

Attention: This component is currently under active development; full feature parity is forthcoming. 🚧

railway-mcp Bridge

This implementation acts as a Model Context Protocol (MCP) gateway interfacing directly with the Railway.app deployment platform.

Smithery Distribution Badge

CapabilitiesSetupToolsetWorkflow ExamplesSecurityTroubleshootingContribution

Core Capabilities

Indicator Status Description
Fully Implemented
🚧🔨⏳ In Progress or Awaiting Verification
Not Yet Available
  • ✅ Secure API key credential handling for Railway access
  • ✅ Resource management for projects (retrieval, metadata access, removal)
  • ✅ Deployment lifecycle oversight (listing, initiating restarts)
  • ✅ Service provisioning (from source code repository or container image sources)
  • ✅ Environment configuration management (viewing, setting, deprecating variables)
  • ✅ Network topology management for services
  • ✅ Persistent storage (Volume) administration
  • ❌ Complete template support across the platform
  • 🚧🔨⏳ Support for database service templates
  • Automated procedures for database and network scaffolding
  • 🚧🔨⏳ Automation for frequent operational sequences
  • ❌ Automatic linkage of services to corresponding GitHub repositories

Setup Instructions

Prerequisites

  • Runtime environment: Node.js version 18 or newer (to leverage native fetch capabilities)
  • Active subscription to Railway
  • A generated Railway Access Credential (obtainable via https://railway.app/account/tokens)

Expedited Initialization

This bridge is designed for consumption by various MCP clients, including: - Claude for Desktop | ✅ Validated Operational Status - Cursor | ✅ Verification Required - Cline | 🚧🔨⏳ Verification Pending - Windsurf | 🚧🔨⏳ Verification Pending - Other MCP Implementations | 🚧🔨⏳ Verification Pending

Installation via Smithery

For streamlined, automated deployment, utilize the Smithery utility:

For Claude Desktop Users

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

For Cursor Users

<Use Smithery CLI with configuration payload>
npx -y @smithery/cli@latest run @jason-tan-swe/railway-mcp --config "{\"railwayApiToken\":\"token\"}"

Manual Configuration Method for Cursor

1. Navigate to the configuration panel within Cursor and locate the MCP section. 2. Initiate the addition of a novel MCP gateway, preferably labeled `railway-mcp` for clarity. 3. In the designated 'Command' field, input the following structure, substituting `` with your actual Railway secret:
npx -y @jasontanswe/railway-mcp <RAILWAY_API_TOKEN>

Manual Configuration Method for Claude

1. Locate or create your configuration file for Claude Desktop: - macOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json` - Windows: `%APPDATA%\Claude\claude_desktop_config.json` 2. Integrate the railway-mcp service into your JSON structure, supplying the necessary access key:
   "railway": {
      "command": "npx",
      "args": ["-y", "@jasontanswe/railway-mcp"],
      "env": {
         "RAILWAY_API_TOKEN": "your-railway-api-token-here"
      }
   }
If your configuration already lists multiple MCP services, the structure should incorporate this new entry:
{
  "mcpServers": {
    // ... Existing configurations ...

    // Railway MCP Service Definition
    "railway": {
      "command": "npx",
      "args": ["-y", "@jasontanswe/railway-mcp"],
      "env": {
        "RAILWAY_API_TOKEN": "your-railway-api-token-here"
      }
    }
  }
}
3. Restart the Claude application to load the new configuration. 4. You can immediately commence interaction with Railway tools within Claude. Example query:
Please list all my Railway projects
5. Alternatively, bypass file modification by providing the token dynamically within Claude via a direct command:
Please configure the Railway API with my token: {YOUR_API_TOKEN_HERE}

Recommendations and Synergy Information

This utility achieves optimal performance when paired with MCP clients that possess integrated command-line interfacing or version control system access (e.g., Cursor, Windsurf). Combining this gateway with other MCP services is advised as it efficiently manages container orchestration and deployment pipelines.

Specific Considerations for Claude

  • Because Claude lacks intrinsic terminal execution capability by default, it cannot unilaterally initiate deployments as it cannot ascertain the most recent committed state.
  • Monitoring service health and provisioning new application instances represent the most robust use cases for Claude integration.

Specific Considerations for Cursor

  • Leverage this tool alongside the GitHub MCP, or ensure your repository is locally cloned, to maximize full integration capabilities.
  • Cursor might occasionally execute deployments based on changes not yet synchronized (pushed) to GitHub, leading Railway to attempt deployment of an outdated revision.
  • Mitigation Strategy: Incorporate a verification step in your dialogue, such as: Verify that all pending modifications have been committed and pushed to the remote GitHub repository.

Security Protocols

  • Railway API tokens grant complete administrative rights; safeguard them rigorously.
  • If utilizing the environment variable injection method, the token is persisted within the client application's configuration file.
  • Values associated with sensitive environment variables are automatically obfuscated upon display.
  • All communication channels enforce HTTPS encryption for data transit.
  • Token handling is confined to transient memory within the server process, preventing disk-based persistence outside of the client's configuration file.

Troubleshooting

Should operational anomalies arise, follow these diagnostic steps:

  1. Credential Validation Failures
  2. Confirm the API token's validity and its associated permission scope.
  3. If using environmental configuration, re-examine the token formatting within the client's settings file.
  4. Attempt to invoke the configure tool directly through Claude if the environmental token method proves unreliable.

  5. Connection Interruption

  6. Ensure the gateway software is running the most recent published version.
  7. Check that the required Node.js runtime (v18+) is installed and accessible.
  8. Configuration file modifications necessitate a restart of the host client (e.g., Claude Desktop).

  9. Railway API Exceptions

  10. Double-check the precise identifiers used for projects, environments, and services.
  11. Consult the official Railway status dashboard for any ongoing platform outages.
  12. Be mindful of Railway API rate limitations; avoid excessive query bursts in brief intervals.

Contribution Guidelines

Community input is highly valued! Refer to our Contributing Guidelines document for details on setup, development standards, and debugging procedures.

Exposed Toolset

Display All Available Functions ### Credential Management - `configure` - Manually specify the Railway API secret (if environment variable injection is unused) ### Project Administration - `project-list` - Retrieve a registry of all associated user projects - `project-info` - Fetch comprehensive details for a specified project - `project-create` - Provision a new infrastructure project, optionally binding it to a team ID - `project-delete` - Permanently remove an existing project - `project-environments` - Enumerate all defined environments within a project context ### Service Operations - `service-list` - List all defined services within a selected project - `service-info` - Obtain detailed configuration data for an individual service - `service-create-from-repo` - Instantiate a new service sourced directly from a GitHub repository - `service-create-from-image` - Instantiate a new service based on a specified Docker container image - `service-delete` - Decommission a service from its parent project - `service-restart` - Force a runtime restart for a service within a designated environment - `service-update` - Modify service parameters (e.g., build scripts, startup commands) | 🚧 Needs Testing ### Deployment Lifecycle - `deployment-list` - Fetch a history of recent deployment events for a service - `deployment-trigger` - Initiate a fresh deployment cycle for a service - `deployment-logs` - Retrieve the operational logs associated with a specific deployment instance - `deployment-health-check` - Assess the current operational status of a running deployment ### Configuration Variables - `variable-list` - Display existing configuration variables for a service or environment - `variable-set` - Establish a new variable or overwrite an existing one - `variable-delete` - Erase a specified configuration variable - `variable-bulk-set` - Apply multiple variable changes simultaneously | 🚧 Needs Testing - `variable-copy` - Replicate variable sets between different environments | 🚧 Needs Testing ### Data Persistence Services - `database-list-types` - Catalogue available database blueprints for provisioning - `database-deploy` - Launch a new managed database service instance
Workflow Examples ### Establishing a New Application Service 1. Query the existing project inventory to secure the target project identifier. 2. Invoke the service creation command, referencing a known template or source. 3. Inject necessary runtime configuration parameters (environment variables). 4. Verify the initial deployment status and connectivity. ### Configuration Variable Management 1. Query projects to isolate the relevant infrastructure ID. 2. List the current key-value pairs to review the active settings. 3. Execute creation or modification commands for any required variables. 4. Remove any deprecated or obsolete configuration entries.

See Also

`