Mcp Pagseguro

io.github.codesparPublished by GitHub account codesparv0.2.2Updated Oct 24, 2026

MCP server for PagSeguro/PagBank — orders, Pix, boleto, credit card, charges

VerifiedSTDIODesktop onlyFinanceBusiness & Commerce

Overview

AI-generated overview

Local MCP server for PagSeguro/PagBank that lets an assistant create and manage orders, charges, Pix, boleto and card payments.

What you can do
Create, retrieve, list and pay orders, including Pix QR codes and boleto charges, and read account balance and payment notifications. Create, retrieve, list, capture, cancel and refund charges. Create customers and recurring subscription plans, and list subscriptions. Create split payment configurations and payouts to bank accounts or Pix keys. Register and list webhooks, and fetch public keys for card data encryption.
When to use it
Useful when an assistant should work with a PagSeguro/PagBank account directly: drafting or placing orders, issuing charges and Pix or boleto payments, handling refunds and subscriptions, or inspecting balance and disputes. Test against the sandbox before touching live money.
Requirements
Runs locally via npx from the npm package @codespar/mcp-pagseguro, so Node.js is needed. Requires a PagBank developer account and a Bearer token supplied in the PAGSEGURO_TOKEN environment variable. Set PAGSEGURO_SANDBOX to true to use the sandbox endpoint. Network access to PagSeguro/PagBank APIs is required.
Before you install
The token in PAGSEGURO_TOKEN grants access to a real payment account; keep it out of shared configs and prefer sandbox mode while testing. Many tools move money or change records: creating orders and charges, paying orders, capturing charges, refunds, payouts to bank accounts or Pix keys, subscriptions, splits and webhooks. Mistakes can cause real financial loss, so review amounts and recipients before confirming.

Installation

In SourceWeft

  1. Open Mcp Pagseguro in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

@codespar/mcp-pagseguro

MCP server for PagSeguro/PagBank — orders, charges, Pix, boleto, and credit card payments

[npm] [License: MIT]

Quick Start

Claude Desktop

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

json
{  "mcpServers": {    "pagseguro": {      "command": "npx",      "args": ["-y", "@codespar/mcp-pagseguro"],      "env": {        "PAGSEGURO_TOKEN": "your-token",        "PAGSEGURO_SANDBOX": "true"      }    }  }}

Claude Code

bash
claude mcp add pagseguro -- npx @codespar/mcp-pagseguro

Cursor / VS Code

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

json
{  "servers": {    "pagseguro": {      "command": "npx",      "args": ["-y", "@codespar/mcp-pagseguro"],      "env": {        "PAGSEGURO_TOKEN": "your-token",        "PAGSEGURO_SANDBOX": "true"      }    }  }}

Tools (24)

ToolPurpose
create_orderCreate an order in PagSeguro (Pix, boleto, or credit card)
get_orderGet order details by ID
list_ordersList orders with optional filters
create_chargeCreate a standalone charge
refundRefund a charge (full or partial)
get_pix_qrcodeGet Pix QR code payload and image for an order charge
create_customerCreate a customer in PagSeguro
get_balanceGet account balance
create_subscriptionCreate a recurring subscription plan in PagSeguro
list_subscriptionsList subscriptions with optional filters
get_notificationsGet payment notification details by notification code
create_splitCreate a split payment configuration for marketplace transactions
get_disputeGet dispute/chargeback details by ID
pay_orderPay an existing order (attach a charge/payment to an order in CREATED state)
get_chargeGet charge details by ID
list_chargesList charges with optional filters
capture_chargeCapture a pre-authorized credit card charge
cancel_chargeCancel a charge that has not yet been settled
create_boletoCreate a boleto charge
get_boletoGet boleto charge details by ID
get_public_keysGet PagSeguro public key for card data encryption (type: card)
create_payoutCreate a payout/transfer to a bank account or Pix key
create_webhookRegister an application webhook URL to receive event notifications
list_webhooksList registered application webhooks

Authentication

PagSeguro uses a Bearer token for authentication. Generate your token from the PagBank developer portal.

Sandbox / Testing

PagSeguro provides a sandbox at sandbox.api.pagseguro.com. Set PAGSEGURO_SANDBOX=true to use it.

Get your credentials

  1. Go to PagBank Developer Portal
  2. Create a developer account
  3. Generate your API token
  4. Set the PAGSEGURO_TOKEN environment variable

Environment Variables

VariableRequiredDescription
PAGSEGURO_TOKENYesBearer token from PagBank
PAGSEGURO_SANDBOXNoSet to "true" for sandbox mode

Roadmap

v0.2 (planned)

  • create_subscription — Create a recurring subscription
  • list_subscriptions — List all subscriptions with filters
  • get_notifications — Get payment notifications/webhooks
  • create_split — Create split payments between receivers
  • get_dispute — Get dispute/chargeback details

v0.3 (planned)

  • create_plan — Create a subscription plan
  • get_installments — Get installment options for a payment
  • batch_refunds — Process multiple refunds in a single request

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

Links

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

Source: packages/payments/pagseguro/README.md at commit d0a519a

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.2.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts