Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gate.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Model Context Protocol (MCP) is an open protocol for passing context between clients and external tools. Merchant MCP implements this protocol and acts as a bridge between your client and GatePay APIs. When a user issues a natural-language instruction, Merchant MCP maps it to the appropriate GatePay API request and returns the structured result.

Merchant MCP can be connected through standard MCP clients and used to translate natural-language requests into GatePay API calls.

How it works

  1. The user sends a request such as “Check my USDT balance.”
  2. The client identifies the intent and calls a Merchant MCP tool such as balances_get.
  3. Merchant MCP signs and forwards the request to GatePay by using the merchant’s restricted API key.
  4. GatePay returns the result, and Merchant MCP passes structured data back to the client.
  5. The client presents the result in a user-friendly way.

Installation and configuration

Prerequisites

  1. Complete GatePay merchant onboarding.
  2. Create an app and obtain the payment secret, ClientId, and restricted API key.

Client configuration

Add the following JSON block to your MCP client settings. Replace the placeholders with real credentials, then restart or reload the client.
{
  "mcpServers": {
    "gatepay": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "payment-mcp"],
      "env": {
        "GATEPAY_CLIENT_ID": "CLIENT_ID",
        "GATEPAY_SECRET_KEY": "SECRET_KEY",
        "GATEPAY_RESTRICTED_KEY": "RESTRICTED_KEY",
        "GATEPAY_BASE_URL": "https://openplatform.gateapi.io/payment/open/api/mcp"
      }
    }
  }
}
https://mintcdn.com/gateglobalcorp/-BUf7BZGLTCh5iYe/icon/github.svg?fit=max&auto=format&n=-BUf7BZGLTCh5iYe&q=85&s=846d0112b821219571bdcbee940d2d07

Source code and additional notes

Restricted API key

For production use, create a restricted API key for Merchant MCP and grant only the permissions required by the tools you plan to expose.
  1. Sign in to the GatePay merchant console.
  2. Open the developer center and create the payment secret and application.
  3. Create a restricted API key and select only the permissions needed for your enabled tools.
  4. Save the payment secret, ClientId, and restricted API key for later configuration.

Supported tools

Merchant MCP currently provides the following tools.
CapabilityTool
Query payout order statuswithdrawQuery
Query refund details by refund IDv2PayRefundDetails
Query exchange rates between fiat and cryptorateQuery
Query merchant available balancev1Balance
Query order details by order IDv2QueryOrder
Create a standard refundv2StandardOrderRefund
Query supported chains for a given receive currencyv1PayAddressChains
Query supported currencies for Gate address paymentv1PayAddressCurrencies
Create a fixed receiving addressfixedAddressCreate
Create a payment linkpayCode

FAQ

Which clients are supported?

Any client that supports MCP can connect by adding the mcpServers configuration shown above.

Does Merchant MCP cache API responses?

No. Each tool call is forwarded to GatePay in real time so the client receives the latest available data.

How should API keys be protected?

  1. Use a restricted API key with the minimum required permissions.
  2. Pass credentials through environment variables instead of hardcoding them.
  3. Prefer the hosted deployment model in production environments.

How should failed tool calls be investigated?

  1. Verify that the API key and secret are configured correctly.
  2. Confirm that the restricted key includes the required permissions.
  3. Confirm that network connectivity is available.
  4. Check the Merchant MCP logs and the returned error code.

Are batch operations supported?

Current tools focus on single-request operations. For bulk workflows, clients can run multiple tool calls and aggregate the results at the application layer.