# mcp-moonpay

Hands the agent MoonPay tools: quote and place buy or sell orders, check KYC status, and sign payment widget links.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 274
- Author: codespar
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codespar/mcp-dev-latam/tree/HEAD/packages/crypto/moonpay
- Updated: 2026-09-27
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-moonpay

## What it does

The server ships 20 tools that wrap the MoonPay API. An agent can preview a buy or sell quote, place the order, then pull it back by MoonPay id along with a receipt suitable for tax or audit. Customer helpers sit alongside: create a KYC'd end user, look one up, read the verification state and what documents are still pending, or list every buy and sell tied to that person.

Reference lookups cover fiat and crypto currencies, metadata for a single currency code, supported countries with the flows each one allows, and payment methods for a given currency and country pair. Country resolution by IP is there too. Two utilities assemble a buy or sell widget link and sign it with HMAC-SHA256. Pix serves as an on-ramp rail for Brazil, and the catalogue runs past 100 crypto assets.

A `MOONPAY_API_KEY` is mandatory, and the key alone decides sandbox versus production — the base URL does not switch. `MOONPAY_BASE_URL` can be overridden and otherwise points at `https://api.moonpay.com`. Live money needs a production key; without loaded documents the KYC check on a customer just reports what is still missing.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `MOONPAY_API_KEY`, `MOONPAY_PUBLISHABLE_KEY`, `MOONPAY_SECRET_KEY`, `MOONPAY_BASE_URL`, `MOONPAY_BUY_WIDGET_URL`, `MOONPAY_SELL_WIDGET_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env MOONPAY_API_KEY=<MOONPAY_API_KEY> --env MOONPAY_PUBLISHABLE_KEY=<MOONPAY_PUBLISHABLE_KEY> --env MOONPAY_SECRET_KEY=<MOONPAY_SECRET_KEY> --env MOONPAY_BASE_URL=<MOONPAY_BASE_URL> --env MOONPAY_BUY_WIDGET_URL=<MOONPAY_BUY_WIDGET_URL> --transport stdio moonpay -- npx -y @codespar/mcp-moonpay
```
Replace <…> with your own values. 1 more environment variable is in the server README

### Codex

**Platform CLI**
```bash
codex mcp add moonpay --env MOONPAY_API_KEY=<MOONPAY_API_KEY> --env MOONPAY_PUBLISHABLE_KEY=<MOONPAY_PUBLISHABLE_KEY> --env MOONPAY_SECRET_KEY=<MOONPAY_SECRET_KEY> --env MOONPAY_BASE_URL=<MOONPAY_BASE_URL> --env MOONPAY_BUY_WIDGET_URL=<MOONPAY_BUY_WIDGET_URL> -- npx -y @codespar/mcp-moonpay
```
Replace <…> with your own values. 1 more environment variable is in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "moonpay": {
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-moonpay"
            ],
            "env": {
                "MOONPAY_API_KEY": "<MOONPAY_API_KEY>",
                "MOONPAY_PUBLISHABLE_KEY": "<MOONPAY_PUBLISHABLE_KEY>",
                "MOONPAY_SECRET_KEY": "<MOONPAY_SECRET_KEY>",
                "MOONPAY_BASE_URL": "<MOONPAY_BASE_URL>",
                "MOONPAY_BUY_WIDGET_URL": "<MOONPAY_BUY_WIDGET_URL>"
            }
        }
    }
}
```
Replace <…> with your own values. 1 more environment variable is in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "moonpay": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-moonpay"
            ],
            "env": {
                "MOONPAY_API_KEY": "<MOONPAY_API_KEY>",
                "MOONPAY_PUBLISHABLE_KEY": "<MOONPAY_PUBLISHABLE_KEY>",
                "MOONPAY_SECRET_KEY": "<MOONPAY_SECRET_KEY>",
                "MOONPAY_BASE_URL": "<MOONPAY_BASE_URL>",
                "MOONPAY_BUY_WIDGET_URL": "<MOONPAY_BUY_WIDGET_URL>"
            }
        }
    }
}
```
Replace <…> with your own values. 1 more environment variable is in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e MOONPAY_API_KEY=<MOONPAY_API_KEY> -e MOONPAY_PUBLISHABLE_KEY=<MOONPAY_PUBLISHABLE_KEY> -e MOONPAY_SECRET_KEY=<MOONPAY_SECRET_KEY> -e MOONPAY_BASE_URL=<MOONPAY_BASE_URL> -e MOONPAY_BUY_WIDGET_URL=<MOONPAY_BUY_WIDGET_URL> moonpay npx -y @codespar/mcp-moonpay
```
Replace <…> with your own values. 1 more environment variable is in the server README

## When to use it
- price a crypto buy before opening the payment widget
- run a sell order that pays out to local fiat
- see which documents a customer still owes for KYC
- pull a receipt for a finished transaction
- generate a signed payment widget link

## Example prompts
- Quote a buy of 0.05 BTC paid in euros and show me the total.
- Create a sell transaction and fetch its status by MoonPay id.
- Check this customer's KYC status and list the missing documents.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44583
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5458
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2814
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2188
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

From the same set: [codespar/mcp-dev-latam](https://affpapa.org/en/nevibecode/by/codespar/mcp-dev-latam.md) — 124 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
