Skip to main content
Glama
gate

gatepay-local-mcp

by gate

gatepay-local-mcp

gatepay-local-mcp is a local stdio MCP server for calling X402 payment-protected HTTP endpoints. It provides a suite of MCP tools to handle the complete X402 payment workflow, from placing orders to signing payments and submitting them to merchants.

Features

  • 7 MCP Tools covering order placement, signature flows, quick wallet / Gate Pay auth, and centralized payment retries

  • Built-in X402 payment flow under src/x402/

  • Multiple signing modes: local_private_key, quick_wallet, plugin_wallet

  • Multi-chain support: EVM (Ethereum, Base, Polygon, etc.) and Solana

  • Works with Cursor, Claude Desktop, and other MCP clients

  • Auto-selects the first ready signing mode if not specified

  • Gate Pay centralized payment (sign_mode: centralized_payment) and x402_centralized_payment helper for merchant-side settlement

Related MCP server: x402-mcp

Available Tools

1. x402_place_order

Send an HTTP request and return complete response information including headers, body, and the original request details.

Use case: Initial request to a payment-protected endpoint that returns 402 Payment Required.

Parameters:

{
  url: string;              // Target URL (required)
  method?: string;          // HTTP method: GET, POST, PUT, PATCH (default: POST)
  body?: string;            // JSON string request body (optional)
  sign_mode?: string;       // Signing mode: local_private_key, quick_wallet, plugin_wallet (auto-select if omitted)
  wallet_login_provider?: string; // OAuth provider: google, gate (default: gate)
}

Returns: Complete response with status code, headers (including PAYMENT-REQUIRED), body, and original request details.


2. x402_sign_payment

Parse X402 payment requirements, create a signed payment authorization, and submit the payment to complete a 402-protected request (all-in-one workflow).

Use case: Single-step payment flow - parse, sign, and submit in one call.

Parameters:

{
  url: string;                    // Target URL (required)
  method?: string;                // HTTP method (default: POST)
  body?: string;                  // JSON request body (optional)
  payment_required_header?: string; // Base64-encoded PAYMENT-REQUIRED header
  response_body?: string;         // Response body from 402 response (alternative to header)
  sign_mode?: string;             // Signing mode (auto-select if omitted)
  wallet_login_provider?: string; // OAuth provider (default: gate)
}

Returns: Final response from the merchant after successful payment.


3. x402_create_signature

Parse X402 payment requirements and create a signed payment authorization.

Use case: Two-step workflow - create signature first, then submit separately.

Parameters:

{
  payment_required_header?: string; // Base64-encoded PAYMENT-REQUIRED header
  response_body?: string;         // Response body from 402 response (alternative to header)
  sign_mode?: string;             // Signing mode (auto-select if omitted)
  wallet_login_provider?: string; // OAuth provider (default: gate)
}

Returns: Payment payload and base64-encoded PAYMENT-SIGNATURE header value.


4. x402_submit_payment

Submit a signed payment to complete a 402-protected request.

Use case: Second step of two-step workflow - submit the signature created by x402_create_signature.

Parameters:

{
  url: string;              // Target URL (required)
  method?: string;          // HTTP method (default: POST)
  body?: string;            // JSON request body (optional)
  payment_signature: string; // Base64-encoded PAYMENT-SIGNATURE from x402_create_signature (required)
}

Returns: Final response from the merchant.


5. x402_quick_wallet_auth

Pre-authorize with Quick Wallet using device-flow OAuth (Google or Gate account).

Use case: When using sign_mode: quick_wallet, run this first to complete the device-flow login before making payment requests.

Parameters:

{
  wallet_login_provider?: string; // OAuth provider: google, gate (default: gate)
}

Returns: Authorization status and wallet addresses (EVM and Solana).


6. x402_gate_pay_auth

Complete the Gate Pay OAuth device flow (browser authorize URL + localhost callback + remote token exchange) and cache the resulting access token/UID for centralized payments.

Use case: Required before calling x402_submit_payment with sign_mode: centralized_payment or when preparing to use x402_centralized_payment.

Parameters: None

Returns: Current authorization status with masked Gate Pay UID and access token indicators.


7. x402_centralized_payment

Parse the Base64-encoded PAYMENT-REQUIRED header and complete the Gate Pay centralized payment flow without submitting a PAYMENT-SIGNATURE.

Use case: When a merchant expects Gate Pay centralized settlement (e.g., OTA or off-chain marketplace) and you prefer an all-in-one helper instead of crafting PAYMENT-SIGNATURE.

Parameters:

{
  payment_required_header: string; // Base64-encoded PAYMENT-REQUIRED header (required)
}

Returns: Payment confirmation including prepayId, merchantTradeNo, currency, amount, and the raw API response.


Workflow Examples

1. x402_place_order         → Get payment requirements
2. x402_sign_payment        → Sign and submit payment (all-in-one)

Two-Step Workflow (Advanced)

1. x402_place_order         → Get payment requirements
2. x402_create_signature    → Create signed payment
3. x402_submit_payment      → Submit signed payment

Quick Wallet Pre-Auth

1. x402_quick_wallet_auth   → Authorize with Google/Gate
2. x402_place_order         → Get payment requirements
3. x402_sign_payment        → Sign and submit (using quick_wallet)

Centralized Payment (Gate Pay)

1. x402_gate_pay_auth       → Browser OAuth + token exchange (repeat when token expires)
2. x402_place_order         → Receive PAYMENT-REQUIRED header that encodes Gate Pay order info
3. x402_submit_payment      → Use payment_signature + sign_mode: "centralized_payment" to call the merchant with Authorization: Bearer
   或
3. x402_centralized_payment → Pass payment_required_header directly for all-in-one centralized settlement

Signing Modes

The server supports three automatic signing modes plus a dedicated Gate Pay centralized mode:

sign_mode

Status

Networks / Scope

Description

local_private_key

Ready when EVM_PRIVATE_KEY / SVM_PRIVATE_KEY set

EVM, Solana

Signs locally with your private keys (no external dependencies)

quick_wallet

Ready after OAuth login

EVM, Solana

Custodial MCP wallet with device-flow login (Google/Gate account)

plugin_wallet

Ready when PLUGIN_WALLET_TOKEN set

EVM, Solana

Browser extension wallet (e.g., Gate Wallet) via MCP bridge

centralized_payment

Ready after x402_gate_pay_auth completes

Gate Pay

Adds Authorization: Bearer <Gate Pay access_token> when calling x402_submit_payment or use x402_centralized_payment

Priority Order (auto-selection applies to the first three rows when sign_mode is omitted):

  1. plugin_wallet (priority: 30) - if token configured

  2. quick_wallet (priority: 20) - if MCP endpoint configured

  3. local_private_key (priority: 10) - if private keys configured

The server automatically selects the highest-priority ready mode.

Network Support

  • EVM Networks: Ethereum, Base, Polygon, Arbitrum One, GateChain, GateLayer

  • Solana Networks: Solana Mainnet, Solana Devnet

Quick Start

1. Local Private Key Mode (EVM + Solana)

This is the simplest setup for local signing with your own private keys:

{
  "mcpServers": {
    "gatepay-mcp": {
      "command": "npx",
      "args": ["-y", "gatepay-local-mcp"],
      "env": {
        "EVM_PRIVATE_KEY": "your-evm-private-key-hex-with-or-without-0x-prefix",
        "SVM_PRIVATE_KEY": "your-solana-private-key-base58-optional"
      }
    }
  }
}
  • Set EVM_PRIVATE_KEY for EVM network payments (Ethereum, Base, Polygon, etc.)

  • Set SVM_PRIVATE_KEY for Solana network payments (optional)

  • Put this into your MCP config such as ~/.cursor/mcp.json, then restart or reload MCP

2. Quick Wallet Mode (Custodial)

Remote wallet signing with device-flow OAuth (Google or Gate account):

{
  "mcpServers": {
    "gatepay-mcp": {
      "command": "npx",
      "args": ["-y", "gatepay-local-mcp"],
      "env": {
        "QUICK_WALLET_MCP_URL": "https://walletmcp.gate.com/mcp",
        "QUICK_WALLET_API_KEY": "your-api-key-optional"
      }
    }
  }
}
  • First payment will trigger device-flow login (opens browser)

  • Token is persisted at ~/.gate-pay/auth.json

  • Use x402_quick_wallet_auth tool to pre-authorize

3. Plugin Wallet Mode (Browser Extension)

Sign with browser extension wallet (e.g., Gate Wallet):

{
  "mcpServers": {
    "gatepay-mcp": {
      "command": "npx",
      "args": ["-y", "gatepay-local-mcp"],
      "env": {
        "PLUGIN_WALLET_TOKEN": "your-plugin-wallet-mcp-token"
      }
    }
  }
}
  • Get the token from your browser extension wallet

  • Requires the wallet extension to be installed and running

  • User confirms transactions in the browser extension

4. Gate Pay Centralized Payment (Browser OAuth)

Use this when merchants expect Gate Pay centralized settlement instead of user-owned signatures.

{
  "mcpServers": {
    "gatepay-mcp": {
      "command": "npx",
      "args": ["-y", "gatepay-local-mcp"],
      "env": {
        "GATE_PAY_OAUTH_CLIENT_ID": "your-gate-pay-client-id",
        "GATE_PAY_OAUTH_CLIENT_SECRET": "your-gate-pay-client-secret",
        "GATE_PAY_OAUTH_BACKEND_ORIGIN": "https://www.gate.com/apiw/v2/mcp/oauth",
        "GATE_PAY_ACCOUNT_AUTHORIZE_ORIGIN": "https://gate.com",
        "GATE_PAY_OAUTH_CALLBACK_PORT": "18473",
        "GATE_PAY_CENTRALIZED_PAYMENT_URL": "https://api.gateio.ws/api/v4/pay/ai/order/pay",
        "GATE_PAY_CLIENT_ID": "your-gate-pay-client-id"
      }
    }
  }
}
  • Run x402_gate_pay_auth once per token lifecycle; it opens the Gate consent page and exchanges the code automatically.

  • Use x402_submit_payment with sign_mode: "centralized_payment" after you create a PAYMENT-SIGNATURE, or

  • Call x402_centralized_payment directly with the Base64 PAYMENT-REQUIRED header when you prefer a single-step helper.

Cursor / Claude Desktop with plugin wallet

If you want to use a browser extension wallet (like Gate Wallet) for signing, configure the plugin wallet mode:

{
  "mcpServers": {
    "gatepay-mcp": {
      "command": "npx",
      "args": ["-y", "gatepay-local-mcp"],
      "env": {
        "PLUGIN_WALLET_SERVER_URL": "https://your-plugin-wallet-server.com",
        "PLUGIN_WALLET_TOKEN": "your-token-from-browser-wallet"
      }
    }
  }
}

Before using plugin wallet mode:

  1. Install a compatible browser extension wallet (e.g., Gate Wallet)

  2. Open the wallet extension in your browser and obtain the connection token

  3. Configure PLUGIN_WALLET_SERVER_URL and PLUGIN_WALLET_TOKEN in your MCP config

  4. The wallet extension must be active in your browser when making x402 requests

Environment Variables

The server loads .env from the repository or package root at startup.

Signing Mode Configuration

Variable

Mode

Description

EVM_PRIVATE_KEY

local_private_key

Local EVM private key; hex with or without 0x prefix

SVM_PRIVATE_KEY

local_private_key

Local Solana private key; base58 encoded (optional)

QUICK_WALLET_MCP_URL

quick_wallet

MCP wallet endpoint URL (default: https://walletmcp.gate.com/mcp)

QUICK_WALLET_API_KEY

quick_wallet

API key for MCP wallet service (optional)

PLUGIN_WALLET_TOKEN

plugin_wallet

MCP token from browser extension wallet

Gate Pay Centralized Payment

Variable

Description

GATE_PAY_OAUTH_CLIENT_ID

Gate Pay OAuth client id used for device authorization and token exchange

GATE_PAY_OAUTH_CLIENT_SECRET

Client secret required when exchanging the authorization code for an access token

GATE_PAY_OAUTH_BACKEND_ORIGIN

Base URL for the OAuth backend that hosts the token/refresh endpoints

GATE_PAY_ACCOUNT_AUTHORIZE_ORIGIN

Domain that serves the Gate Pay authorization page (opens in the browser)

GATE_PAY_OAUTH_CALLBACK_PORT

Local port used to receive the OAuth redirect (set to 0 for a random port if needed)

GATE_PAY_OAUTH_SCOPE

OAuth scope requested during device/login flow

GATE_PAY_OAUTH_AUTHORIZE_USER_AGENT

Custom User-Agent for the authorization preflight (defaults to gateio/web)

GATE_PAY_CENTRALIZED_PAYMENT_URL

HTTPS endpoint for submitting centralized payments via Gate Pay

GATE_PAY_CLIENT_ID

Merchant client id embedded in centralized payment payloads

GATE_PAY_OAUTH_TOKEN_BASE_URL

Optional: origin used to derive default token and refresh endpoints

GATE_PAY_OAUTH_TOKEN_URL

Optional: explicit token endpoint path override

GATE_PAY_OAUTH_REFRESH_URL

Optional: explicit refresh endpoint path override

Test and Script Variables

Variable

Used By

Default

Description

RESOURCE_SERVER_URL

test/privateKey.ts

http://localhost:8080

Base URL for the local private-key flow test

ENDPOINT_PATH

test/privateKey.ts

/flight/order

Endpoint path appended to RESOURCE_SERVER_URL

GATEPAY_MCP_TEST_TIMEOUT_MS

test/mcp-x402-request-tool.ts

180000

Timeout for the MCP tool integration test

Usage Examples

// Step 1: Place order to get payment requirements
{
  "tool": "x402_place_order",
  "arguments": {
    "url": "https://api.example.com/order",
    "method": "POST",
    "body": "{\"flightId\":\"FL001\",\"uid\":\"100\"}"
  }
}

// Step 2: If 402 response, sign and submit payment
{
  "tool": "x402_sign_payment",
  "arguments": {
    "url": "https://api.example.com/order",
    "method": "POST",
    "body": "{\"flightId\":\"FL001\",\"uid\":\"100\"}",
    "payment_required_header": "<base64-from-place_order>",
    "sign_mode": "quick_wallet"
  }
}

Example 2: Two-Step Payment (Advanced)

// Create signature first
{
  "tool": "x402_create_signature",
  "arguments": {
    "payment_required_header": "<base64>",
    "sign_mode": "local_private_key"
  }
}

// Then submit separately
{
  "tool": "x402_submit_payment",
  "arguments": {
    "url": "https://api.example.com/order",
    "payment_signature": "<base64-from-create_signature>"
  }
}

Example 3: Quick Wallet with Pre-Auth

// Pre-authorize (opens browser for OAuth)
{
  "tool": "x402_quick_wallet_auth",
  "arguments": {
    "wallet_login_provider": "gate"
  }
}

Example 4: Gate Pay Centralized Payment

// Step 1: Run OAuth (opens Gate authorize page)
{ "tool": "x402_gate_pay_auth", "arguments": {} }

// Step 2a: Use centralized helper
{
  "tool": "x402_centralized_payment",
  "arguments": {
    "payment_required_header": "<base64-from-place_order>"
  }
}

// Step 2b: Or submit with sign_mode: centralized_payment
{
  "tool": "x402_submit_payment",
  "arguments": {
    "url": "https://api.example.com/order",
    "method": "POST",
    "payment_signature": "<base64-from-create_signature>",
    "sign_mode": "centralized_payment"
  }
}

Agent Skill

  • skills/SKILL.md contains the gatepay-x402 skill manifest and prompts so MCP-aware IDEs (Cursor, Claude Desktop, Codex CLI, etc.) know how to call every tool exposed by this server.

  • skills/gatepay-x402.md (mirrored at docs/gatepay-x402.md) is a natural-language installation guide. Share that link with your AI host for a “one-click” experience: the host can follow the steps to download gatepay-local-mcp, register it in mcpServers, and copy the gatepay-x402 skill into its skills directory automatically.

Tool names and arguments always match each tool’s MCP inputSchema on the server you connect to; check your client’s tool list if you ship a trimmed build.

Development

# install dependencies
npm install

# build TypeScript output into dist/
npm run build

# start the MCP server from source
npm run dev

# run the built entrypoint through the package start script
npm start

# run unit tests
npm run test:unit

# run the local private key flow test
npm run test:privateKey

# run the MCP tool integration test
npm run test:mcp-tool

Integration test notes

npm run test:mcp-tool starts dist/src/index.js and calls x402_request against the configured remote wallet flow. The test requires proper wallet credentials to be configured.

npm run build
npm run test:mcp-tool

If you already logged in before, the saved token in ~/.gate-pay/auth.json will be reused. Otherwise the quick wallet flow may require interactive device login. You can increase the timeout with GATEPAY_MCP_TEST_TIMEOUT_MS.

License

MIT

Available Tools

7 tools
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.

ParametersJSON Schema
NameRequiredDescriptionDefault
payment_required_headerYesBase64-encoded PAYMENT-REQUIRED header value containing payment information

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses key behaviors: automatic OAuth handling, amount conversion from smallest unit (divide by 10^6), specific fields parsed from the header, and a return value containing transaction details. It does not mention error conditions or side effects, but the core mutating action is clear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, front-loading the primary action and then adding only necessary details about auth and parsing. Every sentence contributes meaningful information without redundancy or verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has one parameter, no output schema, and moderate complexity. The description covers the input processing, the external API call, and the return type sufficiently. It lacks explicit sequencing guidance among sibling tools, but is otherwise complete for its scope.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema describes the parameter as a Base64-encoded PAYMENT-REQUIRED header value, with high coverage. The description adds meaning beyond the schema by explaining what payment information is extracted (amount, currency, prepayId, orderId) and the amount unit conversion, which is valuable for correct invocation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific action ('Execute centralized payment') and specifies the mechanism (parsing PAYMENT-REQUIRED header and calling the Gate Pay API). It also distinguishes itself from sibling x402_gate_pay_auth by noting it handles the same auth automatically, making the tool's role unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is used when a PAYMENT-REQUIRED header is present and notes that OAuth is handled automatically, avoiding a separate call to x402_gate_pay_auth. However, it does not explicitly compare against other payment-related siblings like x402_submit_payment or x402_place_order, so exclusion criteria are not fully stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
sign_modeNoOptional preferred signing mode. Omit to auto-select the highest-priority ready mode.
response_bodyNoOptional: Response body from 402 response, used if PAYMENT-REQUIRED header is not available
wallet_login_providerNoWhen quick_wallet needs login: OAuth provider (google or gate). Defaults to gate.
payment_required_headerNoBase64-encoded PAYMENT-REQUIRED header value from a 402 response

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It describes the operation (parse, create signature) and the return value (payload and header), and lists supported signing modes. However, it does not disclose potential prerequisites (e.g., wallet configuration), failure modes, or authentication requirements, leaving some behavioral gaps for a signing tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, front-loaded with the primary action and returns. It efficiently states the purpose, supported modes, and downstream usage without wasted words. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 4 optional parameters, no output schema, and no annotations, the description covers the main outcomes (returned payload and header) and integration with x402_submit_payment. It also lists signing modes. It could be more complete by describing the exact return structure or edge cases, but it is adequate for the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides 100% parameter description coverage, so the baseline is 3. The description adds minimal semantics beyond the schema by mentioning signing modes, which aligns with the sign_mode enum, but it does not add deeper meaning for the other parameters (e.g., how payment_required_header interacts with response_body).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb+resource: 'Parse X402 payment requirements and create a signed payment authorization.' It clearly states what the tool does and what it returns (payload with signature and PAYMENT-SIGNATURE header). It does not explicitly differentiate itself from the sibling x402_sign_payment, but the mention of parsing requirements and returning a complete payload adds specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clear context is provided by stating the output can be used with x402_submit_payment to complete the payment request, which implies when to use this tool (before submission). However, it does not mention exclusions or explicitly contrast with alternative sibling tools like x402_sign_payment, so it lacks full 'when not to use' guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully takes on the burden of behavioral disclosure. It thoroughly details the OAuth flow: browser opens the Gate authorize URL, redirect hits localhost callback, client exchanges code for access_token via the remote OAuth backend, and the token is stored in-process for later Authorization Bearer header. It even lists the success JSON fields, providing transparent operational expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a compact paragraph of three sentences, front-loaded with the trigger condition and then systematically covering the OAuth flow, storage, downstream use, and success output. Every sentence contributes valuable information without redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with no output schema and no annotations, the description is exceptionally complete. It covers the trigger, the full OAuth mechanism, the in-process storage side effect, downstream integration with x402_submit_payment, and differentiates from related tools. No important operational context is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the schema is trivially complete and the baseline score of 4 applies. While the description does not add parameter-level detail (there are none), it explains the overall process and side effects, which is sufficient for a parameterless tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'run this tool to complete Gate Pay OAuth' and specifies the exact trigger condition ('When the user chooses centralized_payment'). It distinguishes itself from the sibling tool x402_quick_wallet_auth by clarifying that wallet MCP login is separate and not used for Gate Pay.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides an explicit when-to-use rule: run when the user chooses centralized_payment. It also names an alternative (wallet MCP login) and explicitly excludes it from Gate Pay, giving the agent clear guidance on tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesFull URL of the endpoint. Must be a complete http/https URL.
bodyNoJSON string request body for POST/PUT/PATCH. Omit for GET.
methodNoHTTP method: GET, POST, PUT, or PATCH. Default POST.

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses response structure (status, headers, body, original request) but omits side effects, financial implications, or order placement behavior hinted by the name. The description presents a benign HTTP call while the name suggests a mutating financial action, which is misleading.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the primary purpose, and contains no redundant information. It is concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description enumerates return values but fails to address the broader payment/order context, error handling, or integration with sibling x402 tools. Given the complexity implied by the name and sibling set, it is incomplete and leaves significant operational gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, with all parameters (url, body, method) described including the method enum. The description adds no additional parameter meaning beyond the schema, so it meets the baseline for high schema coverage but doesn't elevate understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it sends an HTTP request and returns complete response details, which is a specific verb+resource. However, it is misaligned with the tool name 'x402_place_order', which implies a business order placement rather than a generic HTTP client, and it doesn't distinguish itself from payment-focused sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides a general usage context ('Use this for any HTTP request where you need full response details') but no explicit when-not-to-use guidance or alternatives. It doesn't explain how this tool relates to siblings like x402_submit_payment, leaving the agent without clear selection criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
wallet_login_providerNoDevice-flow OAuth provider when MCP token is missing or expired. google = Google account, gate = Gate account. Defaults to gate.

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral burden. It discloses that a valid MCP token short-circuits to ready status, otherwise a browser flow opens, and it reveals side effects such as post-login confirmation, session persistence until restart, and the need to restart to switch providers. These are substantial behavioral traits beyond a simple 'auth' label.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with the trigger and purpose. Each of the four sentences contributes unique information: trigger/purpose, valid-token behavior, fresh-login confirmation, and provider/session caveat. There is no filler or redundant wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no output schema and no annotations, so the description must cover both normal and interactive flows. It covers the valid-token path, the browser-flow path, provider selection, post-login confirmation, and session/restart behavior. It does not detail failure modes or return structure, but for an auth handoff tool this is reasonably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already provides 100% coverage for wallet_login_provider with enum values and descriptions. The description adds the default value ('Gate by default') and explains how the parameter maps to the browser flow, plus the restart constraint for changing providers. This exceeds the baseline 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific trigger ('when user selects sign_mode quick_wallet') and a clear action ('run this tool first to perform device-flow login/authorization'). It also states explicit outcomes (returns ready status and wallet addresses, or opens a browser flow), which distinguishes it from sibling tools. This is a specific verb+resource+scope, not a tautology.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states when to use the tool ('when user selects sign_mode quick_wallet, run this tool first') and gives sequencing context ('before continuing to payment'). It does not name sibling alternatives or provide when-not-to-use conditions, but the trigger is clear enough. This is clear contextual guidance without exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesTarget URL for the payment request
bodyNoJSON string request body (optional)
methodNoHTTP method for the request
sign_modeNoOptional preferred signing mode. Omit to auto-select the highest-priority ready mode.
response_bodyNoOptional: Response body from 402 response, used for parsing payment requirements if PAYMENT-REQUIRED header is not available
wallet_login_providerNoWhen quick_wallet needs login: google = Google account, gate = Gate account. Defaults to gate.
payment_required_headerNoBase64-encoded PAYMENT-REQUIRED header value from a 402 response

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and discloses the complete workflow: parsing, signing, and submission. It explicitly notes that Gate Pay auth is not performed via MCP calls, a useful behavioral constraint. It does not detail potential side effects like actual fund transfer or failure modes, but the payment intent is clear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, front-loaded with the main action. It efficiently covers purpose, signing modes, and an important exception for centralized payment. The inclusion of the Chinese phrase is slightly redundant but not harmful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the main workflow, input alternatives, and mode selection. It omits return value details, but with no output schema, some ambiguity remains. Overall, for a complex tool with 7 parameters, it is reasonably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds meaning by explaining that payment_required_header and response_body are alternative inputs and by clarifying the wallet types for sign_mode (local EVM wallet, custodial MCP wallet, browser extension wallet), which goes beyond the schema's brief descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool parses X402 payment requirements, creates a signed payment, and submits it to complete a 402-protected request. It lists specific signing modes, distinguishing it from siblings like x402_submit_payment, which is referenced for centralized payments.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly instructs that for centralized payment (中心化支付), users should obtain a Gate Pay access token via x402_gate_pay_auth and use x402_submit_payment instead, providing a clear alternative. It also specifies the two input sources (payment_required_header or response_body) and when to use each.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesTarget URL for the payment request
bodyNoJSON string request body (optional)
methodNoHTTP method for the request. Default POST.
sign_modeNoWhen set to centralized_payment (中心化支付), completes Gate Pay OAuth (browser + localhost callback + remote token) if needed and sends Authorization: Bearer <Gate Pay access_token> with the request. Other modes omit this header.
payment_signatureYesBase64-encoded PAYMENT-SIGNATURE header value from x402_create_signature

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations present, the description carries the full disclosure burden. It covers key behaviors: submitting the signed payment, conditional OAuth execution (local callback + remote token exchange), attaching the Bearer token, and returning the merchant's final response. It stops short of explaining error cases, idempotency, or failure modes, but the main behavioral traits are disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three focused sentences. The purpose is front-loaded in the first sentence, and each subsequent sentence adds necessary detail about input source and conditional behavior. There is no fluff or repetition, making it appropriately sized for the complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema and moderate complexity, the description explains the return value (final response from merchant) and the conditional auth flow. It also ties into the sibling workflow by referencing x402_create_signature. It lacks explicit instruction on when NOT to use it or potential failure scenarios, but it is sufficient for correct summoning in a typical flow.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds meaningful context beyond the schema by linking payment_signature to x402_create_signature and explaining that sign_mode=centralized_payment triggers OAuth and an Authorization header. This helps an agent understand the relationships between parameters, raising it above baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: "Submit a signed payment to complete a 402-protected request." It clearly identifies the tool's role in the payment flow and distinguishes it from siblings by referencing input from x402_create_signature. The purpose is unmistakable and does not rely on the tool name alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies a clear workflow position: "Takes the payment_signature from x402_create_signature" indicates this is used after signature creation. It also notes the conditional handling of sign_mode when set to centralized_payment, aligning with x402_gate_pay_auth. However, it does not explicitly contrast with sibling x402_centralized_payment, so no direct alternatives or exclusions are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 7 tool updatesv1.0.8
    • First observedx402_centralized_payment
    • First observedx402_create_signature
    • First observedx402_gate_pay_auth
    • First observedx402_place_order
    • First observedx402_quick_wallet_auth
    • First observedx402_sign_payment
    • First observedx402_submit_payment

TDQS

A3.6/5.0
Disambiguation2/5

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.

Naming Consistency3/5

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.

Tool Count4/5

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.

Completeness4/5

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.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

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/gatepay-local-mcp'

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