mcpField
M
mcp-moonpay

mcp-moonpay

Local
github.com/codesparFinance275Updated 4w ago

About mcp-moonpay

An MCP server for MoonPay's fiat-to-crypto on- and off-ramp, covering 100+ crypto assets across many regions, with Pix as a Brazil onramp rail. It suits applications and agents that need to buy or sell crypto, or check customer KYC status.

Key features

  1. 01Real-time buy and sell quotes
  2. 02Buy and sell transaction creation and lookup
  3. 03Customer KYC status lookup
  4. 04Transaction receipt retrieval
  5. 05Country, currency and payment method queries
  6. 06Signed buy and sell widget URLs

Use cases

  1. 01Giving an agent buy quotes and orders for crypto assets
  2. 02Checking an end user's KYC progress and transaction history
  3. 03Selling crypto and paying out to local fiat

MCP support

This is an MCP server that exposes 20 tools to MCP clients for buy, sell, customer and currency operations through the MoonPay API. It authenticates with an Api-Key header using MOONPAY_API_KEY.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-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>",
"MOONPAY_SELL_WIDGET_URL": "<MOONPAY_SELL_WIDGET_URL>"
}
}
}
}
Run commandnpx -y @codespar/mcp-moonpay
Environment variables to set
MOONPAY_API_KEYSecretMoonPay REST API key (sandbox or production — the key selects the environment)
MOONPAY_PUBLISHABLE_KEYSecretMoonPay publishable key used as `apiKey` in signed widget URLs (required for sign_buy_url / sign_sell_url).
MOONPAY_SECRET_KEYSecretMoonPay secret key used to HMAC-SHA256 sign widget URLs (required for sign_buy_url / sign_sell_url).
MOONPAY_BASE_URLMoonPay API base URL. Defaults to https://api.moonpay.com.
MOONPAY_BUY_WIDGET_URLMoonPay buy widget base URL. Defaults to https://buy.moonpay.com.
MOONPAY_SELL_WIDGET_URLMoonPay sell widget base URL. Defaults to https://sell.moonpay.com.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@codespar/mcp-moonpay0.2.2

Tools

20

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
currencyCodestringYesCrypto currency code you want to buy (e.g. btc, eth, usdc, sol). Must be a code returned by list_currencies.
paymentMethodstringNoOptional payment method hint (e.g. credit_debit_card, sepa_bank_transfer, pix)
areFeesIncludedbooleanNoIf true, baseCurrencyAmount includes MoonPay fees.
baseCurrencyCodestringYesFiat currency you are paying with (e.g. usd, eur, brl, mxn)
baseCurrencyAmountnumberNoAmount in fiat to spend (major units). Either this or quoteCurrencyAmount must be supplied.
quoteCurrencyAmountnumberNoAmount of crypto to receive (major units). Either this or baseCurrencyAmount must be supplied.

Details

From the project README

@codespar/mcp-moonpay

MCP server for MoonPay — fiat-to-crypto on/off-ramp.

MoonPay spans 100+ crypto assets and many geographies, with both buy (fiat → crypto) and sell (crypto → fiat) flows. Pix is supported as a Brazil onramp rail.

Positioning vs the rest of the catalog

ServerCoverageDirection
@codespar/mcp-unblockpayBRL / MXN ↔ USDCOnramp + offramp, stablecoin only
@codespar/mcp-moonpay100+ crypto assets, multi-geo, Pix for BROnramp + offramp
@codespar/mcp-mercado-bitcoin, @codespar/mcp-bitsoExchange order booksTrade
@codespar/mcp-circleUSDC native railsStablecoin infra

Use MoonPay when an agent needs broader crypto coverage (beyond USDC), longer-tail geographies, or a sell-side flow that pays out to local fiat.

Tools (20)

ToolPurpose
get_buy_quotePreview a fiat -> crypto buy quote in real time.
create_buy_transactionCreate a buy transaction (fiat -> crypto).
get_buy_transactionRetrieve a buy transaction (fiat -> crypto) by its MoonPay id.
list_buy_transactionsList buy transactions with optional filters.
get_sell_quotePreview a crypto -> fiat sell quote in real time.
create_sell_transactionCreate a sell transaction (crypto -> fiat).
get_sell_transactionRetrieve a sell transaction (crypto -> fiat) by its MoonPay id.
refund_sell_transactionRequest a refund on an off-ramp (sell) transaction.
create_customerCreate a MoonPay customer (KYC'd end user).
get_customerRetrieve a MoonPay customer by id.
get_customer_kyc_statusFetch KYC verification status (and any pending document requirements) for a MoonPay customer.
list_customer_transactionsList all transactions (buy + sell) tied to a single MoonPay customer.
get_transaction_receiptFetch a tax-/audit-grade receipt for a completed buy or sell transaction.
list_currenciesList supported currencies (fiat + crypto).
get_currencyRetrieve metadata for a single currency (fiat or crypto) by its MoonPay code.
list_countriesList countries supported by MoonPay along with which flows (buy / sell / NFT) are allowed per geography.
list_payment_methodsList payment methods supported for a given fiat currency / country combination (e.g.
get_user_countryResolve the caller's (or a given IP's) country via MoonPay's IP-address geolocation endpoint.
sign_buy_urlBuild and HMAC-SHA256 sign a MoonPay buy widget URL (buy.moonpay.com).
sign_sell_urlBuild and HMAC-SHA256 sign a MoonPay sell widget URL (sell.moonpay.com).

Install

npm install @codespar/mcp-moonpay

Environment

MOONPAY_API_KEY="..."     # API key (sandbox or production — the key selects the environment)
MOONPAY_BASE_URL="..."    # Optional. Defaults to https://api.moonpay.com.

Authentication

Every request uses a simple header:

Authorization: Api-Key <MOONPAY_API_KEY>

Sandbox vs production is selected by the key itself — the base URL stays the same.

Run

# stdio (default — for Claude Desktop, Cursor, etc)
npx @codespar/mcp-moonpay

# HTTP (for server-to-server testing)
MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-moonpay

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.