railway-mcp
This railway-mcp server allows you to manage your Railway.app infrastructure through natural language commands.
Authentication: Configure and manage Railway API tokens
Project Management: List, create, delete, and get information about projects and environments
Service Management: Create, list, update, delete, and restart services from GitHub repos or Docker images
Deployment Management: List, trigger, monitor deployments, and view logs and statuses
Database Management: Deploy pre-configured databases from templates or custom Docker images
Environment Variables: List, set, delete, bulk update, and copy variables between environments
Domain Management: List, create, update, and delete custom domains for services
Volume Management: Create, list, update, and delete persistent volumes for services
TCP Proxy Management: Create, list, and delete TCP proxies for services
Allows to create Railway services from Docker images.
Mentioned as a recommended companion MCP server to use alongside the Railway MCP server.
Allows to create Railway services from GitHub repositories and is mentioned as a recommended companion MCP server.
Allows to manage Railway.app infrastructure, including project management, deployment management, service management (creating from GitHub repos or Docker images), variable management, service network management, and volume management.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@railway-mcp deploy my backend service from the main branch"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Node.js 18+ (for built-in fetch API support)
An active Railway account
A Railway API token (create one at https://railway.app/account/tokens)
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 claudeCursor
npx -y @smithery/cli@latest run @jason-tan-swe/railway-mcp --config "{\"railwayApiToken\":\"token\"}"Head to your cursor settings and find the MCP section
Click 'Add new MCP server'
Name it however, you like, we recommend
railway-mcpfor better clarityPaste this command into the 'Command' section, where <RAILWAY_API_TOKEN> is your accounts Railway token:
npx -y @jasontanswe/railway-mcp <RAILWAY_API_TOKEN>Create or edit your Claude for Desktop config file:
macOS:
~/Library/Application\ Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
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"
}
}
}
}Restart Claude for Desktop
You can now start using Railway tools directly in Claude. For example:
Please list all my Railway projectsAlternatively, 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.
Recommended MCP servers to combine with
Git || Official Link
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:
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
configuretool directly in Claude if the environment token isn't working
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
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 accountproject-info- Get detailed information about a specific projectproject-create- Create a new project with optional team IDproject-delete- Delete a projectproject-environments- List all environments in a project
Services
service-list- List all services in a specific projectservice-info- Get detailed information about a specific serviceservice-create-from-repo- Create a new service from a GitHub repositoryservice-create-from-image- Create a new service from a Docker imageservice-delete- Delete a service from a projectservice-restart- Restart a service in a specific environmentservice-update- Update service configuration (build command, start command, etc.) | š§ Needs Testing
Deployments
deployment-list- List recent deployments for a servicedeployment-trigger- Trigger a new deployment for a servicedeployment-logs- Get logs for a specific deploymentdeployment-health-check- Check the health/status of a deployment
Variables
variable-list- List variables for a service or environmentvariable-set- Create or update a variablevariable-delete- Delete a variablevariable-bulk-set- Bulk update variables for a service | š§ Needs Testingvariable-copy- Copy variables between environments | š§ Needs Testing
Databases
database-list-types- List all available database types that can be deployeddatabase-deploy- Deploy a new database service
Setting up a new service
List projects to get the project ID
Create a new service from a template
Add environment variables
View the service deployment
Managing environment variables
List projects to find your project ID
List variables to see what's currently set
Create or update variables as needed
Delete any obsolete variables
Available Tools
38 toolsconfigure_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
Scored across 38 tools
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.
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.
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.
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
Related MCP Connectors
Your AI Agent's Infrastructure Layer. Connect Claude, Copilot, Codex, or ChatGPT to 200+ managed open source services. Start databases, pipelines, and applications through natural language.
Deploy static sites and connect custom domains from Claude, Cursor, or any MCP agent.
Monitoring + status pages set up by talking to Claude. Auto-detects 30+ SDKs and your URLs.
Deploy and manage your apps, databases, storage, and scheduled jobs from your AI agent
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables 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.36132 npmMIT
- AlicenseAqualityDmaintenanceEnables 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.38132 npmMIT
- AlicenseAqualityDmaintenanceEnables AI systems like Claude and Cursor to directly manage Railway projects, deployments, services, environment variables, and monitor logs through natural language commands.923 npmMIT
- FlicenseNot gradedqualityDmaintenanceA team-wide, remote MCP server that lets Claude operate Railway projects through natural language, with safety guardrails to prevent irreversible actions without human approval.-