
Product
Announcing Socket Certified Patches: One-Click Fixes for Vulnerable Dependencies
A safer, faster way to eliminate vulnerabilities without updating dependencies
@crazyrabbitltc/railway-mcp
Advanced tools
Railway MCP Server - 146+ tools with 100% Railway API coverage, comprehensive MCP testing framework, and real infrastructure management through AI assistants. Enhanced version with enterprise features, based on original work by Jason Tan.
Complete Railway.app infrastructure management through natural language. Deploy applications, manage enterprise features, monitor performance, and orchestrate infrastructure via MCP.
| Production-ready Railway MCP server with 146+ tools, comprehensive API coverage, and intelligent tool filtering. |
|---|
The most comprehensive Model Context Protocol (MCP) server for Railway.app, providing complete infrastructure management capabilities from basic deployments to enterprise-grade operations.
Original Creator: Jason Tan - Created the foundational Railway MCP server with core project and service management capabilities.
Major Enterprise Enhancement by Dennison Bertram: Expanded the project from 79 basic tools to a comprehensive 146+ tool enterprise platform with complete Railway API coverage. Added enterprise security features, advanced monitoring & observability, networking infrastructure, comprehensive MCP testing framework, batch operations, and intelligent tool filtering. This represents a significant upgrade from basic Railway management to a production-ready enterprise infrastructure platform.
Features โข Installation โข Tool Filtering โข Available Tools โข Example Workflows โข Security โข Troubleshooting โข Contributing
We've implemented and validated a comprehensive MCP testing framework that proves the Railway MCP Server works correctly with real Railway infrastructure through the Model Context Protocol.
Final Test Results: 64.3% Success (18/28 tests)
Live Test Results:
Located in test-client/ - A complete TypeScript MCP client implementation:
# Run comprehensive MCP protocol tests
cd test-client
npm install && npm run build
RAILWAY_API_TOKEN=your-token npm run test
# Individual test phases
npm run test:basic # MCP connectivity
npm run test:project # Project lifecycle
npm run test:database # PostgreSQL deployment
npm run test:service # GitHub service deployment
# Validate the complete framework
cd test-scripts
./quick-test.sh
# Test against real Railway services (requires API token)
export RAILWAY_API_TOKEN="your-railway-api-token"
./railway-connectivity-test.sh
# Run comprehensive testing (deploys real infrastructure)
./test-core-extended-services.sh # Core + extended features
./test-enterprise-features.sh # Enterprise security & monitoring
./prove-all-tools-work.sh # Complete proof of concept
| Client | Status | Testing Level |
|---|---|---|
| Claude for Desktop | โ Fully Tested | Production Ready |
| Cursor | โ Verified | Enterprise Features Tested |
| Cline | ๐งช Compatible | Basic Testing |
| Windsurf | ๐งช Compatible | Basic Testing |
| Other MCP Clients | ๐งช Universal MCP | Should Work |
To install railway-mcp automatically, we recommend using Smithery
Claude Desktop
npx -y @smithery/cli install @jason-tan-swe/railway-mcp --client claude
Cursor
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-mcp for better clarity
Paste this command into the 'Command' section, where <RAILWAY_API_TOKEN> is your accounts Railway token:
npx -y railway-mcp <RAILWAY_API_TOKEN>
Create or edit your Claude for Desktop config file:
~/Library/Application\ Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAdd the railway-mcp server to your configuration with your API token:
"railway": {
"command": "npx",
"args": ["-y", "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", "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 projects
Please configure the Railway API with my token: {YOUR_API_TOKEN_HERE}
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.
Have you pushed our changes to GitHub yet?The Railway MCP server provides intelligent tool filtering to manage the complexity of 146+ available tools. This feature allows you to expose only relevant subsets of tools based on your use case and complexity level.
By default, ALL tools are enabled (no filtering). Tool filtering only activates when you explicitly set the RAILWAY_TOOLS_FILTER environment variable.
# Method 1: No environment variable (default - all 146+ tools)
npx railway-mcp
# Method 2: Set to "pro" category (all 146+ tools)
export RAILWAY_TOOLS_FILTER="pro"
# Method 3: Set to empty string (all 146+ tools)
export RAILWAY_TOOLS_FILTER=""
Set the RAILWAY_TOOLS_FILTER environment variable to filter tools:
# For complete beginners
export RAILWAY_TOOLS_FILTER="extra-simple"
npx railway-mcp
# Basic users - essential operations only (42 tools)
export RAILWAY_TOOLS_FILTER="simple"
# Developers - includes creation/management (65 tools)
export RAILWAY_TOOLS_FILTER="intermediate"
# Multiple categories
export RAILWAY_TOOLS_FILTER="simple,deployment"
# Specific tools only
export RAILWAY_TOOLS_FILTER="project_list,service_create_from_repo,deployment_info"
# Mixed approach
export RAILWAY_TOOLS_FILTER="simple,backup-restore,security-audit-logs"
extra-simple (9 tools): Absolute essentials for basic service managementsimple (42 tools): Information, listing, and status operationsintermediate (65 tools): Includes simple + creation, deletion, basic managementpro (146+ tools): All tools including advanced workflows and enterprise featurescore (25 tools): Essential project, service, and deployment managementdeployment (18 tools): Service creation and deployment operationsdata (20 tools): Database, volume, backup, and variable managementmonitoring (22 tools): Logs, metrics, alerts, and observabilityenterprise (35 tools): Advanced networking, security, and complianceteam (12 tools): Team management, usage, and billingintegration (15 tools): Webhooks, templates, and external integrationsutility (8 tools): Configuration and helper toolsThe server includes built-in tools to help manage filtering:
tool_filter_current: Show active filter configurationtool_filter_validate: Test filter strings before applyingtool_filter_examples: Get example configurations for different use casestool_filter_categories: List all available categories with descriptionsClaude Desktop Configuration:
{
"mcpServers": {
"railway": {
"command": "npx",
"args": ["-y", "railway-mcp"],
"env": {
"RAILWAY_API_TOKEN": "your-token-here"
// No RAILWAY_TOOLS_FILTER = all tools (default)
// "RAILWAY_TOOLS_FILTER": "intermediate,monitoring" // Optional filtering
}
}
}
}
Command Line Usage:
# Default: All tools (no filtering)
npx railway-mcp
# Test different filter configurations
RAILWAY_TOOLS_FILTER="extra-simple" npx railway-mcp
RAILWAY_TOOLS_FILTER="simple" npx railway-mcp
RAILWAY_TOOLS_FILTER="deployment,data" npx railway-mcp
simple category and add more as neededintermediate,deployment)tool_filter_validate to test configurationstool_filter_current to verify active settingsThis MCP server includes a comprehensive testing framework that validates all functionality against real Railway infrastructure.
# Validate the complete framework
cd test-scripts
./quick-test.sh
# Set your Railway API token
export RAILWAY_API_TOKEN="your-railway-api-token"
# Run all tests (60-90 minutes, deploys real infrastructure)
./master-test.sh
# Run individual test phases
./test-foundation.sh # Core functionality (5-10 min)
./test-databases.sh # Database deployment (10-15 min)
./test-integration.sh # Full application stack (15-20 min)
./test-enterprise.sh # Security & compliance (10-15 min)
See MCP_TESTING_COMPLETE.md for comprehensive MCP testing documentation and TESTING_SUCCESS.md for Railway infrastructure testing details.
If you encounter issues:
Token Authentication Issues
configure tool directly in Claude if the environment token isn't workingServer Connection Issues
API Errors
We welcome contributions from the community! Please see our Contributing Guidelines for details on how to get started, development guidelines, and debugging information.
configure_api_token - Configure Railway API authenticationconfig-* - Project and service configuration managementproject_list - List all projects in your accountproject_info - Get detailed project informationproject_create - Create new projects with team supportproject_delete - Delete projects and all resourcesproject_environments - Manage project environmentsservice_list - List all services in a projectservice_info - Get detailed service informationservice_create_from_repo - Deploy from GitHub repositoriesservice_create_from_image - Deploy from Docker imagesservice_delete - Remove servicesservice_restart - Restart servicesservice_update - Update service configurationsenvironment-create - Create new environmentsenvironment-list - List all environmentsenvironment-delete - Remove environmentsenvironment-clone - Clone environments with variablesenvironment-deploy - Deploy all services in environmentdatabase_list_types - List available database types (PostgreSQL, MySQL, Redis, MongoDB)database_deploy_from_template - Deploy configured databasesvolume_create - Create persistent volumesvolume_list - List project volumesvolume_delete - Remove volumesvolume_attach - Attach volumes to servicesvariable_list - List service/environment variablesvariable_set - Create or update variablesvariable_delete - Remove variablesvariable_bulk_set - Bulk variable operationsvariable_copy - Copy variables between environmentsbackup-list - List project backupsbackup-create - Create manual backupsbackup-get - Get backup detailsbackup-restore - Restore from backupsbackup-delete - Remove backupsbackup-policy-* - Automated backup policiessecurity-audit-logs - Security audit trailsecurity-vulnerabilities - Vulnerability scanningsecurity-access-tokens - Access token managementsecurity-ip-allowlist - IP access controlsecurity-compliance-report - SOC2, GDPR, HIPAA, PCI-DSS reportingmonitoring-metrics-list - Custom metrics trackingmonitoring-apm-data - Application performance monitoringmonitoring-performance-data - Performance analyticsmonitoring-traces - Distributed tracingmonitoring-alerts-* - Multi-channel alerting (email, Slack, webhook)monitoring-notifications-* - Notification managementlogs-service - Runtime logslogs-build - Build logslogs-deployment - Deployment logsdomain_create - Create service domainsdomain_list - List service domainsdomain_update - Update domain configurationdomain_delete - Remove domainscustom-domain-* - Custom domain management with SSLnetworking-private-* - Private network creation and managementnetworking-security-groups - Network security groupsnetworking-firewall-rules - Firewall configurationnetworking-loadbalancer-* - Load balancer setup and managementtcp_proxy_create - Create TCP proxiestcp_proxy_list - List TCP proxiesgithub-repo-list - List accessible repositoriesgithub-repo-check - Verify repository accessgithub-branch-list - List repository branchesgithub-repo-deploy - Deploy from GitHubgithub-repo-link - Link repositories to servicesdeployment_list - List deploymentsdeployment_trigger - Trigger deploymentsdeployment_logs - Deployment logsdeployment_status - Deployment statustemplate-list - List available templatestemplate-deploy - Deploy from templatesresource-list - List project resourcesusage-get - Resource usage analyticsteam-* - Team and collaboration toolsAfter installing via Smithery or manual configuration, you can use natural language to manage Railway infrastructure:
# Project Management
"List all my Railway projects"
"Create a new project called 'my-startup-app'"
"Show me details for project abc123"
# Full-Stack Deployment
"Deploy a Next.js app from my GitHub repo 'username/my-app'"
"Add a PostgreSQL database to this project"
"Set the DATABASE_URL environment variable for my service"
"Create a custom domain for my app"
# Monitoring & Maintenance
"Show me the logs for my service deployment"
"Create a backup of my database"
"Set up daily automated backups"
"Generate a security audit report"
Claude Desktop excels at orchestrating complex workflows and providing detailed explanations of Railway operations.
Claude Code provides powerful terminal integration for development workflows:
# In your terminal with Claude Code
claude "List my Railway projects and deploy the latest version of my app"
# Development workflow
claude "Create a staging environment, deploy my current branch, and run tests"
# Infrastructure management
claude "Scale up my database, check performance metrics, and optimize if needed"
# Emergency response
claude "My app is down - check logs, identify issues, and redeploy if necessary"
Claude Code is ideal for development workflows, CI/CD automation, and rapid infrastructure management during development.
Cursor provides seamless code-to-deployment workflows:
// While coding in Cursor, use natural language:
"Push my changes to GitHub and deploy to Railway staging environment"
"This API needs a Redis cache - add Redis to Railway and update my environment variables"
"Create a production environment with the same services as staging"
"Set up monitoring alerts for this new API endpoint"
// Cursor + Railway MCP workflow:
// 1. Code changes in Cursor
// 2. Cursor commits and pushes to GitHub
// 3. Railway MCP deploys automatically
// 4. Monitor and manage through natural language
Cursor excels at connecting your development environment directly to Railway infrastructure with Git integration.
# 1. Create project and deploy services
"Create a new Railway project called 'my-app'"
"Deploy a Next.js service from my GitHub repo"
"Add a PostgreSQL database"
"Add a Redis cache"
# 2. Configure environment variables
"Set DATABASE_URL for the Next.js service"
"Set REDIS_URL for session storage"
"Add JWT_SECRET for authentication"
# 3. Set up custom domain
"Create a custom domain for the app"
"Configure SSL certificate"
# 1. Enable backup policies
"Create daily backup policy for the database"
"Set backup retention to 30 days"
# 2. Configure security
"Set up IP allowlist for database access"
"Enable vulnerability scanning"
"Generate security audit report"
# 3. Compliance reporting
"Generate SOC2 compliance report"
"Set up GDPR data protection policies"
# 1. Set up monitoring
"Create custom metrics for response time"
"Set up alerts for high CPU usage"
"Configure Slack notifications"
# 2. Performance tracking
"Enable distributed tracing"
"Set up APM monitoring"
"Create performance dashboard"
# 1. Private networking
"Create private network for database access"
"Set up load balancer for high availability"
"Configure security groups"
# 2. Domain management
"Add custom domain with SSL"
"Set up TCP proxy for direct database access"
"Configure firewall rules"
# 1. GitHub integration
"Link GitHub repository to service"
"Set up automatic deployments on push"
"Configure deployment branches"
# 2. Deployment strategies
"Set up blue-green deployment"
"Create staging environment"
"Configure rollback policies"
FAQs
Railway MCP Server - 146+ tools with 100% Railway API coverage, comprehensive MCP testing framework, and real infrastructure management through AI assistants. Enhanced version with enterprise features, based on original work by Jason Tan.
We found that @crazyrabbitltc/railway-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.