インストール不要。2分以内に動きます。
cloud.anythingmcp.com で無料トライアルを開始し、Railway をワンクリックで追加して、AI クライアント(Claude、ChatGPT、Copilot、Cursor)を生成された MCP エンドポイントに向けるだけ。Docker も git clone も、開発経験も不要です。
概要
AI が Railway のアプリを見守ります。プロジェクト、環境、サービスを一覧し、デプロイを確認してビルドログとランタイムログを読み、設定されている環境変数(名前のみ)を確認し、使用量を見積もり、あなたの確認後にサービスを再デプロイまたは再起動できます。
こう聞いてみよう
Railway のサンプルプロンプト
プロンプトをクリックでコピー。Claude / ChatGPT / Cursor / Gemini / Copilot / OpenClaw に貼り付けて、このコネクターで実行できます。
Claude は AI のため誤ることがあります。回答をご確認ください。
💡 インストール不要? cloud.anythingmcp.com を直接利用してください。 サインインし、Connectors → Railway をクリック、認証情報を貼り付け、MCP API キーを発行すれば完了です。Docker も
git cloneもローカルサーバーも不要。
Railway
AI が Railway のアプリを見守ります。プロジェクト、環境、サービスを一覧し、デプロイを確認してビルドログとランタイムログを読み、設定されている環境変数(名前のみ)を確認し、使用量を見積もり、あなたの確認後にサービスを再デプロイまたは再起動できます。
セットアップ
- Railway で Account Settings → Tokens(
https://railway.com/account/tokens)を開き、トークンを作成します。すべてのワークスペースに届くアカウントトークンにするには No workspace を選び、そのワークスペースだけに限定されたワークスペーストークンにするにはワークスペースを選びます。チームで使うならワークスペーストークンのほうが適しています。 - Railway に表示されたとおりに、Bearer という語を付けずに
RAILWAY_API_TOKENに貼り付け、コネクタをインストールします。 railway_list_projectsで設定を確認します。
プロジェクトトークンは使えません: プロジェクトトークン(プロジェクト設定の Tokens)は 1 つのプロジェクトの 1 つの環境にしか届かず、別のヘッダーで送られ、プロジェクトを一覧できません。アカウントトークンかワークスペーストークンを使ってください。railway_get_me はアカウントトークンでのみ動作し、ワークスペーストークンでは Railway が Not Authorized を返します。
できること: プロジェクトとその環境、サービス。各サービスの実行方法(ビルダー、起動コマンド、ヘルスチェック、リージョン、レプリカ、ドメイン)。ビルドログとランタイムログ付きのデプロイ。環境変数の名前。使用量。FAILED のデプロイはたいていビルド中に失敗しているので、AI は railway_get_build_logs を読みます。CRASHED のデプロイは実行中に失敗しているので、railway_get_deployment_logs を読みます。
再デプロイと再起動は先に確認します: railway_redeploy_deployment はサービスを再ビルドして実行中のデプロイを置き換え、これは課金対象の使用量になります。railway_restart_deployment は新しいビルドなしでコンテナを停止して起動します。どちらもサービスが一時的に中断することがあるため、AI はサービスと環境を伝え、あなたの承認を待ちます。サービスを削除したり停止したりする機能はありません。
変数の値は Railway に残ります: railway_list_variable_names は、どの変数が設定されているかだけを表示します。railway_get_variable_values は値(パスワード、キー、接続文字列)を返すため、インストール時に無効になっています。AI に値を見せてよい場合だけ有効にしてください。ランタイムログにはアプリが出力した内容がそのまま含まれるため、これも機密情報として扱ってください。
ドルではなく使用量: railway_get_estimated_usage と railway_get_usage は、CPU を vCPU 分、メモリとボリュームを GB 分、送信データ量(egress)を GB で返します。AI は Railway の定価(たとえば CPU は 1 vCPU あたり月 20 ドル)で換算します。プランのクレジットや割引は含まれません。
その他の読み取り: railway_graphql_query は Railway API の任意のクエリを実行します。Railway はスキーマファイルを公開していないため、railway_graphql_schema と railway_graphql_schema_url では読み込めません。代わりに AI はイントロスペクションクエリで型を調べます。railway_graphql_mutation はトークンが届く範囲のものを何でも変更、削除できるため、railway_graphql_subscription と同じくインストール時に無効になっています。管理者が意図して有効にできます。
よくあるエラー: Railway はほとんどの問題に HTTP 200 とメッセージで応答し、コネクタはそれをエラーとして報告します。Not Authorized: トークンが間違っている、取り消された、またはそのプロジェクトへのアクセス権がありません(あるいはワークスペーストークンで railway_get_me を呼び出しました)。Project not found または Deployment not found: ID が間違っているか、アクセス権がありません。HTTP 429: プランの 1 時間あたりのリクエスト上限に達しました(Free は 100、Hobby は 1,000、Pro は 10,000)。少し待ってください。
このコネクタは、プロジェクト、サービス、環境、変数、ドメイン、ボリュームの作成、変更、削除を行わず、デプロイのロールバックやメトリクスのグラフ描画もしません。
前提条件: RAILWAY_API_TOKEN
ローカルでコネクタをインストール
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
http://localhost:3000/connectors/store を開き、 Railway を選択し、前提条件に記載された環境変数を入力します。
利用可能なツール
| Tool | What it does |
|---|---|
railway_get_me | Read the Railway account behind an account token: id, name, email, username and its workspaces (id, name) |
railway_list_projects | List the projects the token can see, most recently updated first: id, name, description, workspace and created and updated dates |
railway_get_project | Read one project with its environments and services, and per service and environment: region, replicas, start command, public domains and… |
railway_get_service_instance | Read how one service runs in one environment: builder, build and start commands, root directory, health check, region, replicas, restart… |
railway_list_deployments | List the deployments of a project, environment or service, newest first: id, status (SUCCESS, FAILED, CRASHED, BUILDING, DEPLOYING… |
railway_get_deployment | Read one deployment: status and when it last changed, service and environment, URL, whether it can be redeployed or rolled back, whether it… |
railway_get_deployment_logs | Read the runtime logs of a deployment (what the running app printed): timestamp, severity and message per line |
railway_get_build_logs | Read the build logs of a deployment (installing dependencies, building the image): timestamp, severity and message per line |
railway_redeploy_deployment | Redeploy a deployment: Railway builds it again from the same source (or reuses the image with use_previous_image_tag) and replaces the… |
railway_restart_deployment | Restart a running deployment without building it again: its containers stop and start, so the service is briefly unavailable |
railway_list_variable_names | List the names of the environment variables of a service (or the shared variables of an environment), without their values, which are often… |
railway_get_variable_values | Read the environment variables of a service with their values |
railway_get_estimated_usage | Estimate the usage of the current billing period up to its end for a project or a workspace, per measurement (CPU in vCPU minutes, memory… |
railway_get_usage | Read the measured usage of a project or workspace over a period, per measurement and, with group_by, per service or environment (CPU in… |
railway_graphql_schema_url | Return the URL of the GraphQL schema (SDL); Railway publishes no SDL file, so use an introspection query with railway_graphql_query |
railway_graphql_schema | Fetch the GraphQL schema; Railway publishes no SDL file, so the AI looks types up with an introspection query instead |
railway_graphql_query | Run any GraphQL query against the Railway API, for reads the ready-made tools do not cover |
railway_graphql_mutation | Run any GraphQL mutation; switched off at install because it can change and delete anything the token reaches |
railway_graphql_subscription | Run a GraphQL subscription; switched off at install |
プロンプトの例
- 「Railway のサービスのうち、最新のデプロイが失敗またはクラッシュしているのはどれですか?原因がわかるログ行を見せてください。」
- 「production の api サービスの最後のデプロイのビルドログを読んで、ビルドが失敗した理由を教えてください。」
- 「staging の worker サービスに DATABASE_URL は設定されていますか?変数名だけを確認してください。」
- 「shop プロジェクトの今月の Railway の使用量を見積もり、おおよその費用を教えてください。」
- 「production の api サービスを再起動してください。どのデプロイを再起動するかを伝えて、私の OK を待ってください。」
次のステップ
このガイドは役に立ちましたか?