Skip to main content
Glama
eidos-agi
by eidos-agi

railguey-mcp-cloudflare

Railguey クラウド版。Grok と Railway GraphQL を橋渡しする Cloudflare Worker MCP サーバー。

CLI は eidos-agi/railguey にあります。このリポジトリは、Grok が実際にコネクタとして追加できるホスト型 Streamable HTTP MCP です。Railway 純正の MCP(mcp.railway.com)は OAuth/CLI 型で、Grok に直接追加できません。

ライブ Worker: railguey.eidos-agi.workers.dev

MCP: https://railguey.eidos-agi.workers.dev/mcp

プロダクトページ: eidosagi.com/tools/railguey

なぜ別リポジトリなのか

Repo

説明

eidos-agi/railguey

プロジェクト単位の Railway CLI (Go)。ローカルシェル、GitHub Actions、ワークスペースパスを持つエージェント。

eidos-agi/railguey-mcp-cloudflare

ホスト型 MCP サーバー (この Worker)。Grok はここで HTTP 通信し、Worker は Railway GraphQL と通信します。

Worker スクリプトは Cloudflare 上では引き続き railguey という名前です。この名前は workers.dev のホストであり、wrangler.tomlname と一致する必要があります。GitHub リポジトリは、その内容に応じた名前になっています。

Related MCP server: @crisog/railway-mcp-server

ペアリング(クレームコード)

Railway トークンが Grok チャットを通過することはありません。ペアリングはデバイスコードフローです:

  1. Grok が account_pair_begin を呼び出します(またはここでコードが発行されます)。

  2. この Worker で /pair/<CODE> を開きます。

  3. Railway トークンを貼り付け、アカウントに slug(eidospersonalclient-acme)を付けます。

  4. Worker は Railway に対してトークンを検証し、KV に保存します。Grok は account_list でそれを確認できます。

コードは10分で期限切れになり、一度きりの使用で、貼り付けに8回失敗すると破棄されます。

アカウントトークン(railway.com/account/tokens)、ワークスペーストークン、プロジェクトトークン(プロジェクト → 設定 → トークン)はすべて受け付けられます。種別が記録されるため、Grok はスコープを把握できます。

複数アカウント

各ペアは名前付きスロットです。Railway ツールはオプションの account slug を受け取ります。1つのスロットがデフォルトになります。

これは CLI のモデル(~/.railguey/accounts.json)と同じです。名前付きアカウント、デフォルト1つという構成を、ホームディレクトリの代わりに Workers KV に保存します。

エンドポイント

  • GET / — ステータスページ

  • GET /health — JSON ヘルス(機密情報なし。ペアリング済みアカウントのメタデータを含む)

  • GET /pair — クレームコードを入力

  • GET|POST /pair/:code — Railway トークンを貼り付け

  • POST /mcp — MCP Streamable HTTP(認証必須)

シークレットとバインディング

  • MCP_AUTH_TOKEN — Grok が Authorization: Bearer … として送信するベアラートークン

  • KV ACCOUNTSrailguey-accounts)— ペアリング済み Railway トークン、クレームコード、デフォルトの slug

トークンをコミットしないでください。wrangler.toml には KV ネームスペース ID と Cloudflare アカウント ID しかありません。

Grok で接続

  1. grok.com/connectors → コネクタを追加 → その他

  2. サーバー URL: https://railguey.eidos-agi.workers.dev/mcp

  3. ヘッダー: Authorization: Bearer <MCP_AUTH_TOKEN>

  4. Grok に Railway アカウントのペアリングを依頼し、返されたクレーム URL を開きます。

デプロイ

main への git push がデプロイです。 このリポジトリは恒久的にライブ Worker に接続されています:

  1. eidos-agi/railguey-mcp-cloudflaremain にプッシュします(特に index.js)。

  2. Grok オートメーション railguey-git-deploy がそのプッシュで発火し、index.js を Worker railguey にアップロードして、KV と MCP_AUTH_TOKEN を維持します。

  3. プッシュイベントを取り逃した場合、毎時のバックアップが main を再デプロイします。

GitHub には Cloudflare API トークンはありません。Cloudflare GitHub App もありません。MCP の動作を変更するには index.js を編集してプッシュします。

loader.js は Dynamic Worker Loader(エッジでの git-pull)です。これはライブではありません — この Cloudflare アカウントは無料の Workers プラン(API 10195)にあります。wrangler.tomlmainindex.js のままです。

name = "railguey" は変更してはいけません。Worker の名前を変更すると、ライブホストと Grok のコネクタ URL が壊れます。

ライセンス

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables comprehensive management of Railway infrastructure, including projects, services, variables, and deployments, directly through the Railway GraphQL API. It is designed to work as a remote service over HTTP, allowing seamless integration with cloud-based MCP clients like claude.ai.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Unofficial MCP server for Railway that enables managing Railway infrastructure through natural language, including projects, services, deployments, environments, variables, templates, domains, volumes, observability, integrations, networking, and workflows.
    64 npm
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that exposes the Railway API as tools for Claude. Manage Railway projects, services, deployments, variables, environments, and domains directly from Claude.
    16 npm
    MIT
  • F
    license
    B
    quality
    D
    maintenance
    A Model Context Protocol (MCP) server that gives Claude (and other MCP-compatible AI tools) full access to your Railway.app infrastructure. Deploy, manage services, check logs, configure environment variables — all through natural conversation.
    30
    10 npm
    -