railway
Official Railway MCP Server for interacting with your Railway account
claude mcp add --transport stdio railwayapp-railway-mcp-server npx -y @railway/mcp-server
How to use
The Railway MCP Server provides a focused set of tools to manage Railway resources from your MCP client. It exposes commands to verify your Railway CLI setup, manage projects, services, environments, and configuration variables, deploy templates, and fetch logs. This makes it straightforward to create or link projects, deploy services (including templates), generate domains, and pull or set environment variables directly from your MCP client. The server automatically detects the Railway CLI version to adapt its behavior and feature set accordingly, ensuring compatibility with newer CLI capabilities when available.
To use the server, add it to your MCP client configuration (Cursor, VSCode, Claude Code, etc.) and point the client at the server executable provided by the npx package. Once configured, you can run tools such as list-projects, create-project-and-link, list-services, deploy, deploy-template, create-environment, link-environment, list-variables, set-variables, and generate-domain. You can also fetch logs with get-logs, with enhanced capabilities on Railway CLI v4.9.0+ for filtering and line-limited output.
How to install
Prerequisites:
- Node.js (recommended: latest LTS) - required for the npx-based installation
- Access to npm or corepack for npx
- Railway CLI installed and authenticated (as the MCP server relies on the Railway CLI)
Installation steps:
- Install and run the MCP server via npx:
npx add-mcp @railway/mcp-server --name railway
- (Optional) Add to Cursor configuration:
{
"mcpServers": {
"railway-mcp-server": {
"command": "npx",
"args": ["-y", "@railway/mcp-server"]
}
}
}
- (Optional) Add to VS Code MCP client configuration:
{
"servers": {
"railway-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@railway/mcp-server"]
}
}
}
- Start the server (as needed by your environment) and point your MCP client at the running server. The README notes that you should configure your MCP client to execute the server via npx and the package name.
Additional notes
Tips and considerations:
- This MCP server uses the Railway CLI under the hood; ensure the CLI is installed and authenticated before use.
- The server does not implement destructive actions by design, so exercise caution when invoking deploy or template deployment tools.
- The provided tooling covers common workflows: project and environment management, service deployment, variable handling, and domain generation.
- If you run into issues, ensure your MCP client is configured to invoke the server via the same Node environment and that your shell can resolve npx correctly.
- For advanced log handling, use get-logs with the Railway CLI v4.9.0+ to leverage lines filtering and search capabilities.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
railway
An unofficial and community-built MCP server for integrating with https://railway.app
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server