Skip to main content
DL

dLocal

v0.2.1API Key

Pagamentos cross-border na LatAm através de uma única API. Mais de 15 países, métodos locais (Pix, OXXO, PSE, SPEI, boleto) + cartões. A abstração de uma chamada e múltiplos países que PSPs por país não conseguem oferecer sozinhos.

18 ferramentas4 env vars🌎 LATAMestável no npm

O que seu agente faz

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

  • create_paymentCreate a payment (pay-in) in a LatAm country using a local payment method. Returns the payment object with a status and, for voucher/QR methods, the redirect/display data.
  • get_paymentGet payment status and full detail by dLocal payment id.
  • get_payment_by_order_idGet a payment by the merchant-side order_id supplied at creation time. Useful when the agent only kept its own reference and not dLocal's id.
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("create_payment", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-dlocal

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": {
    "dlocal": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-dlocal"
      ],
      "env": {
        "DLOCAL_LOGIN": "<your_dlocal_login>",
        "DLOCAL_TRANS_KEY": "<your_dlocal_trans_key>",
        "DLOCAL_SECRET_KEY": "<your_dlocal_secret_key>"
      }
    }
  }
}

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

Variáveis de ambiente · 4

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

DLOCAL_LOGIN
obrigatório

dLocal API Login (X-Login header)

DLOCAL_TRANS_KEY
obrigatóriosecret

dLocal API Trans-Key (X-Trans-Key header)

DLOCAL_SECRET_KEY
obrigatóriosecret

dLocal API Secret Key used to sign V2 HMAC-SHA256 requests

DLOCAL_BASE_URL
opcional

dLocal API base URL. Defaults to https://api.dlocal.com (prod). Use https://sandbox.dlocal.com for sandbox.

Ferramentas disponíveis · 18

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

WRITEcreate_payment
Create a payment (pay-in) in a LatAm country using a local payment method. Returns the payment object with a status and, for voucher/QR methods, the redirect/display data.
WRITEget_payment
Get payment status and full detail by dLocal payment id.
WRITEget_payment_by_order_id
Get a payment by the merchant-side order_id supplied at creation time. Useful when the agent only kept its own reference and not dLocal's id.
WRITElist_payments
List payments with optional date / country / status filters. Useful for reconciliation and reporting agents.
WRITEcapture_payment
Capture an AUTHORIZED card payment. Omit amount for full capture; pass amount for partial capture (must be ≤ authorized amount). Card-only.
DELETEcancel_payment
Cancel an authorized-but-not-captured payment, or void a PENDING payment. Card payments must be in AUTHORIZED state.
DELETEcreate_refund
Refund a captured payment. Supports full refund (amount omitted) or partial refund (amount set).
DELETEget_refund
Get refund status by refund id.

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-dlocal` 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.
dLocal — MCP server · 18 tools | CodeSpar