Skip to main content
Glama
MercanPay MCP Server

MercanPay MCP Server

Official
by MercanPay

MercanPay MCP server

Let Claude, Cursor, Windsurf and any other Model Context Protocol client take crypto payments for you. Ask in plain words — "create a 49 USD invoice for the logo design and write the customer a message" — and the assistant creates a MercanPay invoice that your customer pays in USDT (TRC20) or TRX.

You:        Bill Acme 250 USD for the October retainer, order ACME-10.
Assistant:  Created invoice for 250 USD (order ACME-10). Payment page: https://mercanpay.com/pay/3f2c…
            The customer can pay with USDT or TRX; the rate is locked for 30 minutes.
  • Invoices — create, look up (by id or your order id), list, cancel

  • Payment links — reusable pay pages with a QR code for Telegram, Instagram, WhatsApp or your site (fixed price or open amount)

  • Rates — current USD prices of USDT and TRX

  • Test mode — with a mp_test_… key nothing real moves, and simulate_payment lets you try paid / partial / expired

  • Safe by design — there is no payout tool: an assistant can create and read payments, never send money out of your account

Quick start

  1. Create a free MercanPay account at mercanpay.com.

  2. In the panel open API keys and create a key with the invoices and read scopes. Start with a test key (mp_test_…).

  3. Add the server to your client (below). Node.js 18+ is required; npx downloads the package for you.

Claude Desktop

claude_desktop_config.json (Settings → Developer → Edit config):

{
  "mcpServers": {
    "mercanpay": {
      "command": "npx",
      "args": ["-y", "mercanpay-mcp"],
      "env": { "MERCANPAY_API_KEY": "mp_test_your_key" }
    }
  }
}

Claude Code

claude mcp add mercanpay --env MERCANPAY_API_KEY=mp_test_your_key -- npx -y mercanpay-mcp

Cursor / Windsurf / VS Code

Add the same block to .cursor/mcp.json, ~/.codeium/windsurf/mcp_config.json or your VS Code MCP settings:

{ "mcpServers": { "mercanpay": { "command": "npx", "args": ["-y", "mercanpay-mcp"], "env": { "MERCANPAY_API_KEY": "mp_test_your_key" } } } }

Related MCP server: @payre/mcp

Tools

Tool

What it does

create_invoice

New payment request. price_usd (customer picks USDT or TRX, rate locked) or token + amount. Optional order_id, description, success_url, expires_in_minutes, metadata. Returns payment_url.

get_invoice

Status (pending, partial, paid, overpaid, expired, cancelled), amounts and payments of one invoice.

find_invoice_by_order

The invoice created for one of your order ids.

list_invoices

Recent invoices, filter by status.

cancel_invoice

Cancel an unpaid invoice (marked destructive, so clients ask you first).

create_payment_link

Reusable pay page with QR code, fixed or open amount. Live keys only.

list_payment_links / update_payment_link

Your links; change title or price, switch on / off. Live keys only.

get_rates

USD prices of USDT and TRX.

simulate_payment

Test keys only: mark a test invoice paid, partial, overpaid or expired (webhooks fire as usual).

Prompt: payment_request — creates an invoice and drafts a customer message with the link, in the language you choose.

Configuration

Variable

Required

Default

MERCANPAY_API_KEY

yes

— (mp_… live or mp_test_… test key)

MERCANPAY_BASE_URL

no

https://mercanpay.com

Use a key with only the invoices and read scopes. The server talks to the MercanPay REST API over HTTPS and stores nothing.

About MercanPay

MercanPay is a crypto payment gateway for USDT (TRC20) and TRX: hosted payment page, REST API, signed webhooks, payment links, free plugins for WooCommerce, WordPress and OpenCart, and PHP / Python libraries. Fees from 0.4%, no chargebacks, payments final in about a minute. Documentation · Integrations · Free tools

Development

npm install
npm run build
npm test
MERCANPAY_API_KEY=mp_test_… node e2e.mjs   # end-to-end over stdio against the API

MIT © MercanPay

Available Tools

7 tools
cancel_invoiceCancel invoiceA
DestructiveIdempotent

Cancel an unpaid invoice so it can no longer be paid. Ask the user to confirm first.

Inputs: id (required).

create_invoiceCreate invoiceA

Create a payment request and get a hosted payment page (payment_url) to send to the customer. Either price_usd (customer picks TRX or USDT, rate locked) or token + amount (fixed coin amount). Minimum 10 USD. Use order_id to make it idempotent and to find it later.

Inputs: token, amount, tokens, metadata, +5 more.

find_invoice_by_orderFind invoice by order idC
Read-only

Look up the invoice created for one of your order ids.

Inputs: order_id (required).

get_invoiceGet invoiceA
Read-only

Status and details of one invoice: pending, partial, paid, overpaid, expired or cancelled, amounts, payments and payment_url.

Inputs: id (required).

get_ratesGet ratesA
Read-only

Current USD prices of the supported coins (USDT and TRX), as used for USD-priced invoices.

Inputs: no named parameters.

list_invoicesList invoicesA
Read-only

Recent invoices, newest first. Filter by status; page with before (created_at of the last item).

Inputs: limit, before, status.

simulate_paymentSimulate payment (test mode)A

Test keys only: pretend the customer paid, paid part, overpaid, or let the invoice expire. Fires the same webhooks as real payments.

Inputs: id (required), outcome (required), amount.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 7 tools

    Disambiguation4/5

    Each tool targets a distinct action: create, retrieve one by id, find by order id, list, cancel, simulate, and rate lookup. The trio get_invoice / find_invoice_by_order / list_invoices could be momentarily confused, but descriptions clearly delineate id-lookup vs order-id-lookup vs paginated listing.

    Naming Consistency5/5

    All tools follow a consistent snake_case verb_noun pattern (get_invoice, create_invoice, cancel_invoice, list_invoices, get_rates). find_invoice_by_order adds a qualifier but stays within the same convention and reads naturally.

    Tool Count5/5

    Seven tools is well-scoped for an invoice/payments domain, covering creation, lookup, listing, cancellation, testing, and rates without redundancy. Every tool earns its place.

    Completeness4/5

    Core invoice lifecycle is covered (create, read, list, find, cancel) plus test payments and rate lookup. Minor gaps remain: no explicit refund or invoice-update operation, and nothing for webhook configuration or listing past payments at scale.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Accept crypto payments from AI agents: create an invoice in one call and get a hosted checkout link (USDC/USDT on Celo, Base, Arbitrum, Polygon, BSC). No API key, instant self-custody settlement.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants to securely interact with Payre's Web3 payment gateway for generating crypto checkout invoices, monitoring settlements, managing payout destinations, and inspecting analytics.
      18
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables an AI coding assistant to create and manage products, prices, payment links, invoices, customers, subscriptions, entitlements, refunds, and webhooks, simulate test payments, read payments and receipts, and verify buyer access through a crypto payment API.
      38
      105 npm
      MIT