Skip to main content
D

dLocal

@codespar/mcp-dlocal Β· v0.2.2

🌎 Latin AmericaPaymentsAuth · API Keybeta18 tools4 env vars

LatAm cross-border payments through a single API. 15+ countries, local methods (Pix, OXXO, PSE, SPEI, boleto) + cards. The one call, multi-country abstraction per-country PSPs can't provide on their own.

Get started Β· freeView docs

MIT Β· runs locally with your own credentials

Limitations

  • Hosted calls with a test key are not available: connecting this provider needs credentials it issues to an operator.
Package
@codespar/mcp-dlocal
Version
0.2.2
npm dist-tag
latest
Category
Payments
Auth
API Key
Country
🌎 Latin America
License
MIT
Transport
stdio Β· streamable-http

Quickstart

Install, set the credentials, make the first call.

Pick your client. The server runs locally over stdio, with your own credentials.

Add the server to your clientOne config entry. No build step, no SDK required.
Set the environment variables4 variables read by this server's code, listed below.
Restart and make the first callThe agent can call any of the 18 tools. Try create_payment first.
terminal
# Claude Code claude mcp add dlocal -e DLOCAL_BASE_URL=… -e DLOCAL_LOGIN=… -e DLOCAL_SECRET_KEY=… -e DLOCAL_TRANS_KEY=… -- npx -y @codespar/mcp-dlocal@0.2.2 # then: /mcp to confirm the server is connected
Environment variables4 variables
DLOCAL_BASE_URLdLocal API base URL. Defaults to https://api.dlocal.com (prod). Use https://sandbox.dlocal.com for sandbox.optional
DLOCAL_LOGINdLocal API Login (X-Login header)required
DLOCAL_SECRET_KEYdLocal API Secret Key used to sign V2 HMAC-SHA256 requestsrequiredsecret
DLOCAL_TRANS_KEYdLocal API Trans-Key (X-Trans-Key header)requiredsecret

Names read from the package code (@codespar/mcp-dlocal@0.2.2). Descriptions and flags come from its manifest. Self-hosted, you hold the credentials.

First call democreate_payment

"Create a payment"

tools/callcreate_paymentresult returned

Tools

What your agent can call.

18 tools, as the package's tools/list returns them.

create_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.

get_payment

Get payment status and full detail by dLocal payment id.

get_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.

list_payments

List payments with optional date / country / status filters. Useful for reconciliation and reporting agents.

capture_payment

Capture an AUTHORIZED card payment. Omit amount for full capture; pass amount for partial capture (must be ≀ authorized amount). Card-only.

cancel_payment

Cancel an authorized-but-not-captured payment, or void a PENDING payment. Card payments must be in AUTHORIZED state.

create_refund

Refund a captured payment. Supports full refund (amount omitted) or partial refund (amount set).

get_refund

Get refund status by refund id.

list_refunds

List refunds, optionally scoped to a payment_id. Useful for reconciling partial refunds against the original charge.

create_payout

Send money out to a beneficiary in a LatAm country. Used for marketplace seller payouts, creator payouts, and cross-border settlement.

get_payout

Get payout status by dLocal payout id.

get_payout_by_external_id

Get a payout by the merchant external_id / order_id supplied at creation time. Mirror of get_payment_by_order_id for the payouts side.

Names and descriptions come from the package's tools/list (@codespar/mcp-dlocal@0.2.2). A kind (read, write, delete) is shown only when the package annotates its tools or each tool was verified one by one; neither exists for this server yet.

Compatibility

MCP is a protocol. Any client that speaks it can mount this server.

codespar_discover lists this server's tools, but connecting it needs credentials the provider issues to an operator (a certificate, signed keys or paired headers), which a test key cannot produce.

Protocol

Any MCP client

stdio Β· streamable-http

Questions

Before you install.

How do I install the dLocal MCP server?

Run npx -y @codespar/mcp-dlocal@0.2.2 and add the config block above to your MCP client: Claude Code, Cursor, Claude Desktop, VS Code, or any MCP-compatible client. No build step, no SDK required.

What can my agent do with dLocal?

dLocal exposes 18 tools for payments. Your agent calls them directly; the full list is above.

How does dLocal authenticate, and how are credentials stored?

dLocal uses API Key. Self-hosted, you hold the credentials: the server reads them from its environment variables.

How does dLocal handle upstream API changes?

Every server is versioned independently on npm. The command on this page pins 0.2.2, the version whose tools are listed here; your agent keeps running it until you change the version.

Is dLocal open source? How do I report a bug?

Yes. dLocal is MIT-licensed and published on npm as @codespar/mcp-dlocal, source on GitHub (link in the Details panel). Report issues on the package repository; security issues go to security@codespar.dev, and we respond within 24 hours.

Start in seconds.

Add the config above, set the variables, and your agent calls the tools.

Start in seconds demo
Add the server to your client with the config above.
Set the environment variables listed above.
Ask your agent for the first call.
dLocal β€” MCP server Β· 18 tools | CodeSpar