Dlocal

Finance and commerce

MCP server for dLocal, LatAm cross-border payments, payouts, refunds across 15+ countries.

Your AI app calls the Dlocal MCP server, which does the finance and commerce work and sends the result back to the chat.

About Dlocal

Dlocal is a community MCP server from codespar, filed in our directory under finance and commerce. MCP server for dLocal, LatAm cross-border payments, payouts, refunds across 15+ countries.

Dlocal runs on your own machine: your AI app starts it with the command npx -y @codespar/mcp-dlocal@0.2.2 and talks to it over standard input and output. It needs DLOCAL_LOGIN, DLOCAL_TRANS_KEY and DLOCAL_SECRET_KEY set before Dlocal starts.

Dlocal is listed in the official MCP registry as io.github.codespar/mcp-dlocal, version 0.2.2.

At a glance

Publisher
codespar (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @codespar/mcp-dlocal
Written in
TypeScript
License
MIT
GitHub stars
278
Official MCP registry
io.github.codespar/mcp-dlocal

How to set up Dlocal

  1. Install Node.js on the machine that runs your AI app, because Dlocal starts with npx and downloads its package on first run.
  2. Create DLOCAL_LOGIN, DLOCAL_TRANS_KEY and DLOCAL_SECRET_KEY for Dlocal in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Dlocal to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Dlocal tools to confirm the connection.
  5. Run one read-only task with Dlocal first, and keep your app asking before each tool call until the results look right.

Dlocal compared with similar servers

  • Dock by codespar has fewer GitHub stars than Dlocal (278 against 278); both are community servers, and both run locally.
  • Culqi by codespar has fewer GitHub stars than Dlocal (278 against 278); both are community servers, and both run locally.
  • Ebanx by codespar has fewer GitHub stars than Dlocal (278 against 278); both are community servers, and both run locally.

Before you connect Dlocal

  • Give Dlocal its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Dlocal tool call until you trust what it does with them.
  • Treat text that Dlocal fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Dlocal on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Dlocal

How marketing and sales teams put Dlocal to work, by company size. Pick the size closest to yours and start Dlocal on one use case.

Small business

  • A small business can ask Dlocal which products and customers drive margin, then plan promotions around them.
  • Owners can use Dlocal to check refunds, failed payments and churn reasons without opening three dashboards.
  • Dlocal runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Ecommerce teams can connect Dlocal to tie campaigns to orders and revenue, not just clicks.
  • Marketing and finance can use Dlocal to check spend against budget each week and move money to what's working.
  • Start Dlocal on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should keep Dlocal read-only for agents, with any money movement handled by people and existing approvals.
  • Large commerce teams can use Dlocal to answer revenue questions by channel and region with figures finance signs off on.
  • Dlocal is a community server, so have security review the code and pin a version before Dlocal touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Dlocal README

From codespar/mcp-dev-latam on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

@codespar/mcp-dlocal

MCP server for dLocal, LatAm cross-border payments.

One API, 15+ LatAm countries, local payment methods (Pix, OXXO, PSE, SPEI, Boleto, cards). The abstraction that per-country PSP servers cannot provide on their own.

Tools (18)

Tool Purpose
create_payment Create a payment (pay-in) in a LatAm country using a local payment method.
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.
list_payments List payments with optional date / country / status filters.
capture_payment Capture an AUTHORIZED card payment.
cancel_payment Cancel an authorized-but-not-captured payment, or void a PENDING payment.
create_refund Refund a captured payment.
get_refund Get refund status by refund id.
list_refunds List refunds, optionally scoped to a payment_id.
create_payout Send money out to a beneficiary in a LatAm country.
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.
list_payouts List payouts with optional date / country / status filters.
list_payment_methods List all payment methods available for a given country.
get_balance Get the merchant's current available balance per currency.
get_exchange_rate Query the dLocal FX rate for a destination country/currency pair.
create_card_token Tokenize a card for use in DIRECT-flow create_payment.
validate_document Validate a LatAm tax/identity document (CPF or CNPJ in BR, CUIT/CUIL/DNI in AR, RUT in CL/UY, RFC/CURP in M...

Install

npm install @codespar/mcp-dlocal

Environment

DLOCAL_LOGIN="..."        # X-Login header value
DLOCAL_TRANS_KEY="..."    # X-Trans-Key header value
DLOCAL_SECRET_KEY="..."   # HMAC secret used to sign V2 requests
DLOCAL_BASE_URL="..."     # Optional. Defaults to https://api.dlocal.com. Use https://sandbox.dlocal.com for sandbox.

Authentication

Every request signs with V2 HMAC-SHA256:

X-Date: <ISO-8601 UTC>
X-Login: <login>
X-Trans-Key: <trans_key>
Authorization: V2-HMAC-SHA256, Signature: <hex(hmac_sha256(login + x_date + body, secret_key))>

The server handles signing automatically, you only configure the three env vars.

Run

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

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

Countries covered

Argentina, Bolivia, Brazil, Chile, Colombia, Costa Rica, Ecuador, Guatemala, Mexico, Peru, Uruguay, and more. Use list_payment_methods to enumerate available methods per country at runtime rather than hard-coding.

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

Questions about Dlocal

What is the Dlocal MCP server?

MCP server for dLocal, LatAm cross-border payments, payouts, refunds across 15+ countries. Dlocal is maintained by codespar on GitHub at codespar/mcp-dev-latam, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Dlocal MCP server?

Add Dlocal to your AI app's MCP config with the command npx -y @codespar/mcp-dlocal@0.2.2. In Claude Code, run claude mcp add --transport stdio codespar-dlocal -- npx -y @codespar/mcp-dlocal@0.2.2. To run Dlocal this way you need Node.js installed.

Does Dlocal need an API key?

Yes. Dlocal expects DLOCAL_LOGIN, DLOCAL_TRANS_KEY and DLOCAL_SECRET_KEY to be set. Create the key for Dlocal in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.

Is Dlocal an official MCP server?

No. Dlocal is a community server maintained by codespar. Community servers can be excellent; read the code and the open issues before you give Dlocal access to company data.

What license is Dlocal under?

Dlocal is released under the MIT license, according to its GitHub repository. The license covers the code of Dlocal; the service it connects to has its own terms.