Skip to main content
MO

MoonPay

v0.2.1API Key

On/off-ramp de fiat↔cripto. Cobertura mais ampla que a UnblockPay (mais de 100 ativos, mais de 160 países) incluindo onramp via Pix no BR. Fluxos sell-side permitem que agentes paguem em cripto.

20 ferramentas6 env vars🌐 GLOBALestável no npm

O que seu agente faz

O MoonPay dá ao seu agente 20 tools que ele chama direto — escolha as que precisar, no Claude, Cursor ou qualquer cliente MCP.

  • get_buy_quotePreview a fiat -> crypto buy quote in real time. Use this before create_buy_transaction to show the end user the exact crypto amount, fees, and effective rate.
  • create_buy_transactionCreate a buy transaction (fiat -> crypto). The returned object contains status plus — depending on method — redirect URL for hosted checkout, Pix QR data, or card auth next steps.
  • get_buy_transactionRetrieve a buy transaction (fiat -> crypto) by its MoonPay id. Returns current status and settlement detail.
Exemplo de chamada
// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("get_buy_quote", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-moonpay

Quickstart

Adicione esta entrada ao seu claude_desktop_config.json (ou a config de qualquer cliente compatível com MCP).

claude_desktop_config.json
{
  "mcpServers": {
    "moonpay": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-moonpay"
      ],
      "env": {
        "MOONPAY_API_KEY": "<your_moonpay_api_key>"
      }
    }
  }
}

Depois de reiniciar, seu agente pode chamar qualquer uma das 20 ferramentas abaixo — teste get_buy_quote primeiro.

Variáveis de ambiente · 6

Necessárias pra autenticar o server. Armazenadas criptografadas ao usar a hospedagem gerenciada da CodeSpar.

MOONPAY_API_KEY
obrigatóriosecret

MoonPay REST API key (sandbox or production — the key selects the environment)

MOONPAY_PUBLISHABLE_KEY
opcional

MoonPay publishable key used as `apiKey` in signed widget URLs (required for sign_buy_url / sign_sell_url).

MOONPAY_SECRET_KEY
opcionalsecret

MoonPay secret key used to HMAC-SHA256 sign widget URLs (required for sign_buy_url / sign_sell_url).

MOONPAY_BASE_URL
opcional

MoonPay API base URL. Defaults to https://api.moonpay.com.

MOONPAY_BUY_WIDGET_URL
opcional

MoonPay buy widget base URL. Defaults to https://buy.moonpay.com.

MOONPAY_SELL_WIDGET_URL
opcional

MoonPay sell widget base URL. Defaults to https://sell.moonpay.com.

Ferramentas disponíveis · 20

Cada ferramenta é independente — seu agente carrega só o que precisa pra reduzir contexto e tempo de resposta.

READget_buy_quote
Preview a fiat -> crypto buy quote in real time. Use this before create_buy_transaction to show the end user the exact crypto amount, fees, and effective rate.
WRITEcreate_buy_transaction
Create a buy transaction (fiat -> crypto). The returned object contains status plus — depending on method — redirect URL for hosted checkout, Pix QR data, or card auth next steps.
READget_buy_transaction
Retrieve a buy transaction (fiat -> crypto) by its MoonPay id. Returns current status and settlement detail.
READlist_buy_transactions
List buy transactions with optional filters. Used for reconciliation and agent-driven monitoring.
READget_sell_quote
Preview a crypto -> fiat sell quote in real time. Use this before create_sell_transaction to show the end user the exact fiat amount, fees, and effective rate.
WRITEcreate_sell_transaction
Create a sell transaction (crypto -> fiat). Used for agents that need to pay out in local fiat after receiving crypto.
READget_sell_transaction
Retrieve a sell transaction (crypto -> fiat) by its MoonPay id.
DELETErefund_sell_transaction
Request a refund on an off-ramp (sell) transaction. Used when the destination bank rejects payout or the user disputes the trade. Reason codes are MoonPay-defined.

Frameworks compatíveis

MCP é um protocolo — qualquer framework que o fale pode montar este server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Qualquer cliente MCPProtocolo

Perguntas frequentes

Rode `npx -y @codespar/mcp-moonpay` e adicione o bloco de config acima ao seu cliente MCP — Claude, Cursor, VS Code ou qualquer cliente compatível com MCP. Sem build, sem SDK. Prefere hospedado? O tier gerenciado da CodeSpar roda pra você, com a auth resolvida.
MoonPay — MCP server · 20 tools | CodeSpar