# gate-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/gate/gate-local-mcp  
**GitHub Stars:** 1  
**npm Downloads (last month):** 1150  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/gate-mcp

## Description
Gate API v4 MCP server — spot, futures, options, wallet, and more.

## Tools
Capabilities this server exposes over MCP:

- **cex_square_list_square_ai_search**
- **cex_square_list_live_replay**

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "gate-mcp": {
    "command": "npx",
    "args": ["-y","gate-mcp"],
    "env": {
      "GATE_API_KEY": "",
      "GATE_API_SECRET": "",
      "GATE_BASE_URL": "",
      "GATE_MODULES": "",
      "GATE_READONLY": ""
    }
  }
}
```

**Requires environment variables:** `GATE_API_KEY`, `GATE_API_SECRET`, `GATE_BASE_URL`, `GATE_MODULES`, `GATE_READONLY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What gate-mcp MCP server does

The gate-mcp MCP server connects MCP-compatible clients to Gate’s API v4 through a local stdio process. It registers tools for exchange and account operations across a broad set of API areas, including spot, futures, delivery, margin, wallet, account, options, Earn, Flash Swap, Unified, sub-accounts, P2P, TradFi, CrossEx, Alpha, rebates, activity, coupons, launch features, Square, asset swaps, bots, and withdrawals.

The default installation registers 384 tools. Public functions such as market data, tickers, order books, trades, and candlesticks can be used without API credentials. Authenticated functions become available when both the Gate API key and secret are supplied, covering actions such as order management, account queries, transfers, and wallet operations where supported by the selected modules.

## How it works

An MCP client starts the package with a command such as `npx -y gate-mcp`. The process communicates locally over stdio and presents the selected Gate API operations as MCP tools. The default API base URL is `https://api.gateio.ws`, and it can be replaced for environments such as Gate’s testnet.

The gate-mcp MCP server supports module selection to reduce the number of registered tools. For example, a client can load only `spot,futures`. A read-only mode disables write operations, including order and transfer tools. These controls are useful for clients that warn about large tool collections or for workflows that should only inspect market and account data.

## Setup and configuration

Add the server to an MCP client configuration with `npx`, using the package name `gate-mcp`. Public-only use needs no environment variables. Authenticated use requires both `GATE_API_KEY` and `GATE_API_SECRET`.

Supported configuration variables include:

- `GATE_API_KEY`: API key for authenticated endpoints.
- `GATE_API_SECRET`: API secret for authenticated endpoints.
- `GATE_BASE_URL`: alternate API base URL, including the testnet endpoint.
- `GATE_MODULES`: comma-separated modules to register, such as `spot,futures`.
- `GATE_READONLY`: set to `true` to disable write tools.

The same module and read-only settings can also be supplied as `--modules` and `--readonly` command-line options. Keep credentials in the client’s environment configuration rather than embedding them in prompts.

## Tools and capabilities

The gate-mcp MCP server groups its tools by Gate API module. Spot tools cover currencies, pairs, tickers, books, trades, candles, fees, accounts, orders, batch orders, and triggered orders. Futures tools include contracts, funding data, positions, leverage, risk limits, orders, trailing orders, and price-triggered orders.

Other registered groups provide functions for delivery contracts, margin accounts and loans, options, Earn products, wallet and account operations, sub-accounts, multi-collateral loans, P2P, TradFi, CrossEx, Alpha, rebates, activities, coupons, launches, Square, asset swaps, bots, and withdrawals. The exact available set depends on the modules enabled at startup.

## Limitations and notes

This is the local stdio variant. The repository documentation points users needing HTTP or SSE access to a separate remote MCP repository. Authenticated operations depend on valid Gate credentials, while public operations do not. The default configuration loads all modules and tools, so restricting `GATE_MODULES` may be appropriate for clients with tool-count limits. Setting read-only mode prevents write tools but does not replace careful API credential and account-permission management.

_Full upstream README: https://allmcps.com/mcp/gate-mcp/readme_

