home / mcp / railway mcp server
An unofficial and community-built MCP server for integrating with https://railway.app
Configuration
View docs{
"mcpServers": {
"antonioevans-railway-mcp": {
"command": "npx",
"args": [
"-y",
"@jasontanswe/railway-mcp"
],
"env": {
"RAILWAY_API_TOKEN": "YOUR_API_TOKEN_HERE"
}
}
}
}You can connect MCP clients to Railway.app and manage projects, deployments, services, and variables through simple, token-authenticated commands. This MCP server lets you control Railway resources from supported clients using straightforward, scriptable actions.
Use an MCP client (for example Claude Desktop or Cursor) to interact with Railway resources by running the provided MCP commands. You can authenticate with a Railway API token and then list, create, restart, or delete projects, services, environments, and variables. You can also create services from GitHub repositories or Docker images, monitor deployments, and manage networks and volumes through the MCP endpoints.
Key capabilities include authenticating with your Railway API token, listing and inspecting projects, environments, services, and deployments, creating services from repositories or images, updating variables, and restarting services as needed. You can also view deployment logs and health status to monitor your infrastructure.
Prerequisites you need before installation are the following:
Choose an installation path for your MCP client integration. You can install automatically with Smithery or set up manually for specific clients like Cursor or Claude Desktop.
Install via Smithery for Claude Desktop directly with this command:
npx -y @smithery/cli install @jason-tan-swe/railway-mcp --client claudeInstall for Cursor by running this command and providing your Railway API token when prompted or via the passed argument:
npx -y @smithery/cli@latest run @jason-tan-swe/railway-mcp --config "{\"railwayApiToken\":\"token\"}"If you prefer a manual setup for Cursor, follow these steps.
1. Open your Cursor settings and go to the MCP section.
2. Add a new MCP server and name it for clarity (e.g., railway_mcp).
3. Use this command, substituting your Railway API token for <RAILWAY_API_TOKEN>:
npx -y @jasontanswe/railway-mcp <RAILWAY_API_TOKEN>If you use Claude Desktop, configure the MCP server in Claudeβs config with your Railway API token.
1. Locate Claude desktop config paths for your OS.
2. Add the railway-mcp server with the following settings and your API token either in the env or via the config:
{
"railway": {
"command": "npx",
"args": ["-y", "@jasontanswe/railway-mcp"],
"env": {
"RAILWAY_API_TOKEN": "your-railway-api-token-here"
}
}
}If you manage multiple MCP servers, your configuration might include the railway-mcp entry alongside other servers.
{
"mcpServers": {
"railway": {
"command": "npx",
"args": ["-y", "@jasontanswe/railway-mcp"],
"env": {
"RAILWAY_API_TOKEN": "your-railway-api-token-here"
}
}
}
}Railway API tokens grant full access to your Railway account. Treat tokens as sensitive credentials. When using environment variables, the token is stored in the client configuration file and is masked in outputs. All communications use HTTPS to secure data in transit.
If you encounter authentication issues, verify that your Railway API token is valid and has the required permissions. If the token is provided via environment variables, ensure it is properly formatted in the config file. For connection problems, confirm youβre using the latest server version and that Node.js 18+ is installed. Restart the MCP client after configuration changes.
This MCP server works best with clients that can access a terminal or have Git integration. It orchestrates containers and streamlines deployments for Railway projects, environments, and services.
Setting up a new service: List projects, create a new service from a template or repository, add environment variables, then view deployment status.
Managing environment variables: List variables, create or update as needed, and remove obsolete ones.
Set your Railway API token for authentication and enable subsequent commands to access your Railway projects and deployments.
List all projects in your Railway account and inspect project details.
Get detailed information about a specific project.
Create a new project, with optional team association.
Delete an existing project.
List all environments within a project.
List all services within a specific project.
Get detailed information about a specific service.
Create a new service from a GitHub repository.
Create a new service from a Docker image.
Delete a service from a project.
Restart a service in a specific environment.
Update service configuration (build/start commands, etc.).
List recent deployments for a service.
Trigger a new deployment for a service.
Get logs for a deployment.
Check the health status of a deployment.
List variables for a service or environment.
Create or update a variable.
Delete a variable.
Copy variables between environments.
List available database types that can be deployed.
Deploy a new database service.