Gate MCP Server
[License: MIT]
[MCP]
English | 中文
A Gate MCP (Model Context Protocol) server that enables AI agents to interact with the Gate cryptocurrency exchange for market data, trading, and account management.
Features
- Public data — Spot/futures standard and RPI depth, options, delivery, margin, Earn, Alpha, CFD, stocks, collateral-loan parameters, unified-account simulation and Square (no OAuth)
- Trading and strategies — Spot/futures/options/delivery orders, POV, Chase, trigger orders, Trail and strategy bots
- Account and wallet — Balances, account transfers, deposit/withdrawal history, deposit addresses, unified accounts and wallet-level sub-account balances/transfers
- Earn and allocation — Auto investment, ordinary/stock dual investment, fixed-term and flexible lending, multi-collateral loans, flash swap and portfolio optimization
- CFD and stocks — Market information and authorized account, order, position and fund operations as separate domains
- 🌐 DEX - On-chain wallet, swap (single-chain & cross-chain), token info, market data across 20+ chains
- 📰 Info - Coin discovery, market snapshots, technical/platform metrics, on-chain and macro data
- 📢 News - Crypto news, social insights, market events, prediction markets
- 📚 Docs - Research reports, papers, and documentation search
- 🔐 OAuth2 - Secure authorization for trading and private tools
MCP Endpoints
The service exposes the following MCP endpoints:
- Market data only → Use
/mcp (no Gate account needed)
- CEX trading, balances, transfers → Use
/mcp/exchange (Gate OAuth2 required)
- DEX wallet, swap, on-chain → Use
/mcp/dex (Google / Gate OAuth required)
- Coin info, technical analysis → Use
/mcp/info (no auth)
- ChatGPT / OpenAI Apps Gate Info listing → Use
/mcp/open/info (7-tool allowlist; no auth)
- News, announcements → Use
/mcp/news (no auth)
- Research docs & papers → Use
/mcp/docs (no auth)
Transport: Streamable HTTP (with SSE fallback).
Authorization (OAuth2)
/mcp/exchange requires Gate OAuth2; /mcp/dex requires Google or Gate OAuth. The endpoints /mcp, /mcp/info, /mcp/open/info, /mcp/news, and /mcp/docs do not require any authentication.
Using mcporter
Prerequisites: Node.js >= 18, npm. See Quick Start - mcporter for full installation steps.
Scopes (for /mcp/exchange)
Requirements for base, spot_trade, futures_trade, earn, cfd, stock depend on the tool and account type. In ordinary matching, base includes read and asset and is not read-only. Ordinary tokens retain per-tool OR compatibility with legacy scopes; Agentic accounts have separate read/write overrides and denied operations. mcp:tools does not replace a business scope.
See the per-tool permissions and authorization/PKCE resource reference. The connected endpoint's tools/list determines visibility; default scope advertisement does not establish application choices in every environment.
Quick Start
Prerequisites
- Gate account (required only for
/mcp/exchange)
- MCP-compatible client (Cursor, Claude CLI, Trae, OpenClaw, etc.)
- Node.js >= 18 (for mcporter, Trae, Qoder, and other npm-based clients)
- Python >= 3.9 (optional, for Claude Desktop proxy)
Cursor
Method 1: One-click Install (Recommended)
Just paste the following into the Cursor AI chat — the agent will auto-install all Gate MCP servers and Skills:
Help me auto install Gate Skills and MCPs: https://github.com/gate/gate-skills
See gate-skills for details.
Method 2: Manual Configuration
For full trading (OAuth on connect):
Edit ~/.cursor/mcp.json:
For market data only (no auth):
For DEX (on-chain wallet, swap):
For Info & News (no auth):
See Cursor setup.
mcporter / OpenClaw
Method 1: One-click Install (Recommended)
Just paste the following into the OpenClaw AI chat — the agent will auto-install all Gate MCP servers and Skills:
Help me auto install Gate Skills and MCPs: https://github.com/gate/gate-skills
See gate-skills for details.
Method 2: Manual Configuration
Prerequisites (before installing mcporter)
- Node.js >= 18 (mcporter requires npm)
- npm (comes with Node.js) — verify with:
node -v and npm -v
- Gate account (for OAuth login when using
/mcp/exchange)
Install mcporter
Alternatively, run without installing: npx mcporter <command> (uses current Node.js/npm).
Add MCP and authorize
See OpenClaw setup for detailed steps.
Claude CLI
Method 1: One-click Install (Recommended)
Just paste the following into Claude CLI — the agent will auto-install all Gate MCP servers and Skills:
Help me auto install Gate Skills and MCPs: https://github.com/gate/gate-skills
See gate-skills for details.
Method 2: Manual Configuration
Trae
Edit Trae settings. Uses mcp-remote to proxy HTTP MCP (OAuth prompt on first connect for /mcp/exchange):
Qoder
Edit Qoder MCP settings (e.g. ~/.qoder/mcp.json or in Qoder settings):
Claude Desktop
Claude Desktop supports remote custom connectors; a local proxy is not mandatory. Connect to https://api.gatemcp.ai/mcp for public data or use https://api.gatemcp.ai/mcp/exchange with Gate OAuth2 for authorized private tools.
The repository's Python stdio proxy is an optional public-data compatibility path, without OAuth or SSE parsing. See Claude Desktop setup.
Alternative: gate-local-mcp (local stdio with API keys)
For local development without OAuth, use gate-local-mcp (npm: gate-mcp) — a stdio MCP server that uses GATE_API_KEY / GATE_API_SECRET (optional for public market data only). Configure it as a command-based MCP server (e.g. "command": "npx", "args": ["-y", "gate-mcp"]). By default it registers 384 tools across 22 modules (spot, futures, delivery, margin, wallet, account, options, earn, flash_swap, unified, sub_account, multi_collateral_loan, p2p, tradfi, crossex, alpha, rebate, activity, coupon, launch, square, welfare). Reduce the set with GATE_MODULES or --modules=spot,futures, or enable read-only mode with GATE_READONLY=true / --readonly.
Important: Wire-level tool names use abbreviations (futures→fx, delivery→dc, sub_account→sa, etc.); they differ from the remote api.gatemcp.ai naming. Always use the names returned by tools/list.
Full tool list: gate-local-mcp-tools.md.
LobeHub (desktop)
On the LobeHub MCP marketplace this server appears as identifier gate-gate-mcp. The npm package name is gate-mcp — run npx -y gate-mcp, not gate-gate-mcp.
Per LobeHub custom MCP, stdio servers work on the desktop app only; inject environment variables for Gate API authentication. Use Import JSON when adding a custom skill.
Public endpoints only:
With API key authentication:
You can add GATE_MODULES, GATE_READONLY, or GATE_BASE_URL inside env as needed. Click Test connection before saving.
Other Clients
Basic Usage
Query Price
What's the current price of BTC/USDT?
Get Order Book
Show me the order book for ETH/USDT
K-line Data
Get the daily K-line data for BTC over the last 7 days
Available Tools
All tools use the cex_ prefix. Tools are split between Public MCP (no auth) and Private MCP (OAuth2).
Public MCP (/mcp — no OAuth, 83 tools)
Inventory reference: service version v1.16.7, checked on 2026-11-04. The public name set was checked against the live directory on that date. Counts below separate the two endpoints; private does not include public tools.
Private MCP (/mcp/exchange — OAuth2, source ceiling 310 tools)
Token permissions, account type and operational policies determine visibility; not every user sees 310 tools. Remote sub-account/API-key administration, CrossEx, P2P, activity, coupon, welfare and Launch products are retired. Wallet-level sub-account balances/transfers remain separate from retired administration.
See the remote tool catalogue for names/permissions and CEX reference for inputs, examples, Trail responses and errors.
DEX — Authentication
DEX — Wallet
DEX — Chain & Transactions
DEX — Market Data & Token Info
DEX — Agentic & RPC
For full DEX tool parameters, see gate-dex-mcp. For the Agentic Wallet subset (auth, wallet, market data, resources), see gate-agentic-wallet-mcp.
Info (/mcp/info — 32 tools, no auth)
Public, read-only market research. Categories (full parameter tables: gate-info-mcp):
Open Info (/mcp/open/info — 7 tools, no auth)
ChatGPT / OpenAI Apps submission allowlist only. Full parameter tables: gate-open-info-mcp.
News (/mcp/news — 18 tools, no auth)
Public, read-only news and social research. Categories (full parameter tables: gate-news-mcp):
MCP Resources
The /mcp and /mcp/exchange endpoints also expose MCP Resources for static reference data:
FAQ
Q: Do I need a Gate account?
A: Only for CEX trading and DEX wallet. /mcp, /mcp/info, /mcp/open/info, /mcp/news, and /mcp/docs are fully public — no account needed. /mcp/exchange (CEX trading, balances, transfers) requires Gate OAuth2. /mcp/dex (on-chain wallet, swap) requires Google or Gate OAuth.
Q: Does it support trading?
A: Yes. Connect to /mcp/exchange with Gate OAuth2 for authorized spot, futures, CFD, stock, Earn and strategy operations. Connect separately to /mcp for public data. Sub-account administration is retired; wallet-level sub-account balances/transfers have their own permissions.
Q: How often is the data updated?
A: Data is queried in real-time from Gate's API.
Privacy & Security
- OAuth2 authorization via Gate account (no API keys stored in config)
- All API calls use HTTPS
- See Gate Privacy Policy
Support & Feedback
- API Documentation: Gate API Docs
- Issue Reporting: Please contact Gate support
- Business Inquiries: Contact Gate official channels
Contributing
Report documentation issues through this repository's Issues.
License
MIT © gate.com