gatepay-local-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| EVM_PRIVATE_KEY | No | Local EVM private key for local_private_key mode, hex with or without 0x prefix | |
| SVM_PRIVATE_KEY | No | Local Solana private key for local_private_key mode, base58 encoded (optional) | |
| GATE_PAY_CLIENT_ID | No | Merchant client id for centralized payment payloads | |
| PLUGIN_WALLET_TOKEN | No | MCP token from browser extension wallet for plugin_wallet mode | |
| GATE_PAY_OAUTH_SCOPE | No | OAuth scope for device/login flow | |
| QUICK_WALLET_API_KEY | No | API key for MCP wallet service (optional) | |
| QUICK_WALLET_MCP_URL | No | MCP wallet endpoint URL for quick_wallet mode | https://walletmcp.gate.com/mcp |
| GATE_PAY_OAUTH_CLIENT_ID | No | Gate Pay OAuth client id for centralized payment mode | |
| GATE_PAY_OAUTH_TOKEN_URL | No | Explicit token endpoint path (optional) | |
| PLUGIN_WALLET_SERVER_URL | No | Plugin wallet server URL (optional, used in some configurations) | |
| GATE_PAY_OAUTH_REFRESH_URL | No | Explicit refresh endpoint path (optional) | |
| GATE_PAY_OAUTH_CALLBACK_PORT | No | Local port for OAuth redirect | 18473 |
| GATE_PAY_OAUTH_CLIENT_SECRET | No | Gate Pay OAuth client secret for centralized payment mode | |
| GATE_PAY_OAUTH_BACKEND_ORIGIN | No | Base URL for OAuth backend for centralized payment mode | |
| GATE_PAY_OAUTH_TOKEN_BASE_URL | No | Origin used to derive default token and refresh endpoints (optional) | |
| GATE_PAY_CENTRALIZED_PAYMENT_URL | No | HTTPS endpoint for submitting centralized payments | |
| GATE_PAY_ACCOUNT_AUTHORIZE_ORIGIN | No | Domain for Gate Pay authorization page | https://gate.com |
| GATE_PAY_OAUTH_AUTHORIZE_USER_AGENT | No | Custom User-Agent for authorization preflight | gateio/web |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| x402_place_orderB | Send an HTTP request and return complete response information including headers, body, and the original request details. Returns status code, all response headers (including PAYMENT-REQUIRED if present), response body, and the original request parameters. Use this for any HTTP request where you need full response details. |
| x402_sign_paymentA | Parse X402 payment requirements from PAYMENT-REQUIRED header or response body, create a signed payment authorization, and submit the payment to complete a 402-protected request. Supports signing modes: local_private_key (local EVM wallet), quick_wallet (custodial MCP wallet), and plugin_wallet (browser extension wallet). For centralized payment (中心化支付), obtain Gate Pay access_token via x402_gate_pay_auth and use x402_submit_payment with sign_mode centralized_payment — no MCP calls for Gate Pay auth. Provide either payment_required_header or response_body containing X402 payment requirements. |
| x402_create_signatureA | Parse X402 payment requirements and create a signed payment authorization. Returns the complete payment payload including signature and the base64-encoded PAYMENT-SIGNATURE header value. Supports signing modes: local_private_key, quick_wallet, and plugin_wallet. The output can be used with x402_submit_payment to complete the payment request. |
| x402_submit_paymentA | Submit a signed payment to complete a 402-protected request. Takes the payment_signature from x402_create_signature and sends it to the merchant along with the original request. When sign_mode is centralized_payment, runs Gate Pay OAuth (local callback + remote token exchange) if needed, same as x402_gate_pay_auth, no MCP, and attaches Authorization: Bearer . Returns the final response from the merchant. |
| x402_gate_pay_authA | When the user chooses centralized_payment (中心化支付), run this tool to complete Gate Pay OAuth: browser opens Gate authorize URL, redirect hits localhost callback, then the client exchanges the code for access_token via the remote OAuth backend (GATE_PAY_OAUTH_TOKEN_BASE_URL, etc.). Stores access_token in-process for Authorization: Bearer on x402_submit_payment when sign_mode is centralized_payment. Success JSON includes gate_pay_access_token_masked and gate_pay_uid_masked (脱敏). Wallet MCP login (x402_quick_wallet_auth) is separate and not used for Gate Pay. |
| x402_quick_wallet_authA | When the user selects sign_mode quick_wallet, run this tool first to perform the same device-flow login/authorization as the quick_wallet signing path. If the in-process MCP token is already valid, returns ready status and wallet addresses; otherwise opens the browser flow (Gate by default, or Google if wallet_login_provider is google). After a fresh login succeeds, the user may need to confirm before continuing to payment. To switch authorization provider (e.g. Gate vs Google), restart the MCP server; the in-process wallet client keeps the current session until restart. |
| x402_centralized_paymentA | Execute centralized payment (中心化支付) by parsing PAYMENT-REQUIRED header, extracting payment information, and calling the Gate Pay centralized payment API. Automatically handles Gate Pay OAuth authentication if needed (same as x402_gate_pay_auth). Parses amount (converts from smallest unit by dividing by 10^6), currency, prepayId, and orderId from the header. Returns payment result including transaction details. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Multiple tools have overlapping purposes and unclear boundaries. x402_sign_payment, x402_create_signature, x402_submit_payment, and x402_centralized_payment all handle payment signing/submission in overlapping ways, and the auth tools overlap with the centralized payment tool's OAuth handling. An agent would struggle to select the correct tool for a given situation.
The x402_ prefix provides a consistent namespace, but the verb/noun pattern is mixed. Tools like place_order, sign_payment, create_signature, and submit_payment are verb-first, while gate_pay_auth, quick_wallet_auth, and centralized_payment are noun-first. 'centralized_payment' also reads as a noun phrase rather than a clear action, reducing predictability.
Seven tools is within the typical reasonable range for a payment-focused server. However, several tools are redundant (e.g., sign_payment duplicates create_signature + submit_payment, and centralized_payment duplicates gate_pay_auth + submit_payment for central payments), so the set feels slightly bloated rather than tightly scoped.
The core X402 flow—sending a request, parsing PAYMENT-REQUIRED, signing, and submitting—is well covered, including authentication for quick wallet and centralized payment modes. Minor gaps exist, such as no explicit tool for local private key configuration or plugin wallet authentication, and no payment status/refund operations, but these are not critical for the primary use case.