Skip to main content
Glama

fly-mcp-gateway

为 Fly.io 打造的常驻 Streamable HTTP MCP 网关。 用它替代不稳定的 Cloudflare Tunnel(mcp.oceanways.online)。

  • 端点:https://<your-app>.fly.dev/mcp

  • 健康检查:https://<your-app>.fly.dev/health

  • 可选认证:Authorization: Bearer <MCP_API_TOKEN>

部署(一次性)

# 1. Install flyctl — https://fly.io/docs/hands-on/install-flyctl/
fly auth login

# 2. Clone
git clone https://github.com/hush759/fly-mcp-gateway.git
cd fly-mcp-gateway

# 3. Launch (creates app + deploys)
fly launch --copy-config --yes

# 4. Set a secret token (recommended)
fly secrets set MCP_API_TOKEN="$(openssl rand -hex 24)"

# 5. Redeploy if needed
fly deploy

按提示选择一个唯一的应用名称(例如 clipboardh-mcp 或 hush759-mcp)。

Related MCP server: labsolu-mcp-test

让 Grok / Cursor 指向它

将旧 oceanways URL 替换为:

{
  "mcpServers": {
    "fly-gateway": {
      "type": "streamable-http",
      "url": "https://YOUR-APP.fly.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

免费套餐说明

fly.toml 设置了:

  • auto_stop_machines = "off"

  • min_machines_running = 1

这能让 一台机器保持运行,因此 MCP 不会冷启动。免费额度有限——请留意 Fly 计费,以免超出免费额度。

添加工具

编辑 server.js 并注册更多 server.tool(...) 处理器,然后:

git add -A && git commit -m "feat: more tools" && git push
fly deploy

本地测试

npm install
MCP_API_TOKEN=dev node server.js
# curl http://localhost:8080/health

Related MCP Connectors

Related MCP Servers