mcp-pagseguro — Claude Code MCP server: what it does, install
Connects an agent to PagSeguro/PagBank for orders, charges, refunds, Pix, boleto, and card payments. It fits payment tasks inside a coding workspace.
claude mcp add mcp-pagseguro -e PAGSEGURO_TOKEN=<PAGSEGURO_TOKEN> -- npx -y @codespar/mcp-pagseguroWhat mcp-pagseguro does
mcp-pagseguro exposes 24 PagSeguro/PagBank tools to an AI coding client. The server can create and inspect orders and charges, read account balance, issue full or partial refunds, retrieve Pix QR data, and handle boleto payments. It also includes tools for subscriptions, payouts, disputes, splits, and webhooks.
It runs through npx and reads the Bearer credential from PAGSEGURO_TOKEN. Set PAGSEGURO_SANDBOX=true when requests should use sandbox.api.pagseguro.com. Create the token in the PagBank developer portal. Authentication will fail without PAGSEGURO_TOKEN.
The package supports Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and the other listed clients. Claude Code adds it with claude mcp add.
What it helps with
- create an order paid by Pix, boleto, or card
- look up an order or charge by ID
- issue a full or partial refund
- retrieve a Pix QR code for a charge
- register a webhook for payment events
Example prompts for the agent
- Create a PagSeguro order with Pix payment and return its review details.
- Find the charge by its ID and prepare a full refund.
- Get the Pix QR payload and image for this order’s charge.
How to install mcp-pagseguro
Platform CLI
claude mcp add mcp-pagseguro -e PAGSEGURO_TOKEN=<PAGSEGURO_TOKEN> -- npx -y @codespar/mcp-pagseguroReplace <…> with your own values
Platform CLI
codex mcp add pagseguro --env PAGSEGURO_TOKEN=<PAGSEGURO_TOKEN> -- npx -y @codespar/mcp-pagseguroReplace <…> with your own values
Config file
{
"mcpServers": {
"pagseguro": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-pagseguro"
],
"env": {
"PAGSEGURO_TOKEN": "<PAGSEGURO_TOKEN>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"pagseguro": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codespar/mcp-pagseguro"
],
"env": {
"PAGSEGURO_TOKEN": "<PAGSEGURO_TOKEN>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e PAGSEGURO_TOKEN=<PAGSEGURO_TOKEN> pagseguro npx -y @codespar/mcp-pagseguroReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-pagseguro
How do I install mcp-pagseguro in Claude Code?
Run claude mcp add mcp-pagseguro -e PAGSEGURO_TOKEN=<PAGSEGURO_TOKEN> -- npx -y @codespar/mcp-pagseguro.
What does mcp-pagseguro do?
This MCP server connects an agent to PagSeguro/PagBank. Its tools cover orders, charges, Pix, boleto, card payments, refunds, subscriptions, and webhooks.
What does mcp-pagseguro need to run?
Set a PagBank Bearer token in PAGSEGURO_TOKEN. Add PAGSEGURO_SANDBOX=true to use the sandbox environment.