# xpayr-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/xpayrcom/xpayr-mcp-server  
**GitHub Stars:** 0  
**npm Downloads (last month):** 777  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/xpayr-mcp

## Description
Official XPayr Model Context Protocol (MCP) Server & CLI Launcher exposing 21 Non-Custodial Crypto Checkout, Multi-Chain Payment Link, Signed Webhook, and AI Agent Commerce tools for Claude Desktop, Cursor, and VS Code.

## Tools
Capabilities this server exposes over MCP:

- **xpayr_health_check** — Check XPayr Gateway API v1 operational health, version, and server timestamp (public endpoint, no API key required).
- **xpayr_create_payment_session** — Create a non-custodial crypto payment session supporting Dual Checkout (Web3 1-Click Pay & Direct Transfer / QR from Binance/Bybit/OKX with on-chain explorer verification), multi-chain agnostic links, 1-year reusable payment links, and automated HTML invoice email delivery.
- **xpayr_get_payment_session** — Retrieve full details, metadata, settlement split amounts, checkout mode, and on-chain transaction hash for a specific XPayr payment session.
- **xpayr_list_payment_sessions** — List merchant crypto payment sessions with optional filtering by status (pending, completed, expired, failed), currency, network, and pagination.
- **xpayr_get_public_payment_status** — Poll real-time public checkout status, on-chain tx_hash, sender wallet address, block confirmations, and paid_at timestamp for any session (public endpoint, no API key required).
- **xpayr_apply_payment_coupon** — Validate and apply a merchant discount coupon code to an active pending payment session and recalculate the effective crypto price.
- **xpayr_get_merchant_profile** — Retrieve authenticated merchant profile, business name, primary settlement wallet address, commission rate in basis points (50 bps = 0.5%), active API keys, and livemode status.
- **xpayr_get_merchant_balance** — Query confirmed non-custodial settlement volume, transaction counts, total merchant received amounts, and platform fees grouped by currency and blockchain network.
- **xpayr_get_supported_networks** — List all active EVM, TRON, Solana, and Arc Mainnet/Testnet blockchain networks, chain IDs, RPC endpoints, smart-contract splitters, and supported tokens enabled for the current API key mode.
- **xpayr_get_webhook_config** — Inspect the merchant webhook callback URL, masked HMAC-SHA256 signing secret, and subscribed payment lifecycle events (payment.pending, payment.completed, payment.failed, payment.expired).
- **xpayr_set_webhook_endpoint** — Configure or update the merchant HTTPS webhook receiver URL and generate a fresh 32-byte HMAC-SHA256 signing secret.
- **xpayr_send_test_webhook** — Dispatch a signed test.webhook event with HMAC-SHA256 headers to the configured merchant webhook URL to verify signature validation and delivery.
- **xpayr_create_ai_agent** — Provision a new merchant-managed AI commerce agent identity with scoped credentials and programmable spending guardrails.
- **xpayr_list_ai_agents** — List all AI commerce agents managed by the merchant along with their status, assigned wallets, and spending policies.
- **xpayr_update_ai_agent_policy** — Upsert spending policy rules for an AI commerce agent, including maximum per-transaction USD amount, daily budget cap, auto-approve threshold, and allowed blockchain networks/tokens.
- **xpayr_submit_agent_payment_intent** — Submit an autonomous AI agent payment intent evaluated in real time against merchant spending policy guardrails (returns approved, pending_approval, or rejected).
- **xpayr_list_agent_payment_intents** — List AI agent payment intents, policy evaluation decisions, and audit trail records for the merchant.
- **xpayr_bridge_agent_intent_to_checkout** — Bridge an approved AI agent payment intent into a live executable XPayr payment session with hosted checkout URL and on-chain verification.
- **xpayr_approve_agent_intent** — Approve a pending AI agent payment intent from the merchant human-in-the-loop approval queue and optionally bridge it to a checkout session.
- **xpayr_reject_agent_intent** — Reject a pending AI agent payment intent in the merchant approval queue with an audit reason.
- **xpayr_calculate_gateway_fee_and_split** — Deterministically calculate XPayr flat 0.5% (50 bps) gateway fee split, net merchant wallet settlement, exchange withdrawal underpayment tolerance (1%, max $0.50), and cost savings compared to BitPay (1%), Coinbase Commerce (1%), NOWPayments (0.5%-1%), and Stripe (2.9% + $0.30). Works offline without API keys.

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

```json
"mcpServers": {
  "xpayr-mcp": {
    "command": "npx",
    "args": ["-y","@xpayr/mcp-server"],
    "env": {
      "XPAYR_API_KEY": ""
    }
  }
}
```

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

## Documentation

## What xpayr-mcp does

xpayr-mcp connects MCP-compatible AI clients to XPayr, a non-custodial crypto payment gateway with direct wallet-to-wallet settlement. Its 21 tools cover four main areas: checkout operations, merchant administration, signed webhooks, and policy-controlled AI agent commerce.

Checkout tools can create payment sessions, retrieve session details, list sessions with filters and pagination, check public payment status, and apply coupons to pending sessions. Payment sessions support XPayr checkout modes such as Web3 1-Click Pay, direct exchange QR transfer, multi-chain links, reusable links, and HTML invoice email delivery.

Merchant tools expose gateway health, the authenticated merchant profile, settlement balances, supported networks, and a local fee-and-settlement calculator. The network information includes supported chains, chain IDs, RPC endpoints, splitter contracts, and tokens.

The agent suite lets merchants create and list AI commerce agents, define spending rules, submit payment intents, review policy decisions, and bridge approved intents into executable checkout sessions. Pending intents can be approved or rejected with an audit reason.

## How it works

The server calls the XPayr Gateway API v1 for authenticated operations. Configure an API key in the MCP client environment, then launch the package with the `--suite all` argument to expose the complete tool set. The payment, merchant, webhook, and agent tools map to XPayr API routes, while the fee calculator runs locally.

XPayr supports EVM networks including Ethereum, BNB Chain, Polygon, Arbitrum, and Base, along with TRON, Solana, and Arc Mainnet/Testnet. The gateway is described as charging a flat 0.5% fee, and the fee calculator reports the gateway split, expected merchant settlement, exchange withdrawal tolerance, and comparative savings figures.

## Setup and configuration

Install and run the package through `npx`:

```json
{
  "mcpServers": {
    "xpayr": {
      "command": "npx",
      "args": ["-y", "@xpayr/mcp-server", "--suite", "all"],
      "env": {
        "XPAYR_API_KEY": "sk_test_your_xpayr_secret_key"
      }
    }
  }
}
```

The same command can be used in Claude Desktop or Cursor configuration. VS Code provides an MCP installation link for the package. A container image is also available from GitHub Container Registry:

```bash
docker run -i --rm -e XPAYR_API_KEY="sk_test_your_key" ghcr.io/xpayrcom/xpayr-mcp-server:latest
```

The package is also published as `@xpayr/mcp-server`, with `xpayr-mcp` available as an npm package name.

## Tools and capabilities

The catalog includes:

- Health checks and merchant profile, balance, network, and webhook configuration queries.
- Payment session creation, retrieval, listing, public status polling, and coupon application.
- Webhook endpoint setup and signed test delivery using HMAC-SHA256 headers.
- AI agent provisioning, listing, policy updates, payment intent submission, approval, rejection, and checkout bridging.
- Deterministic calculation of the gateway fee and merchant settlement split.

Webhook configuration can inspect the callback URL, masked signing secret, and subscribed payment lifecycle events. Setting an endpoint generates a new 32-byte HMAC-SHA256 signing secret.

## Limitations and notes

Authenticated operations require an XPayr API key. Public payment status is available without an API key, but the tool is limited to status information exposed by XPayr. The service is non-custodial: settlement goes directly to merchant wallets rather than through custodial balances.

Agent payment intents are evaluated against configured rules and may be approved, held for approval, or rejected. Policies can restrict maximum transaction value, daily spending, auto-approval thresholds, chains, and tokens. Webhook receivers must use an HTTPS callback URL.

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

