Braspag

Finance and commerceAgent frameworks and SDKs

MCP server for Braspag, Cielo orchestration, token vault (Cartão Protegido), recurrence, split.

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

About Braspag

Braspag is a community MCP server from codespar, filed in our directory under finance and commerce and agent frameworks and sdks. MCP server for Braspag, Cielo orchestration, token vault (Cartão Protegido), recurrence, split.

Braspag runs on your own machine: your AI app starts it with the command npx -y @codespar/mcp-braspag@0.2.2 and talks to it over standard input and output. It needs BRASPAG_MERCHANT_ID and BRASPAG_MERCHANT_KEY set before Braspag starts.

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

At a glance

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

How to set up Braspag

  1. Install Node.js on the machine that runs your AI app, because Braspag starts with npx and downloads its package on first run.
  2. Create BRASPAG_MERCHANT_ID and BRASPAG_MERCHANT_KEY for Braspag in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Braspag 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 Braspag tools to confirm the connection.
  5. Run one read-only task with Braspag first, and keep your app asking before each tool call until the results look right.

Braspag compared with similar servers

  • Btg by codespar has fewer GitHub stars than Braspag (278 against 278); both are community servers, and both run locally.
  • Brasil API by codespar has fewer GitHub stars than Braspag (278 against 278); both are community servers, and both run locally.
  • Caf by codespar has fewer GitHub stars than Braspag (278 against 278); both are community servers, and both run locally.

Before you connect Braspag

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

Marketing use cases for Braspag

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

Small business

  • A small business can ask Braspag which products and customers drive margin, then plan promotions around them.
  • Owners can use Braspag to check refunds, failed payments and churn reasons without opening three dashboards.
  • A small business with a developer can use Braspag to build one focused agent, such as lead follow-up, without a big platform.
  • Braspag 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 Braspag to tie campaigns to orders and revenue, not just clicks.
  • Marketing and finance can use Braspag to check spend against budget each week and move money to what's working.
  • Growth engineering teams can use Braspag to build agents that combine CRM, analytics and content tools behind one workflow.
  • Start Braspag on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should keep Braspag read-only for agents, with any money movement handled by people and existing approvals.
  • Large commerce teams can use Braspag to answer revenue questions by channel and region with figures finance signs off on.
  • Enterprises can build on Braspag with their own identity, policy and evaluation layers, so agents meet the same bar as other software.
  • Braspag is a community server, so have security review the code and pin a version before Braspag 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

Braspag 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-braspag

MCP server for Braspag, Cielo Group's enterprise orchestration layer: multi-acquirer routing, token vault (Cartão Protegido), recurrence, marketplace split, antifraud orchestration.

Braspag vs. Cielo (Acquirer)

CodeSpar ships two Cielo Group servers with different business contracts:

Server Product What it is Who uses it
@codespar/mcp-cielo Cielo Acquirer Direct card acquiring rails (credit, debit, boleto, Pix) Any merchant taking cards through Cielo
@codespar/mcp-braspag (this) Braspag / Pagador Enterprise orchestration on top of any acquirer Enterprise BR retail (Magalu-tier): multi-acquirer routing, token vault, marketplace split

Braspag orchestrates across acquirers. You keep your Cielo (or Rede, or Stone) acquiring contract and layer Braspag on top for: smart routing, failover, vaulting cards once and reusing across acquirers (Cartão Protegido), driving recurrence, and splitting marketplace capture across sub-merchants.

Quick Start

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

{
  "mcpServers": {
    "braspag": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-braspag"],
      "env": {
        "BRASPAG_MERCHANT_ID": "your-merchant-uuid",
        "BRASPAG_MERCHANT_KEY": "your-merchant-key",
        "BRASPAG_ENV": "sandbox"
      }
    }
  }
}
Claude Code
claude mcp add braspag -- npx @codespar/mcp-braspag
Cursor / VS Code

Add to .cursor/mcp.json or .vscode/mcp.json:

{
  "servers": {
    "braspag": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-braspag"],
      "env": {
        "BRASPAG_MERCHANT_ID": "your-merchant-uuid",
        "BRASPAG_MERCHANT_KEY": "your-merchant-key",
        "BRASPAG_ENV": "sandbox"
      }
    }
  }
}

Tools (22)

Tool Purpose
create_sale Create a sale on the Braspag Transaction API (POST /sales).
capture_sale Capture a pre-authorized sale (PUT /sales/{paymentId}/capture).
void_sale Void / cancel a sale (PUT /sales/{paymentId}/void).
create_recurrent Create a recurrent payment schedule (POST /recurrentPayments).
disable_recurrent Deactivate a recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/Deactivate).
update_recurrent_amount Update the charged amount on a recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/Amount).
get_sale Get sale detail by PaymentId (GET /sales/{paymentId}, Query API).
get_sale_by_order_id Look up sale(s) by MerchantOrderId (GET /sales?merchantOrderId=X, Query API).
get_recurrent Get a recurrent payment's configuration and history (GET /recurrentPayments/{recurrentPaymentId}, Query API).
tokenize_card Tokenize a card into the Braspag vault / Cartão Protegido (POST /card).
get_card_token Retrieve the stored card data associated with a Cartão Protegido token (GET /card/{token}).
create_split_sale Create a sale with marketplace split rules (POST /sales with Payment.SplitPayments).
create_sale_3ds Create a 3DS-authenticated credit sale (POST /sales).
create_zero_auth Zero-dollar authorization / card validation (POST /zeroauth).
create_boleto_sale Convenience wrapper to create a Boleto sale (POST /sales with Payment.Type=Boleto).
create_pix_sale Convenience wrapper to create a Pix sale (POST /sales with Payment.Type=Pix).
reactivate_recurrent Reactivate a previously deactivated recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/Reactiva...
update_recurrent_next_payment Update the NextPaymentDate on a recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/NextPaymentD...
update_recurrent_payment Update the Payment (CreditCard + Customer) on a recurrent schedule (PUT /recurrentPayments/{recurrentPaymen...
create_antifraud_analysis Submit a standalone Antifraud analysis (POST /fraudanalysis) through Braspag's antifraud orchestration (Cyb...
delete_card_token Delete a Cartão Protegido vault token (DELETE /card/{token}).
create_split_capture Capture a previously authorized split sale with overridden per-sub-merchant amounts (PUT /sales/{paymentId}...

Authentication

Braspag uses MerchantId (UUID) and MerchantKey (secret) headers on both the Transaction API and the Query API.

Environments

Env Transaction API Query API
sandbox (default) https://apisandbox.braspag.com.br/v2 https://apiquerysandbox.braspag.com.br/v2
production https://api.braspag.com.br/v2 https://apiquery.braspag.com.br/v2

Set via BRASPAG_ENV=production to switch.

Get your credentials
  1. Reach out to your Cielo / Braspag account team to enable Braspag Pagador on your merchant contract.
  2. Receive your MerchantId (UUID) and MerchantKey.
  3. Set the environment variables below.

Environment Variables

Variable Required Description
BRASPAG_MERCHANT_ID Yes Merchant UUID
BRASPAG_MERCHANT_KEY Yes Merchant secret key
BRASPAG_ENV No sandbox (default) or production

Roadmap

v0.2 (planned)
  • create_sale_with_card_token, convenience wrapper that uses a Cartão Protegido token
  • delete_card_token, revoke a vault token
  • get_sale_antifraud, Query API antifraud detail
  • update_recurrent_payment, update non-amount fields on a recurrent
  • create_zero_auth, zero-dollar auth for card validation
v0.3 (planned)
  • Marketplace: sub-merchant onboarding endpoints
  • Bank slip (boleto) registered-only helpers
  • Webhook verification helper

Want to contribute? Open a PR or request a tool.

Links

Enterprise

Need governance, budget limits, and audit trails for agent-driven payments on Braspag? CodeSpar Enterprise adds a policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

Questions about Braspag

What is the Braspag MCP server?

MCP server for Braspag, Cielo orchestration, token vault (Cartão Protegido), recurrence, split. Braspag 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 Braspag MCP server?

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

Does Braspag need an API key?

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

Is Braspag an official MCP server?

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

What license is Braspag under?

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