Skip to main content
Glama
gate
by gate

Gate MCP 服务器

License: MIT MCP

English | 中文


一个 Gate MCP(模型上下文协议)服务器,使 AI 代理能够与 Gate 加密货币交易所交互,进行市场数据、交易和账户管理。

功能特性

  • 🔍 公共市场数据 - 现货、合约、杠杆、期权、交割、理财、Alpha 行情、订单簿、K 线、资金费率、强平历史(无需认证

  • 💹 交易 - 创建/取消/修改现货、合约、期权、交割订单;价格触发订单;追踪订单

  • 💼 账户与钱包 - 余额、转账、充值、提现、子账户、统一账户

  • 📊 杠杆与理财 - 杠杆借贷、理财、多币种闪兑

  • 🎯 活动与福利 - 活动中心、优惠券、Launchpool、广场、福利

  • 🌍 TradFi、CrossEx、P2P - 传统金融、跨交易所、P2P 交易

  • 🌐 DEX - 链上钱包、兑换(单链与跨链)、代币信息、20+ 链的市场数据

  • 📰 信息 - 币种发现、市场快照、技术/平台指标、链上与宏观数据

  • 📢 新闻 - 加密新闻、社交洞察、市场事件、预测市场

  • 📚 文档 - 研究报告、论文和文档搜索

  • 🔐 OAuth2 - 交易和私有工具的安全授权

Related MCP server: :GT Protocol MCP Server

MCP 端点

该服务提供以下 MCP 端点:

端点

认证

工具

https://api.gatemcp.ai/mcp

公共市场数据(58 个工具:现货、合约、杠杆、期权、交割、理财、Alpha、活动、Launchpool、广场、闪兑)

https://api.gatemcp.ai/mcp/exchange

OAuth2

CEX 交易与账户(400+ 工具:现货/合约/期权/交割/杠杆交易、钱包、统一账户、子账户、理财、闪兑、返佣、TradFi、CrossEx、P2P、Alpha、活动中心、优惠券、Launchpool、广场、福利)

https://api.gatemcp.ai/mcp/dex

Google / Gate OAuth

DEX 钱包与兑换(33 个工具:认证、钱包、链配置、转账、兑换、市场数据、代币信息、代理、20+ 链的 RPC)

https://api.gatemcp.ai/mcp/info

币种信息与分析(32 个工具:币种、快照、趋势、链上、平台指标、宏观、市场详情)

https://api.gatemcp.ai/mcp/news

新闻与研究(18 个工具:新闻/UGC/X/网页、公告、情绪、事件、预测市场)

https://api.gatemcp.ai/mcp/docs

文档研究(3 个工具:研究搜索、币种研究、论文)

  • 仅市场数据 → 使用 /mcp(无需 Gate 账户)

  • CEX 交易、余额、转账 → 使用 /mcp/exchange(需要 Gate OAuth2)

  • DEX 钱包、兑换、链上 → 使用 /mcp/dex(需要 Google / Gate OAuth)

  • 币种信息、技术分析 → 使用 /mcp/info(无需认证)

  • 新闻、公告 → 使用 /mcp/news(无需认证)

  • 研究文档与论文 → 使用 /mcp/docs(无需认证)

传输方式:Streamable HTTP(带 SSE 回退)。

授权(OAuth2)

/mcp/exchange 需要 Gate OAuth2;/mcp/dex 需要 Google 或 Gate OAuth。 端点 /mcp/mcp/info/mcp/news/mcp/docs 不需要任何认证。

使用 mcporter

先决条件:Node.js >= 18、npm。完整安装步骤请参阅 快速入门 - mcporter

# Add Private MCP (trading, requires OAuth)
mcporter config add gate-mcp --url https://api.gatemcp.ai/mcp/exchange --auth oauth

# Authorize (opens browser to log in)
mcporter auth gate-mcp

作用域(用于 /mcp/exchange

作用域

用途

market

公共市场数据(行情、订单簿、K 线等)

profile

账户信息、订单、持仓(只读)

trade

创建/取消/修改订单

wallet

转账、充值、提现

account

统一账户、子账户

快速入门

先决条件

  • Gate 账户(仅 /mcp/exchange 需要)

  • 兼容 MCP 的客户端(Cursor、Claude CLI、Trae、OpenClaw 等)

  • Node.js >= 18(用于 mcporter、Trae、Qoder 及其他基于 npm 的客户端)

  • Python >= 3.9(可选,用于 Claude Desktop 代理)

Cursor

方法 1:一键安装(推荐)

只需将以下内容粘贴到 Cursor AI 聊天中——代理将自动安装所有 Gate MCP 服务器和技能:

帮我自动安装 Gate Skills 和 MCP:https://github.com/gate/gate-skills

详情请参阅 gate-skills

方法 2:手动配置

用于完整交易(连接时 OAuth):

编辑 ~/.cursor/mcp.json

{
  "mcpServers": {
    "Gate": {
      "url": "https://api.gatemcp.ai/mcp/exchange",
      "transport": "streamable-http",
      "headers": {
        "Content-Type": "application/json",
        "Accept": "application/json, text/event-stream"
      }
    }
  }
}

仅用于市场数据(无需认证):

{
  "mcpServers": {
    "Gate": {
      "url": "https://api.gatemcp.ai/mcp",
      "transport": "streamable-http",
      "headers": {
        "Content-Type": "application/json",
        "Accept": "application/json, text/event-stream"
      }
    }
  }
}

用于 DEX(链上钱包、兑换):

{
  "mcpServers": {
    "Gate-Dex": {
      "url": "https://api.gatemcp.ai/mcp/dex",
      "headers": {
        "x-api-key": "MCP_AK_8W2N7Q",
        "Authorization": "Bearer ${GATE_MCP_TOKEN}"
      }
    }
  }
}

用于信息与新闻(无需认证):

{
  "mcpServers": {
    "Gate-Info": {
      "url": "https://api.gatemcp.ai/mcp/info"
    },
    "Gate-News": {
      "url": "https://api.gatemcp.ai/mcp/news"
    }
  }
}

请参阅 Cursor 设置

mcporter / OpenClaw

方法 1:一键安装(推荐)

只需将以下内容粘贴到 OpenClaw AI 聊天中——代理将自动安装所有 Gate MCP 服务器和技能:

帮我自动安装 Gate Skills 和 MCP:https://github.com/gate/gate-skills

详情请参阅 gate-skills

方法 2:手动配置

先决条件(安装 mcporter 之前)
  • Node.js >= 18(mcporter 需要 npm)

  • npm(随 Node.js 附带)——使用 node -vnpm -v 验证

  • Gate 账户(使用 /mcp/exchange 时用于 OAuth 登录)

安装 mcporter
# Global install
npm install -g mcporter

# Verify installation
mcporter --version

或者,无需安装即可运行:npx mcporter <command>(使用当前的 Node.js/npm)。

添加 MCP 并授权
# Add Private MCP (trading, OAuth)
mcporter config add gate-mcp --url https://api.gatemcp.ai/mcp/exchange --auth oauth

# Authorize (opens browser to log in)
mcporter auth gate-mcp

# Add DEX MCP
mcporter config add gate-dex --url https://api.gatemcp.ai/mcp/dex

# Add Info MCP (no auth)
mcporter config add gate-info --url https://api.gatemcp.ai/mcp/info

# Add News MCP (no auth)
mcporter config add gate-news --url https://api.gatemcp.ai/mcp/news

详细步骤请参阅 OpenClaw 设置

Claude CLI

方法 1:一键安装(推荐)

只需将以下内容粘贴到 Claude CLI 中——代理将自动安装所有 Gate MCP 服务器和技能:

帮我自动安装 Gate Skills 和 MCP:https://github.com/gate/gate-skills

详情请参阅 gate-skills

方法 2:手动配置

brew install claude-code
# Full trading (OAuth)
claude mcp add --transport http Gate https://api.gatemcp.ai/mcp/exchange
# Restart Claude CLI after authorization is complete

# Info (no auth)
claude mcp add --transport http Gate-Info https://api.gatemcp.ai/mcp/info

# News (no auth)
claude mcp add --transport http Gate-News https://api.gatemcp.ai/mcp/news

claude mcp list

Trae

编辑 Trae 设置。使用 mcp-remote 代理 HTTP MCP(首次连接 /mcp/exchange 时提示 OAuth):

{
  "mcpServers": {
    "gate": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.gatemcp.ai/mcp/exchange"
      ]
    },
    "gate-info": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.gatemcp.ai/mcp/info"
      ]
    },
    "gate-news": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.gatemcp.ai/mcp/news"
      ]
    }
  }
}

Qoder

编辑 Qoder MCP 设置(例如 ~/.qoder/mcp.json 或在 Qoder 设置中):

{
  "mcpServers": {
    "gate": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.gatemcp.ai/mcp/exchange"
      ]
    },
    "gate-info": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.gatemcp.ai/mcp/info"
      ]
    },
    "gate-news": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.gatemcp.ai/mcp/news"
      ]
    }
  }
}

Claude Desktop

Claude Desktop 需要本地 stdio 代理。

  1. 下载 Python 代理文件

  2. 编辑 ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "Gate": {
      "command": "python3",
      "args": ["/path/to/gate-mcp-proxy.py"]
    }
  }
}

详细说明请参阅 Claude Desktop 设置

备选方案:gate-local-mcp(使用 API 密钥的本地 stdio)

对于无需 OAuth 的本地开发,请使用 gate-local-mcp(npm:gate-mcp)——一个使用 GATE_API_KEY / GATE_API_SECRET(仅公共市场数据可选)的 stdio MCP 服务器。将其配置为基于命令的 MCP 服务器(例如 "command": "npx", "args": ["-y", "gate-mcp"])。默认情况下,它注册了 22 个模块中的 384 个工具(现货、合约、交割、杠杆、钱包、账户、期权、理财、闪兑、统一账户、子账户、多抵押贷款、P2P、TradFi、CrossEx、Alpha、返佣、活动、优惠券、Launchpool、广场、福利)。使用 GATE_MODULES--modules=spot,futures 减少集合,或使用 GATE_READONLY=true / --readonly 启用只读模式。

重要提示: 线路级工具名称使用缩写(futuresfxdeliverydcsub_accountsa 等);它们与远程 api.gatemcp.ai 命名不同。始终使用 tools/list 返回的名称。

完整工具列表:gate-local-mcp-tools.md

LobeHub(桌面版)

LobeHub MCP 市场 上,此服务器显示为标识符 gate-gate-mcpnpm 包名是 gate-mcp —— 运行 npx -y gate-mcp,而不是 gate-gate-mcp

根据 LobeHub 自定义 MCP,stdio 服务器仅适用于桌面应用;为 Gate API 认证注入环境变量。添加自定义技能时使用导入 JSON

仅公共端点:

{
  "mcpServers": {
    "gate-mcp": {
      "command": "npx",
      "args": ["-y", "gate-mcp"],
      "type": "stdio"
    }
  }
}

使用 API 密钥认证:

{
  "mcpServers": {
    "gate-mcp": {
      "command": "npx",
      "args": ["-y", "gate-mcp"],
      "type": "stdio",
      "env": {
        "GATE_API_KEY": "your-api-key",
        "GATE_API_SECRET": "your-api-secret"
      }
    }
  }
}

您可以根据需要在 env 中添加 GATE_MODULESGATE_READONLYGATE_BASE_URL。保存前点击测试连接

其他客户端

客户端

指南

Claude.ai

设置

Codex App

设置

Codex CLI

设置

OpenClaw

设置

Trae

请参阅上面的 Trae 配置

Qoder

请参阅上面的 Qoder 配置

基本用法

查询价格

BTC/USDT 的当前价格是多少?

获取订单簿

显示 ETH/USDT 的订单簿

K 线数据

获取 BTC 最近 7 天的日 K 线数据


可用工具

所有工具都使用 cex_ 前缀。工具分为公共 MCP(无需认证)和私有 MCP(OAuth2)。

公共 MCP(/mcp — 无需认证,58 个工具)

业务

工具数

描述

现货

8

cex_spot_list_currencies, cex_spot_get_currency, cex_spot_list_currency_pairs, cex_spot_get_currency_pair, cex_spot_get_spot_tickers, cex_spot_get_spot_order_book, cex_spot_get_spot_trades, cex_spot_get_spot_candlesticks

合约

14

合约、订单簿、成交、K线、行情、资金费率、溢价指数、强平、合约统计、保险基金账本、指数成分、批量资金费率、风险限额档位

杠杆

3

cex_margin_list_uni_currency_pairs, cex_margin_get_uni_currency_pair, cex_margin_get_market_margin_tier

期权

12

标的资产、到期日、合约、结算、订单簿、行情、K线、成交

交割

8

合约、订单簿、成交、K线、行情、保险基金账本、风险限额档位

理财

5

cex_earn_list_dual_investment_plans, cex_earn_list_structured_products, cex_earn_list_uni_currencies, cex_earn_list_earn_fixed_term_products, cex_earn_list_earn_fixed_term_products_by_asset

Alpha

3

cex_alpha_list_alpha_currencies, cex_alpha_list_alpha_tickers, cex_alpha_list_alpha_tokens

活动

1

cex_activity_list_activity_types

Launch

1

cex_launch_list_launch_pool_projects

Square

2

cex_square_list_square_ai_search, cex_square_list_live_replay

闪兑

1

cex_fc_list_fc_currency_pairs

私有 MCP(/mcp/exchange — OAuth2,400+ 工具)

注意:私有端点不包含公共市场数据工具。市场数据查询请使用 /mcp

业务

权限范围

主要工具

现货

profile / trade

账户、订单、成交、批量订单、价格触发订单、倒计时撤单、全仓强平

合约

profile / trade

账户、持仓、订单、成交、双向持仓、追踪委托、价格触发、BBO 订单

杠杆

profile / trade

杠杆账户、借款、自动还款、uni 借款

期权

profile / trade

账户、持仓、订单、MMP 设置

交割

profile / trade

账户、持仓、订单、价格触发订单

钱包

wallet

总余额、划转、充值、提现、充值地址、SA 余额、小额资产兑换

统一账户

account

统一账户、模式、借款、风险单元、可借额度、抵押品、杠杆配置

子账户

account

创建/查询/锁定/解锁 SA、API 密钥

账户

account

账户详情、主密钥、频率限制、手续费抵扣、STP 组

返佣

profile

代理/合作伙伴/经纪商佣金历史、用户信息

闪兑

profile / trade

cex_fc_list_fc_currency_pairs, cex_fc_list_fc_orders, cex_fc_create_fc_order_v1、多币种闪兑

理财

profile / trade

双币/结构化/uni 产品、订单、ETH2 兑换、借出记录

Alpha

profile / trade

Alpha 账户、订单、报价/下单

TradFi

profile / trade

分类、交易对、MT5 账户、资产、订单、持仓

CrossEx

profile / trade

规则交易对、账户、持仓、订单、划转、兑换

P2P

profile / trade

用户信息、广告、聊天、交易、确认收款/付款

活动

profile

活动类型、推荐活动、用户参与

优惠券

profile

用户优惠券、优惠券详情

Launch Pool

profile / trade

LaunchPool 项目、质押/赎回、奖励记录

Square

market

AI 搜索、直播回放

福利

profile

新手资格、任务列表和奖励

完整的工具参数请参阅 Gate API 文档gate-exchange-mcp

DEX — 认证

工具

描述

dex_auth_google_login_start

启动 Google OAuth 登录流程,返回验证 URL

dex_auth_google_login_poll

轮询登录状态,成功时返回 mcp_token

dex_auth_login_google_wallet

使用 Google OAuth 授权码登录

dex_auth_gate_login_start

启动 Gate OAuth 登录流程,返回验证 URL

dex_auth_gate_login_poll

轮询 Gate OAuth 登录状态,成功时返回 mcp_token

dex_auth_login_gate_wallet

直接使用 Gate OAuth 授权码登录

dex_auth_logout

撤销当前会话

DEX — 钱包

工具

描述

dex_wallet_get_addresses

获取各链(EVM、Solana)的钱包地址

dex_wallet_get_token_list

代币余额,含价格和分页

dex_wallet_get_total_asset

总资产价值和 24 小时变化

dex_wallet_sign_message

使用钱包私钥签署消息(EVM / Solana)

dex_wallet_sign_transaction

使用钱包私钥签署原始交易

DEX — 链与交易

工具

描述

dex_chain_config

链配置(链 ID、能力)

dex_tx_gas

估算 Gas 价格和 Gas 上限

dex_tx_transfer_preview

签署前预览转账详情

dex_tx_approve_preview

代币授权预览:构建 ERC20/SPL 授权交易

dex_tx_get_sol_unsigned

使用最新区块哈希构建未签名的 Solana SOL 转账

dex_tx_send_raw_transaction

在链上广播已签名的交易

dex_tx_quote

兑换报价,含路由、价格影响和 Gas 估算

dex_tx_swap

一键兑换:报价 → 构建 → 签名 → 提交

dex_tx_swap_detail

按订单 ID 查询兑换订单状态

dex_tx_list / dex_tx_detail / dex_tx_history_list

交易与兑换/跨链桥历史

DEX — 市场数据与代币信息

工具

描述

dex_market_get_kline

K 线(蜡烛图)数据:1m、5m、1h、4h、1d

dex_market_get_tx_stats

交易量和交易者统计(5m / 1h / 4h / 24h)

dex_market_get_pair_liquidity

流动性池添加/移除事件

dex_token_list_swap_tokens

指定链上可用于兑换的代币

dex_token_list_cross_chain_bridge_tokens

可跨链桥接的代币

dex_token_get_coin_info

代币信息:价格、市值、供应量、持有者分布

dex_token_ranking

24 小时涨幅榜 / 跌幅榜

dex_token_get_coins_range_by_created_at

按创建时间范围发现新代币

dex_token_get_risk_info

安全审计:蜜罐、买入/卖出税、黑名单、权限

DEX — 智能代理与 RPC

工具

描述

dex_agentic_report

向钱包服务上报智能代理钱包地址

dex_rpc_call

向区块链节点执行 JSON-RPC 调用

如需完整的 DEX 工具参数,请参阅 gate-dex-mcp。如需 Agentic Wallet 子集(认证、钱包、市场数据、资源),请参阅 gate-agentic-wallet-mcp

Info(/mcp/info — 32 个工具,无需认证)

公开、只读的市场研究。分类(完整参数表:gate-info-mcp):

分类

工具

币种

info_coin_get_coin_infoinfo_coin_search_coinsinfo_coin_get_coin_rankings

市场快照

info_marketsnapshot_get_market_snapshotinfo_marketsnapshot_batch_market_snapshotinfo_marketsnapshot_get_market_overviewinfo_marketsnapshot_get_institutional_metrics

市场趋势

info_markettrend_get_klineinfo_markettrend_get_indicator_historyinfo_markettrend_get_technical_analysis

链上数据

info_onchain_get_address_infoinfo_onchain_get_address_transactionsinfo_onchain_get_transactioninfo_onchain_get_token_onchain

合规

info_compliance_check_token_security

平台指标

info_platformmetrics_get_platform_infoinfo_platformmetrics_search_platformsinfo_platformmetrics_get_defi_overviewinfo_platformmetrics_get_stablecoin_infoinfo_platformmetrics_get_bridge_metricsinfo_platformmetrics_get_yield_poolsinfo_platformmetrics_get_platform_historyinfo_platformmetrics_get_exchange_reservesinfo_platformmetrics_get_liquidation_heatmapinfo_platformmetrics_get_cex_orderbook_depthinfo_platformmetrics_get_chain_activity

宏观

info_macro_get_macro_indicatorinfo_macro_get_economic_calendarinfo_macro_get_macro_summary

市场详情

info_marketdetail_get_orderbookinfo_marketdetail_get_recent_tradesinfo_marketdetail_get_kline

News(/mcp/news — 18 个工具,无需认证)

公开、只读的新闻和社交研究。分类(完整参数表:gate-news-mcp):

分类

工具

新闻流

news_feed_search_newsnews_feed_web_searchnews_feed_search_xnews_feed_search_ugcnews_feed_get_exchange_announcementsnews_feed_get_social_sentimentnews_feed_get_mention_burstnews_feed_get_hot_topics

事件

news_events_get_latest_eventsnews_events_get_event_detailnews_events_explain_market_movenews_events_get_market_move_reportnews_events_list_market_move_reports

预测

news_prediction_get_volume_delta_rankingnews_prediction_get_fastest_rising_rankingnews_prediction_get_market_orderbooknews_prediction_search_eventsnews_prediction_get_event_signal

MCP 资源

/mcp/mcp/exchange 端点还提供用于静态参考数据的 MCP 资源:

资源 URI

描述

gate://spot/currency_pairs

所有现货交易对

gate://spot/currencies

所有支持的币种

gate://futures/contracts/usdt

USDT 结算的期货合约

gate://futures/contracts/btc

BTC 结算的期货合约

gate://futures/contracts/{settle}

按结算币种划分的期货合约


常见问题

问:我需要 Gate 账户吗?

答:仅 CEX 交易和 DEX 钱包需要。 /mcp/mcp/info/mcp/news/mcp/docs 完全公开——无需账户。/mcp/exchange(CEX 交易、余额、转账)需要 Gate OAuth2。/mcp/dex(链上钱包、兑换)需要 Google 或 Gate OAuth。

问:支持交易吗?

答:支持。使用 OAuth2 连接到 https://api.gatemcp.ai/mcp/exchange。该服务器支持现货和期货交易、账户管理、钱包转账和子账户。每个工具都需要相应的权限范围(例如 tradewallet)。

问:数据多久更新一次?

答:数据通过 Gate 的 API 实时查询。


隐私与安全

  • 通过 Gate 账户进行 OAuth2 授权(配置中不存储 API 密钥)

  • 所有 API 调用均使用 HTTPS

  • 请参阅 Gate 隐私政策


支持与反馈

  • API 文档Gate API 文档

  • 问题报告:请联系 Gate 支持

  • 商务咨询:联系 Gate 官方渠道


贡献

请参阅 CONTRIBUTING.md

许可证

MIT © gate.com

A
license - permissive license
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Exposes Indodax's Private and Public REST APIs as MCP tools, enabling AI agents to manage cryptocurrency trading and account information. It supports tasks like checking market prices, viewing account balances, and executing or canceling buy and sell orders.
  • F
    license
    B
    quality
    D
    maintenance
    Connects MCP-compatible AI agents to GT Protocol trading accounts, enabling natural language control of automated trading bots, strategy backtesting, deal execution, and balance monitoring on Binance and Hyperliquid exchanges.
    1
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables MCP-compatible AI clients to access live crypto market data and AI-driven quantitative analysis, with structured outputs and full observability.
  • A
    license
    D
    quality
    A
    maintenance
    Enables AI agents to access the full OKX exchange API for trading, market data, account management, and more through 300+ MCP tools.
    100
    97
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • 100+ MCP tools for AI agents: content metadata, trade intelligence, business-expertise analysis.

  • The financial MCP for AI agents - 90+ financial tables, SEC filings, signals, alt-data.

  • Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gate/gate-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server