mcpField
G
gate-mcp-installer

gate-mcp-installer

github.com/gateAgent 工作流48144 次安装18 周前更新
代码仓库

关于 gate-mcp-installer

gate-mcp-installer 是为 Cursor、Claude Code、Codex 和 OpenClaw 安装并配置 Gate MCP 服务及相关技能的工具。它支持选择 MCP 服务;安装 DEX 时会一并配置 Gate Verify。

主要功能

  1. 01为四种客户端安装 MCP 配置
  2. 02选择要安装的 MCP 服务
  3. 03可选安装 Gate Pay MCP
  4. 04安装相关技能或仅配置 MCP
  5. 05安装 DEX 时添加 Gate Verify

适用场景

  1. 01在 Cursor 或 Claude Code 中配置 Gate MCP
  2. 02为 Codex 配置 Gate MCP 服务
  3. 03为 OpenClaw 安装指定 Gate MCP
  4. 04安装带交易签到的 DEX 工具

MCP 相关

该安装器为支持的客户端配置本地 stdio 和远程 HTTP Gate MCP 服务,可安装 CEX、DEX、信息、新闻及可选的 Gate Pay 服务。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/gate/gate-skills --skill gate-mcp-installer

安装后在 Claude Code 中输入/gate-mcp-installer确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

CHANGELOG.md
README.md
references/
mcp.md
scripts/
install.sh
scripts/mcp-fragments/claude/
gate-cex-ex.json
gate-cex-pub.json
gate-dex.json
gate-info.json
gate-main-gate-mcp.json
gate-main-npx.json
gate-news.json
gate-verify.json
gatepay-local-mcp.json
gatepay-merchant-discovery.json
scripts/mcp-fragments/codex/
gate-cex-ex.toml
gate-cex-pub.toml
gate-dex.toml
gate-info.toml
gate-main-gate-mcp-placeholder.toml
gate-main-npx-placeholder.toml
gate-news.toml
gate-verify.toml
gatepay-local-mcp.toml
gatepay-merchant-discovery.toml
scripts/mcp-fragments/cursor/
gate-cex-ex.json
gate-cex-pub.json
gate-dex.json
gate-info.json
gate-main-gate-mcp.json
gate-main-npx.json

详细介绍

Gate MCP 安装程序(统一版:Cursor / Claude Code / Codex / OpenClaw)

通用规则

⚠️ 停止 — 继续操作前,必须阅读并严格遵守共享运行时规则。 在阅读完所有规则之前,请勿选择或调用任何工具。这些规则具有最高优先级。 → 阅读 gate-runtime-rules.md

  • 只能调用此技能中明确列出的 MCP 工具。 即使 MCP 服务中存在此处未记录的工具,也绝不能调用。

MCP 依赖项

必需的 MCP 服务(安装后)
MCP 服务状态
Gate(主服务)✅ 用于本地 CEX(stdio)
gate-cex-pub✅ 远程公共服务
gate-cex-ex✅ 远程私有服务(OAuth2)
gate-dex✅ DEX
gate-info✅ 信息
gate-news✅ 新闻
gatepay-local-mcp➕ 可选(Gate Pay x402 stdio;--mcp gatepay-local)
gatepay-merchant-discovery➕ 可选(HTTP 商户目录 / discoveryResource;--mcp gatepay-discovery)
Gate Verify(交易签到)✅ HTTP MCP https://api.gatemcp.ai/mcp/dex/sec — 只要安装了 dex,就会合并为 gate-dex-sec(Cursor / Claude / Codex / mcporter);根据 gate-dex-wallet 调用 tx_checkin / /v1/tx/checkin
安装检查
  • 运行此技能的安装程序脚本,或指导用户运行该脚本。
  • 如果一台机器上存在多个开发环境(例如 Cursor + Claude Code),脚本要求使用 --platform。

MCP 模式

阅读并严格遵守 references/mcp.md,然后执行此安装程序工作流。

  • SKILL.md — 产品范围、触发条件和面向用户的指导。
  • references/mcp.md — 各平台的执行标准操作流程、验证和安全规则。

平台矩阵

平台MCP / 传输配置技能目录
Cursor~/.cursor/mcp.json(Windows:%APPDATA%\Cursor\mcp.json)~/.cursor/skills/
Claude Code~/.claude.json(mcpServers)~/.claude/skills/
Codex~/.codex/config.toml([mcp_servers.*])~/.codex/skills/
OpenClawmcporter CLI(没有单个 JSON 文件)~/.openclaw/skills/(默认)

CEX MCP 模式

参见 gate-mcp:

模式内容身份验证
本地 CEXstdio npx -y gate-mcp(或全局 gate-mcp)可选 GATE_API_KEY / GATE_API_SECRET
远程公共服务https://api.gatemcp.ai/mcp无
远程交易所服务https://api.gatemcp.ai/mcp/exchange客户端中的 Gate OAuth2 / mcporter auth gate-cex-ex

非 CEX(同一主机):Dex(/mcp/dex)、Info(/mcp/info)、News(/mcp/news)。Dex 使用固定的 x-api-key MCP_AK_8W2N7Q,并在适用时使用 Bearer ${GATE_MCP_TOKEN}。


交易签到(Gate Verify / GV)

Gate Verify 是与远程 DEX 位于同一主机上的第二个 HTTP MCP,仅用于签名签到:

角色安装位置
钱包 / DEX 工具gate-dex → https://api.gatemcp.ai/mcp/dex(标头按配置片段设置)
Gate Verifygate-dex-sec → https://api.gatemcp.ai/mcp/dex/sec(仅 URL / streamable-http;此条目不添加钱包 HTTP 标头)

只要包含 --mcp dex,此安装程序就会添加 Verify MCP(默认完整安装包含该项)。Agent 使用与钱包 MCP 工具参数相同的 mcp_token 作为 authorization,在 Verify 服务上调用 tx_checkin 或 /v1/tx/checkin — 参见 gate-dex-wallet references/tx-checkin.md。分阶段兑换的具体信息:gate-dex-trade 技能。


资源

类型名称备注
MCPGate (main)stdio;如果已安装,优先使用全局 gate-mcp
MCPgate-cex-pubHTTP 远程公开
MCPgate-cex-exHTTP 远程私有 + OAuth2
MCPgate-dexHTTP + headers
MCPgate-dex-secHTTP https://api.gatemcp.ai/mcp/dex/sec;签名前执行 tx_checkin — 随 dex 安装包一起提供
MCPgate-info / gate-newsHTTP
MCPgatepay-local-mcpstdio npx -y gatepay-local-mcp;钱包 env 遵循 gate-pay-x402
MCPgatepay-merchant-discoveryHTTP http://dev.halftrust.xyz/pay-mcp-server/mcp;仅目录(gate-pay-x402)
技能gate-dex-walletVerify MCP + 钱包工作流的路由 — references/tx-checkin.md
技能gate-skillshttps://github.com/gate/gate-skills

行为规则

  1. 默认:安装全部六个交易 MCP 接口 + Gate Verify(随 dex 一起提供)+ 全部 gate-skills,除非用户选择退出。默认不包含 Gate Pay MCP:需要时添加 --mcp gatepay-local(x402 stdio)和/或 --mcp gatepay-discovery(远程商户目录)。省略 dex 也会省略 Verify MCP 条目。
  2. 可选:--mcp main|cex-public|cex-exchange|dex|info|news|gatepay-local|gatepay-discovery(可重复指定)。
  3. 技能:--no-skills 仅安装 MCP 配置。
  4. OpenClaw:--select / -s 保留交互式单服务菜单(mcporter 旧版 UX)。

安装脚本

路径:skills/gate-mcp-installer/scripts/install.sh

# Auto-detect when only one environment matches
bash skills/gate-mcp-installer/scripts/install.sh

# Force platform (required if multiple clients detected)
bash skills/gate-mcp-installer/scripts/install.sh --platform cursor
bash skills/gate-mcp-installer/scripts/install.sh --platform claude
bash skills/gate-mcp-installer/scripts/install.sh --platform codex
bash skills/gate-mcp-installer/scripts/install.sh --platform openclaw

# Subset of MCPs
bash skills/gate-mcp-installer/scripts/install.sh --platform cursor --mcp main --mcp dex

# Gate Pay x402 (stdio) alongside trading MCPs
bash skills/gate-mcp-installer/scripts/install.sh --platform cursor --mcp gatepay-local
# With --mcp main, the script prompts for GATE_API_KEY (CEX local MCP only); gatepay-local-mcp env is separate (gate-pay-x402).
bash skills/gate-mcp-installer/scripts/install.sh --platform cursor --mcp main --mcp gatepay-local

# Gate Pay merchant discovery (HTTP; discoveryResource) — often paired with gatepay-local
bash skills/gate-mcp-installer/scripts/install.sh --platform cursor --mcp gatepay-discovery
bash skills/gate-mcp-installer/scripts/install.sh --platform cursor --mcp gatepay-local --mcp gatepay-discovery --no-skills

# MCP only
bash skills/gate-mcp-installer/scripts/install.sh --no-skills

# OpenClaw interactive pick
bash skills/gate-mcp-installer/scripts/install.sh --platform openclaw --select

OpenClaw 快速命令(mcporter)

mcporter list gate-cex-pub
mcporter call gate-info.list_tickers currency_pair=BTC_USDT
mcporter call gate-news.list_news
mcporter call gate.list_spot_accounts
mcporter auth gate-cex-ex
mcporter call gate-dex.list_balances

安装后(所有平台)

  • 重启 IDE / 客户端(或开启新会话),以重新加载 MCP 列表。
  • API Key:https://www.gate.com/myaccount/profile/api-key/manage,用于本地 Gate (main) 交易。
  • gate-cex-ex:客户端提示时完成 OAuth2;OpenClaw:mcporter auth gate-cex-ex。
  • gate-dex:钱包使用 https://web3.gate.com/;如果工具要求,请完成 OAuth。
  • Gate Verify(gate-dex-sec):与 dex 合并;签名前或调用 dex_tx_x402_fetch 前,在此 MCP 上调用 tx_checkin / /v1/tx/checkin,并设置 authorization = 钱包 mcp_token(工具参数,而不是复制的 HTTP headers)— gate-dex-wallet references/tx-checkin.md。
  • gatepay-local-mcp:stdio Gate Pay x402;仅在本地将客户端配置中的 env 占位符替换为真实值 — 参见 gate-pay-x402(PLUGIN_WALLET_TOKEN、EVM_PRIVATE_KEY、SVM_PRIVATE_KEY、可选的 PAYMENT_METHOD_PRIORITY)。
  • gatepay-merchant-discovery:仅远程 URL(安装程序中不含机密);列出可支付资源 — 在实时工具列表(gate-pay-x402)中确认工具名称(discoveryResource)。如果连接失败,请根据宿主调整 JSON 中的 transport(片段使用 streamable-http,与其他 Gate HTTP MCP 相同)。

替代

此技能替代:gate-mcp-cursor-installer、gate-mcp-claude-installer、gate-mcp-codex-installer、gate-mcp-openclaw-installer。为保持向后兼容,这些目录可能保留简短的重定向占位内容。

评论

支持 Markdown