mcp-moonpay — MCP server for Claude Code: MoonPay on- and off-ramp
Hands the agent MoonPay tools: quote and place buy or sell orders, check KYC status, and sign payment widget links.
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-moonpayWhat mcp-moonpay 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.
What it helps with
- 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 for the agent
- 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.
How to install mcp-moonpay
Platform CLI
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-moonpayReplace <…> with your own values. 1 more environment variable is in the server README
Platform CLI
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-moonpayReplace <…> with your own values. 1 more environment variable is in the server README
Config file
{
"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
Config file
{
"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
Platform CLI
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-moonpayReplace <…> with your own values. 1 more environment variable is in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-moonpay
How do I install mcp-moonpay in Claude Code?
Run claude mcp add mcp-moonpay -e MOONPAY_API_KEY=<MOONPAY_API_KEY> -e MOONPAY_SECRET_KEY=<MOONPAY_SECRET_KEY> -- npx -y @codespar/mcp-moonpay.
What does mcp-moonpay do?
It connects an agent to MoonPay: buy and sell quotes and orders, customers and KYC, currency and country reference data, and signed widget URLs.
How is it different from mcp-unblockpay?
unblockpay handles stablecoins only, BRL/MXN to USDC both ways. MoonPay reaches over 100 crypto assets, more countries, and a sell flow that pays out in local fiat.