Pagseguro

Finance and commerce

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

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

About Pagseguro

Pagseguro is a community MCP server from codespar, filed in our directory under finance and commerce. MCP server for PagSeguro/PagBank, orders, Pix, boleto, credit card, charges.

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

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

At a glance

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

How to set up Pagseguro

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

Pagseguro compared with similar servers

  • Paypal by codespar has fewer GitHub stars than Pagseguro (278 against 278); both are community servers, and both run locally.
  • Pagbrasil by codespar has fewer GitHub stars than Pagseguro (278 against 278); both are community servers, and both run locally.
  • Payway by codespar has fewer GitHub stars than Pagseguro (278 against 278); both are community servers, and both run locally.

Before you connect Pagseguro

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

Marketing use cases for Pagseguro

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

Small business

  • A small business can ask Pagseguro which products and customers drive margin, then plan promotions around them.
  • Owners can use Pagseguro to check refunds, failed payments and churn reasons without opening three dashboards.
  • Pagseguro 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 Pagseguro to tie campaigns to orders and revenue, not just clicks.
  • Marketing and finance can use Pagseguro to check spend against budget each week and move money to what's working.
  • Start Pagseguro on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

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

Pagseguro 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-pagseguro

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

Quick Start

Claude Desktop

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

{
  "mcpServers": {
    "pagseguro": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-pagseguro"],
      "env": {
        "PAGSEGURO_TOKEN": "your-token",
        "PAGSEGURO_SANDBOX": "true"
      }
    }
  }
}
Claude Code
claude mcp add pagseguro -- npx @codespar/mcp-pagseguro
Cursor / VS Code

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

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

Tools (24)

Tool Purpose
create_order Create an order in PagSeguro (Pix, boleto, or credit card)
get_order Get order details by ID
list_orders List orders with optional filters
create_charge Create a standalone charge
refund Refund a charge (full or partial)
get_pix_qrcode Get Pix QR code payload and image for an order charge
create_customer Create a customer in PagSeguro
get_balance Get account balance
create_subscription Create a recurring subscription plan in PagSeguro
list_subscriptions List subscriptions with optional filters
get_notifications Get payment notification details by notification code
create_split Create a split payment configuration for marketplace transactions
get_dispute Get dispute/chargeback details by ID
pay_order Pay an existing order (attach a charge/payment to an order in CREATED state)
get_charge Get charge details by ID
list_charges List charges with optional filters
capture_charge Capture a pre-authorized credit card charge
cancel_charge Cancel a charge that has not yet been settled
create_boleto Create a boleto charge
get_boleto Get boleto charge details by ID
get_public_keys Get PagSeguro public key for card data encryption (type: card)
create_payout Create a payout/transfer to a bank account or Pix key
create_webhook Register an application webhook URL to receive event notifications
list_webhooks List 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

Variable Required Description
PAGSEGURO_TOKEN Yes Bearer token from PagBank
PAGSEGURO_SANDBOX No Set 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

Questions about Pagseguro

What is the Pagseguro MCP server?

MCP server for PagSeguro/PagBank, orders, Pix, boleto, credit card, charges. Pagseguro 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 Pagseguro MCP server?

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

Does Pagseguro need an API key?

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

Is Pagseguro an official MCP server?

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

What license is Pagseguro under?

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