# mcp-pagseguro

Connects an agent to PagSeguro/PagBank for orders, charges, refunds, Pix, boleto, and card payments. It fits payment tasks inside a coding workspace.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 274
- Author: codespar
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codespar/mcp-dev-latam/tree/HEAD/packages/payments/pagseguro
- Updated: 2026-09-27
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-pagseguro

## What it 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`.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `PAGSEGURO_TOKEN` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mcp-pagseguro -e PAGSEGURO_TOKEN=<PAGSEGURO_TOKEN> -- npx -y @codespar/mcp-pagseguro
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add pagseguro --env PAGSEGURO_TOKEN=<PAGSEGURO_TOKEN> -- npx -y @codespar/mcp-pagseguro
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "pagseguro": {
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-pagseguro"
            ],
            "env": {
                "PAGSEGURO_TOKEN": "<PAGSEGURO_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "pagseguro": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-pagseguro"
            ],
            "env": {
                "PAGSEGURO_TOKEN": "<PAGSEGURO_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e PAGSEGURO_TOKEN=<PAGSEGURO_TOKEN> pagseguro npx -y @codespar/mcp-pagseguro
```
Replace <…> with your own values

## When to use it
- 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
- 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.

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24242
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7506

From the same set: [codespar/mcp-dev-latam](https://affpapa.org/en/nevibecode/by/codespar/mcp-dev-latam.md) — 124 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
