Skip to main content
DL

dLocal

v0.2.1API Key

Pagos transfronterizos en LatAm a través de una sola API. Más de 15 países, métodos locales (Pix, OXXO, PSE, SPEI, boleto) + tarjetas. La abstracción de una llamada y múltiples países que los PSPs por país no pueden ofrecer solos.

18 herramientas4 env vars🌎 LATAMestable en npm

Qué puede hacer tu agente

dLocal le da a tu agente 18 tools que llama directo — elegí las que necesite, en Claude, Cursor o cualquier 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.
Ejemplo de llamada
// 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

Agregá esta entrada a tu claude_desktop_config.json (o a la config de cualquier cliente compatible con 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>"
      }
    }
  }
}

Después de reiniciar, tu agente puede llamar cualquiera de las 18 herramientas de abajo — probá create_payment primero.

Variables de entorno · 4

Necesarias para autenticar el server. Almacenadas cifradas al usar el hosting gestionado de CodeSpar.

DLOCAL_LOGIN
obligatorio

dLocal API Login (X-Login header)

DLOCAL_TRANS_KEY
obligatoriosecret

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

DLOCAL_SECRET_KEY
obligatoriosecret

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.

Herramientas disponibles · 18

Cada herramienta es independiente — tu agente carga solo lo que necesita para reducir contexto y tiempo de respuesta.

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 compatibles

MCP es un protocolo — cualquier framework que lo hable puede montar este server.

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

Preguntas frecuentes

Corré `npx -y @codespar/mcp-dlocal` y agregá el bloque de config de arriba a tu cliente MCP — Claude, Cursor, VS Code o cualquier cliente compatible con MCP. Sin build, sin SDK. ¿Preferís hosted? El tier gestionado de CodeSpar lo corre por vos, con la auth resuelta.
dLocal — MCP server · 18 tools | CodeSpar