Railway MCP Server
Table of Contents
Features
[object Object] | [object Object] |
[object Object] | [object Object] |
[object Object] | [object Object] |
[object Object] | [object Object] |
- 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
- Claude for Desktop | Battle-Tested
- Cursor | Needs Testing
- Cline | Needs Testing
- Windsurf | Needs Testing
- Other MCP Clients | Needs Testing
Installing via Smithery
- Head to your cursor settings and find the MCP section
- Click 'Add new MCP server'
- Name it however, you like, we recommend
railway-mcp
for better clarity
- Paste this command into the 'Command' section, where <RAILWAY_API_TOKEN> is your accounts Railway token:
- Create or edit your Claude for Desktop config file:
- Add the railway-mcp server to your configuration with your API token:
- Restart Claude for Desktop
- You can now start using Railway tools directly in Claude. For example:
- Alternatively, if you don't want to add your token to the configuration file, you can configure it within Claude using:
Recommendations and Other Information
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.
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
- Token Authentication Issues
- Server Connection Issues
- API Errors
Contributing
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
- 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
Railway MCP Server
Table of Contents
Features
[object Object] | [object Object] |
[object Object] | [object Object] |
[object Object] | [object Object] |
[object Object] | [object Object] |
- 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
- Claude for Desktop | Battle-Tested
- Cursor | Needs Testing
- Cline | Needs Testing
- Windsurf | Needs Testing
- Other MCP Clients | Needs Testing
Installing via Smithery
- Head to your cursor settings and find the MCP section
- Click 'Add new MCP server'
- Name it however, you like, we recommend
railway-mcp
for better clarity
- Paste this command into the 'Command' section, where <RAILWAY_API_TOKEN> is your accounts Railway token:
- Create or edit your Claude for Desktop config file:
- Add the railway-mcp server to your configuration with your API token:
- Restart Claude for Desktop
- You can now start using Railway tools directly in Claude. For example:
- Alternatively, if you don't want to add your token to the configuration file, you can configure it within Claude using:
Recommendations and Other Information
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.
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
- Token Authentication Issues
- Server Connection Issues
- API Errors
Contributing
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
- 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