gate-mcp-codex-installer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Gate One-Click Installer (Codex: MCP + Skills)

Gate 一键安装器(Codex: MCP + 技能)

Use this skill when the user says "one-click install Gate", "install Gate MCP and skills", "Codex install gate-mcp", etc., and is using Codex.
当用户说出「一键安装 Gate」、「安装 Gate MCP 和技能」、「Codex 安装 gate-mcp」等内容,且正在使用 Codex 时,可使用本 Skill。

Resources

资源

TypeNameEndpoint / Config
MCPGate (main)
npx -y gate-mcp
, see gate-mcp
MCPGate Dexhttps://api.gatemcp.ai/mcp/dex, fixed x-api-key
MCPGate Infohttps://api.gatemcp.ai/mcp/info
MCPGate Newshttps://api.gatemcp.ai/mcp/news
Skillsgate-skillshttps://github.com/gate/gate-skills (installs all under skills/)
类型名称端点 / 配置
MCPGate (main)
npx -y gate-mcp
,参见 gate-mcp
MCPGate Dexhttps://api.gatemcp.ai/mcp/dex,固定 x-api-key
MCPGate Infohttps://api.gatemcp.ai/mcp/info
MCPGate Newshttps://api.gatemcp.ai/mcp/news
Skillsgate-skillshttps://github.com/gate/gate-skills(安装 skills/ 目录下的所有内容)

Behavior Rules

行为规则

  1. Default: When the user does not specify which MCPs to install, install all MCPs (main, dex, info, news) + all gate-skills.
  2. Selectable MCPs: Users can choose to install only specific MCPs (e.g. main only, dex only, etc.); follow the user's selection.
  3. Skills: Unless
    --no-skills
    is passed, always install all skills from the gate-skills repository's skills/ directory.
  1. 默认配置:当用户未指定要安装的 MCP 时,安装全部 MCP(主服务、dex、info、news) + 全部 gate-skills
  2. MCP 可自定义选择:用户可选择仅安装特定 MCP(例如仅安装主服务、仅安装 dex 等),请遵循用户的选择执行。
  3. 技能安装:除非传入
    --no-skills
    参数,否则始终安装 gate-skills 仓库 skills/ 目录下的全部技能。

Installation Steps

安装步骤

1. Confirm User Selection (MCPs)

1. 确认用户选择(MCP 部分)

  • If the user does not specify which MCPs -> install all: main, dex, info, news.
  • If the user specifies "only install xxx" -> install only the specified MCPs.
  • 若用户未指定安装哪些 MCP -> 安装全部:main、dex、info、news。
  • 若用户指定「仅安装 xxx」 -> 仅安装指定的 MCP。

2. Write Codex MCP Config

2. 写入 Codex MCP 配置

  • User-level config:
    ~/.codex/config.toml
    (or
    $CODEX_HOME/config.toml
    ). Creates the file and writes
    [mcp_servers]
    with corresponding tables if it does not exist.
  • If it already exists, merge: only append Gate MCP sections that don't already exist; do not overwrite existing config.
  • Config details:
    • Gate (main): stdio,
      command = "npx"
      ,
      args = ["-y", "gate-mcp"]
    • gate-dex: streamable HTTP,
      url
      +
      http_headers["x-api-key"]
      fixed as MCP_AK_8W2N7Q +
      http_headers["Authorization"]
      =
      Bearer ${GATE_MCP_TOKEN}
    • gate-info / gate-news: streamable HTTP,
      url
  • 用户级配置路径:
    ~/.codex/config.toml
    (或
    $CODEX_HOME/config.toml
    )。若文件不存在则创建该文件,并写入
    [mcp_servers]
    及对应配置项。
  • 若文件已存在,合并配置:仅追加不存在的 Gate MCP 配置段;不覆盖已有配置。
  • 配置详情:
    • Gate(主服务):stdio 模式,
      command = "npx"
      args = ["-y", "gate-mcp"]
    • gate-dex:流式 HTTP 模式,
      url
      +
      http_headers["x-api-key"]
      固定为 MCP_AK_8W2N7Q +
      http_headers["Authorization"]
      =
      Bearer ${GATE_MCP_TOKEN}
    • gate-info / gate-news:流式 HTTP 模式,
      url

3. Install gate-skills (all)

3. 安装 gate-skills(全部)

  • Pull all subdirectories under skills/ from https://github.com/gate/gate-skills and copy them to
    $CODEX_HOME/skills/
    (default
    ~/.codex/skills/
    ).
  • Add
    --no-skills
    when using the script to install MCP only without skills.
  • 拉取 https://github.com/gate/gate-skills 仓库中 skills/ 目录下的所有子目录,复制到
    $CODEX_HOME/skills/
    (默认路径
    ~/.codex/skills/
    )。
  • 若仅需安装 MCP 不安装技能,执行脚本时添加
    --no-skills
    参数即可。

4. Post-Installation Prompt

4. 安装后提示

  • Inform the user of the installed MCP list and "all gate-skills have been installed" (unless --no-skills was used).
  • Prompt to restart Codex to load MCP servers and skills.
  • Getting API Key: If the user uses Gate (main) for spot/futures trading, prompt them to visit https://www.gate.com/myaccount/profile/api-key/manage to create an API Key and set
    GATE_API_KEY
    and
    GATE_API_SECRET
    .
  • Gate-Dex Authorization: If Gate-Dex was installed and a query returns an authorization required message, prompt the user to first open https://web3.gate.com/ to create or bind a wallet, then the assistant will return a clickable Google authorization link for the user to complete OAuth.
  • 告知用户已安装的 MCP 列表,以及「所有 gate-skills 已安装完成」(如果未使用 --no-skills 参数)。
  • 提示用户重启 Codex 以加载 MCP 服务器和技能。
  • 获取 API Key:若用户使用 Gate(主服务)进行现货/合约交易,提示用户访问 https://www.gate.com/myaccount/profile/api-key/manage 创建 API Key,并设置
    GATE_API_KEY
    GATE_API_SECRET
    环境变量。
  • Gate-Dex 授权:若已安装 Gate-Dex,且查询返回需要授权的消息时,提示用户先打开 https://web3.gate.com/ 创建或绑定钱包,之后助手会返回可点击的 Google 授权链接,用户完成 OAuth 即可。

Script

脚本

Use the scripts/install.sh in this skill directory for one-click installation.
  • Usage:
    ./scripts/install.sh [--mcp main|dex|info|news] ... [--no-skills]

    Installs all MCPs when no
    --mcp
    is passed; pass multiple
    --mcp
    to install only specified ones;
    --no-skills
    installs MCP only.
  • The DEX x-api-key is fixed as
    MCP_AK_8W2N7Q
    and written to config.toml.
After downloading this skill from GitHub, run from the repository root:
bash skills/gate-mcp-codex-installer/scripts/install.sh

Or (MCP only):
bash skills/gate-mcp-codex-installer/scripts/install.sh --no-skills
使用本 Skill 目录下的 scripts/install.sh 进行一键安装。
  • 使用方法:
    ./scripts/install.sh [--mcp main|dex|info|news] ... [--no-skills]

    未传入
    --mcp
    参数时安装全部 MCP;传入多个
    --mcp
    参数可仅安装指定 MCP;
    --no-skills
    参数表示仅安装 MCP。
  • DEX 的 x-api-key 固定为
    MCP_AK_8W2N7Q
    ,会自动写入 config.toml。
从 GitHub 下载本 Skill 后,在仓库根目录执行:
bash skills/gate-mcp-codex-installer/scripts/install.sh

或(仅安装 MCP):
bash skills/gate-mcp-codex-installer/scripts/install.sh --no-skills