원클릭으로
railway-mcp-server
Use Railway's MCP server to manage Railway projects, deployments, databases, and infrastructure through the Railway CLI
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use Railway's MCP server to manage Railway projects, deployments, databases, and infrastructure through the Railway CLI
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | railway-mcp-server |
| description | Use Railway's MCP server to manage Railway projects, deployments, databases, and infrastructure through the Railway CLI |
| triggers | ["deploy my app to railway","create a railway project","check railway deployment status","manage railway database","configure railway environment variables","view railway service logs","set up railway mcp server","interact with railway infrastructure"] |
Skill by ara.so — MCP Skills collection.
Railway MCP Server is an official Model Context Protocol server that enables AI assistants to interact with Railway infrastructure. It's now bundled directly into the Railway CLI, allowing you to manage Railway projects, deployments, databases, environment variables, and services programmatically.
The Railway MCP server is bundled with the Railway CLI (v4.0.0+):
bash <(curl -fsSL https://railway.com/install.sh)
Automatically configure supported MCP clients (Claude Desktop, Cline, etc.):
railway mcp install
For remote (hosted) MCP server instead of local stdio:
railway mcp install --remote
Add to your MCP client configuration (e.g., claude_desktop_config.json):
{
"mcpServers": {
"railway": {
"command": "railway",
"args": ["mcp"]
}
}
}
Login to Railway before using MCP commands:
railway login
This opens a browser for authentication and stores credentials locally.
List all projects:
railway projects
Create a new project:
railway init
Link current directory to a project:
railway link
Switch projects:
railway project
Deploy current directory:
railway up
Deploy with specific Dockerfile:
railway up --dockerfile ./Dockerfile.prod
View deployment status:
railway status
List all services:
railway service
Set environment variable:
railway variables set KEY=value
Set multiple variables:
railway variables set API_KEY=$API_KEY DB_HOST=postgres.railway.internal
List all variables:
railway variables
Delete a variable:
railway variables delete KEY
Add a database (Postgres, MySQL, Redis, MongoDB):
railway add
Connect to database shell:
railway connect postgres
Get database connection string:
railway variables | grep DATABASE_URL
View service logs:
railway logs
Follow logs in real-time:
railway logs --follow
View logs for specific deployment:
railway logs --deployment <deployment-id>
Add custom domain:
railway domain
Generate Railway subdomain:
railway domain --generate
When running through MCP, the Railway server exposes tools that AI assistants can invoke:
railway_projects_list - List all Railway projectsrailway_project_create - Create a new projectrailway_services_list - List services in a projectrailway_service_create - Create a new servicerailway_deploy - Deploy a servicerailway_deployments_list - List deploymentsrailway_deployment_status - Get deployment statusrailway_variables_list - List environment variablesrailway_variables_set - Set environment variablesrailway_variables_delete - Delete environment variablesrailway_logs_get - Retrieve service logsrailway_databases_add - Add a database servicerailway_domains_list - List domainsrailway_domains_add - Add a custom domainAI Assistant Usage:
When an AI assistant has Railway MCP configured, users can make natural language requests:
User: "Deploy my Node.js app to Railway"
The AI will:
railway_project_status)railway_project_create)railway_deploy)railway_deployment_status)User: "Add Postgres database and set DATABASE_URL"
The AI will:
railway_databases_add)railway_variables_list)railway_variables_set){
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"buildCommand": "npm run build"
},
"deploy": {
"startCommand": "npm start",
"healthcheckPath": "/health",
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
[build]
builder = "NIXPACKS"
buildCommand = "npm run build"
[deploy]
startCommand = "npm start"
healthcheckPath = "/health"
healthcheckTimeout = 300
restartPolicyType = "ON_FAILURE"
[[services]]
name = "frontend"
source = "./frontend"
[[services]]
name = "backend"
source = "./backend"
# Initialize project
railway init
# Add Postgres database
railway add --database postgres
# Deploy backend service
cd backend
railway up
# Deploy frontend service
cd ../frontend
railway up
# Set environment variables
railway variables set \
BACKEND_URL=https://backend.railway.app \
DATABASE_URL=$DATABASE_PRIVATE_URL
GitHub Actions example:
name: Deploy to Railway
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Railway
run: bash <(curl -fsSL https://railway.com/install.sh)
- name: Deploy
run: railway up --service backend
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
# Production environment
railway environment production
railway variables set NODE_ENV=production API_URL=https://api.prod.example.com
# Staging environment
railway environment staging
railway variables set NODE_ENV=staging API_URL=https://api.staging.example.com
If railway mcp command fails:
# Check Railway CLI version (must be 4.0.0+)
railway --version
# Upgrade CLI
bash <(curl -fsSL https://railway.com/install.sh)
# Re-authenticate
railway logout
railway login
# Verify authentication
railway whoami
# View detailed logs
railway logs --deployment <deployment-id>
# Check build logs
railway logs --build
# Verify service configuration
railway status
Remove legacy @railway/mcp-server npm package configurations:
// OLD - Remove this
{
"mcpServers": {
"railway": {
"command": "npx",
"args": ["-y", "@railway/mcp-server"]
}
}
}
// NEW - Use this
{
"mcpServers": {
"railway": {
"command": "railway",
"args": ["mcp"]
}
}
}
# Private network URL (for internal services)
railway variables | grep PRIVATE_URL
# Public URL (for external access)
railway variables | grep DATABASE_URL
Policy-centered context budget layer that turns sprawling codebases into compact, high-signal context for AI coding agents using symbol graphs and precision tools
Control and automate Slay the Spire 2 gameplay through REST API or MCP server for AI agents
MCP server for browser automation using natural language through kogiQA, enabling AI agents to interact with web pages without selectors
Professional browser automation for Claude Code, Codex, and MCP clients powered by DrissionPage MCP Server
MCP server for Yuque (语雀) knowledge base - search, create, and manage documents through AI assistants
MCP server connecting AI assistants to Shopify Admin GraphQL API for products, orders, customers, inventory, and metafields management