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

railguey-mcp-cloudflare

Railguey 云端版。一个 Cloudflare Worker MCP 服务器,将 Grok 桥接到 Railway GraphQL。

CLI 位于 eidos-agi/railguey。本仓库就是托管的 Streamable HTTP MCP,Grok 可以真正将其添加为连接器——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

为什么单独建一个仓库

仓库

说明

eidos-agi/railguey

项目级 Railway CLI(Go)。本地 shell、GitHub Actions、带工作区路径的 agent。

eidos-agi/railguey-mcp-cloudflare

托管的 MCP 服务器(即此 Worker)。Grok 在此通过 HTTP 通信;Worker 则与 Railway GraphQL 通信。

Worker 脚本在 Cloudflare 上仍名为 railguey。该名称就是 workers.dev 主机名,并且必须与 wrangler.toml 中的 name 一致。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。其中一个槽位是默认槽位。

这与 CLI 模型(~/.railguey/accounts.json)一致——命名账户、一个默认账户——只是存储在 Workers KV 中,而不是主目录。

端点

  • GET / — 状态页面

  • GET /health — JSON 健康检查(不含机密信息;包含已配对账户的元数据)

  • GET /pair — 输入配对码

  • GET|POST /pair/:code — 粘贴 Railway 令牌

  • POST /mcp — MCP Streamable HTTP(需要认证)

机密与绑定

  • MCP_AUTH_TOKEN — Grok 以 Authorization: Bearer … 形式发送的 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 账户,然后打开 Grok 返回的配对 URL

部署

git pushmain 即为部署。 此仓库与线上 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 是一个动态 Worker 加载器(在边缘执行 git-pull)。它并未上线——此 Cloudflare 账户使用的是免费 Workers 套餐(API 10195)。wrangler.toml 中的 main 仍为 index.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
    -