Skip to main content
B

Braspag

@codespar/mcp-braspag Β· v0.2.2

πŸ‡§πŸ‡· BrazilPaymentsAuth Β· API Keybeta22 tools3 env vars

Cielo's enterprise orchestration arm β€” distinct from the Cielo Acquirer server. Multi-acquirer routing, CartΓ£o Protegido (token vault), recurrence, marketplace split, antifraude. Target: enterprise BR retail.

Get started Β· freeView docs

MIT Β· runs locally with your own credentials

Limitations

  • The npm package ships no server.json manifest.
Package
@codespar/mcp-braspag
Version
0.2.2
npm dist-tag
latest
Category
Payments
Auth
API Key
Country
πŸ‡§πŸ‡· Brazil
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 variables3 variables read by this server's code, listed below.
Restart and make the first callThe agent can call any of the 22 tools. Try create_sale first.
terminal
# Claude Code claude mcp add braspag -e BRASPAG_ENV=… -e BRASPAG_MERCHANT_ID=… -e BRASPAG_MERCHANT_KEY=… -- npx -y @codespar/mcp-braspag@0.2.2 # then: /mcp to confirm the server is connected
Environment variables3 variables
BRASPAG_ENVEnvironment: 'sandbox' or 'production'. Defaults to 'sandbox'.optional
BRASPAG_MERCHANT_IDBraspag MerchantId (UUID)requiredsecret
BRASPAG_MERCHANT_KEYBraspag MerchantKey (secret)requiredsecret

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

First call democreate_sale

"Create a sale on the Braspag Transaction API"

tools/callcreate_saleresult returned

Tools

What your agent can call.

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

create_sale

Create a sale on the Braspag Transaction API (POST /sales). Pass a full Braspag sale payload. Payment.Type may be CreditCard, DebitCard, Boleto, Pix, or EletronicTransfer. Braspag orchestrates routing across multiple acquirers based on merchant-level rules.

capture_sale

Capture a pre-authorized sale (PUT /sales/{paymentId}/capture). Supports partial capture via amount, and optional serviceTaxAmount (airline / travel merchants).

void_sale

Void / cancel a sale (PUT /sales/{paymentId}/void). Supports full void (omit amount) or partial void.

create_recurrent

Create a recurrent payment schedule (POST /recurrentPayments). Used for subscriptions and any schedule where Braspag (not the merchant) drives the recurrence.

disable_recurrent

Deactivate a recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/Deactivate). Stops future charges; does not refund historical ones.

update_recurrent_amount

Update the charged amount on a recurrent payment (PUT /recurrentPayments/{recurrentPaymentId}/Amount). Body carries the new amount in cents.

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). Returns an array of PaymentIds matching the merchant order.

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). Returns a reusable token that can substitute CardNumber on future sales β€” reduces PCI scope and enables cross-acquirer reuse.

get_card_token

Retrieve the stored card data associated with a CartΓ£o Protegido token (GET /card/{token}). Returns masked card fields + brand + expiration.

create_split_sale

Create a sale with marketplace split rules (POST /sales with Payment.SplitPayments). Same endpoint as create_sale, but exposes the split array shape explicitly: each element has a SubordinateMerchantId, Amount (cents), Fares { Mdr, Fee }. Use for marketplace / multi-seller scenarios where Braspag splits the capture across sub-merchants.

Names and descriptions come from the package's tools/list (@codespar/mcp-braspag@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.

The CodeSpar runtime does not route this server. Mount it in your client over stdio Β· streamable-http.

Protocol

Any MCP client

stdio Β· streamable-http

Questions

Before you install.

How do I install the Braspag MCP server?

Run npx -y @codespar/mcp-braspag@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 Braspag?

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

How does Braspag authenticate, and how are credentials stored?

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

How does Braspag 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 Braspag open source? How do I report a bug?

Yes. Braspag is MIT-licensed and published on npm as @codespar/mcp-braspag, 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.
Braspag β€” MCP server Β· 22 tools | CodeSpar