Railway MCP Server
Enables management of Railway projects, services, and deployments, including viewing project details, monitoring deployment status and logs, redeploying and restarting services, and managing environment variables.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Railway MCP Server show me the deployment logs for my backend service"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Railway MCP Server
Model Context Protocol (MCP) сервер для Railway API - позволяет AI системам (Claude, Cursor и другим) напрямую управлять Railway проектами, деплоями и сервисами.
🚀 Возможности
Управление проектами
Просмотр всех проектов и их сервисов
Получение детальной информации о проекте
Мониторинг статуса сервисов
Управление деплоями
Просмотр логов деплоев (build logs, deploy logs)
Запуск нового деплоя (redeploy)
Отмена текущего деплоя
Перезапуск деплоя
Управление переменными окружения
Просмотр переменных сервиса
Создание/обновление переменных
Удаление переменных
Мониторинг
Статус деплоев в реальном времени
URL адреса сервисов
Метаданные проектов и сервисов
Related MCP server: Railway MCP Server
📦 Установка
Требования
Node.js 18+
Railway API токен
Быстрая установка
# Клонировать репозиторий
git clone <your-repo-url>
cd railway-mcp-server
# Установить зависимости
npm install
# Собрать проект
npm run buildПолучение Railway API токена
Зайдите на Railway
Перейдите в Account Settings → Tokens
Создайте новый токен
Скопируйте токен
🔧 Настройка
Для Claude Desktop
Добавьте в конфигурацию Claude Desktop (claude_desktop_config.json):
На macOS:
~/Library/Application\ Support/Claude/claude_desktop_config.jsonНа Windows:
%APPDATA%/Claude/claude_desktop_config.jsonКонфигурация:
{
"mcpServers": {
"railway": {
"command": "node",
"args": ["/absolute/path/to/railway-mcp-server/dist/index.js"],
"env": {
"RAILWAY_TOKEN": "your-railway-token-here"
}
}
}
}Для Cursor
Добавьте в настройки Cursor:
{
"mcpServers": {
"railway": {
"command": "node",
"args": ["/absolute/path/to/railway-mcp-server/dist/index.js"],
"env": {
"RAILWAY_TOKEN": "your-railway-token-here"
}
}
}
}🛠️ Использование
Основные команды
После настройки вы можете использовать следующие команды в Claude или Cursor:
Просмотр проектов
Покажи мне все мои Railway проектыПросмотр конкретного проекта
Покажи детали проекта {project-id}Просмотр логов деплоя
Покажи логи деплоя {deployment-id}Перезапуск сервиса
Перезапусти сервис {service-id}Управление переменными
Установи переменную NODE_ENV=production для сервиса {service-id}Доступные инструменты
Инструмент | Описание |
| Получить все проекты |
| Получить детали проекта |
| Получить детали сервиса |
| Получить логи деплоя |
| Перезапустить сервис |
| Отменить деплой |
| Перезапустить деплой |
| Обновить переменную |
| Удалить переменную |
🧪 Тестирование
Использование MCP Inspector
# Запустить инспектор для отладки
npm run inspectorОткройте браузер по указанному URL для интерактивного тестирования.
Тестирование из командной строки
# Установить переменную окружения
export RAILWAY_TOKEN="your-token-here"
# Запустить сервер
npm start📖 Примеры использования
Мониторинг деплоев
Claude: Покажи мне статус всех деплоев в проекте MarvinУправление переменными
Claude: Установи переменную DATABASE_URL для backend сервисаАнализ логов
Claude: Покажи логи последнего деплоя и найди ошибкиАвтоматический редеплой
Claude: Если деплой frontend завершился с ошибкой, перезапусти его🔒 Безопасность
Токены: Railway токены хранятся только в переменных окружения
Локальное выполнение: MCP сервер работает локально
Подтверждение действий: Изменяющие операции требуют подтверждения
Изоляция: Каждый сервис работает в изолированном контексте
🐛 Отладка
Проверка токена
# Проверить валидность токена
curl -H "Authorization: Bearer your-token" https://backboard.railway.app/graphql/v2Логи сервера
# Просмотр логов
npm run devОбщие проблемы
"RAILWAY_TOKEN is required" - Убедитесь, что токен установлен
"Unauthorized" - Проверьте корректность токена
"Tool not found" - Перезапустите Claude Desktop
📚 Дополнительные ресурсы
🤝 Содействие
Чтобы внести свой вклад:
Форкните репозиторий
Создайте feature branch
Внесите изменения
Создайте pull request
📄 Лицензия
MIT License - смотрите файл LICENSE для деталей.
🆘 Поддержка
Создайте GitHub Issue для багов
Обратитесь в Railway Discord для вопросов по API
Документация MCP для общих вопросов
Создано командой Marvin Studio 🚀
Available Tools
9 toolscancel_deploymentC
Cancel a running deployment
Inputs: deploymentId (required).
delete_service_variableC
Delete an environment variable from a service
Inputs: serviceId (required), name (required).
get_deployment_logsB
Get logs for a specific deployment
Inputs: deploymentId (required).
get_projectC
Get details of a specific Railway project
Inputs: projectId (required).
get_projectsB
Get all Railway projects and their services
Inputs: no named parameters.
get_serviceB
Get details of a specific Railway service including deployments and variables
Inputs: serviceId (required).
redeploy_serviceC
Trigger a new deployment for a service
Inputs: serviceId (required).
restart_deploymentC
Restart a deployment
Inputs: deploymentId (required).
update_service_variableC
Update or create an environment variable for a service
Inputs: serviceId (required), name (required), value (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose targeting specific resources and actions, such as cancel_deployment vs. restart_deployment, and get_project vs. get_service, with no overlapping functionality that would cause confusion.
All tool names follow a consistent verb_noun pattern using snake_case, such as get_deployment_logs and update_service_variable, with no deviations in style or convention throughout the set.
With 9 tools, the server is well-scoped for managing Railway projects, services, deployments, and environment variables, providing a focused set that covers essential operations without being overwhelming or insufficient.
The tool set offers strong coverage for deployment management, environment variables, and project/service queries, but minor gaps exist, such as the inability to create or delete projects or services, which agents might need to work around.
Maintenance
Related MCP Connectors
Develop, manage, and debug Railway projects, services, and deployments from within agents.
Deploy and run your apps by asking your AI: services, Postgres, logs, traces, rollbacks, costs.
Deploy apps from GitHub, read build/runtime logs, and manage your app's users from your AI agent.
Deploy local apps, add managed Postgres, and inspect logs from your AI coding agent.
Related MCP Servers
AlicenseAqualityFmaintenanceEnables interaction with Railway cloud platform through the CLI to manage projects, services, deployments, and environments. Supports creating projects, deploying templates, managing environment variables, and monitoring logs through natural language commands.1412,526 npm190MIT- AlicenseAqualityDmaintenanceEnables management of Railway.app infrastructure through natural language, including deploying services from GitHub repos or Docker images, managing environment variables, monitoring deployments, and configuring networking and volumes.36166 npmMIT
- AlicenseAqualityDmaintenanceEnables management of Railway.app infrastructure through natural language, including deploying services, managing environment variables, monitoring deployments, and controlling project resources.36166 npmMIT
- AlicenseAqualityDmaintenanceEnables management of Railway.app infrastructure through natural language, including deploying services, managing environment variables, monitoring deployments, and handling databases and volumes.36166 npmMIT