Skip to main content
PA

PagSeguro

v0.2.1API Key

Full payment stack: orders, Pix, boleto, and credit card. Your agent creates charges and manages the complete payment lifecycle.

24 tools1 env varsπŸ‡§πŸ‡· Brazilstable on npm

What your agent can do

PagSeguro gives your agent 24 tools it calls directly β€” pick the ones it needs, in Claude, Cursor, or any MCP client.

  • 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
Example call
// Your agent calls a tool directly β€” no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("create_order", { /* ... */ });

Install

terminal
$ npm install @codespar/mcp-pagseguro

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

claude_desktop_config.json
{
  "mcpServers": {
    "pagseguro": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-pagseguro"
      ],
      "env": {
        "PAGSEGURO_TOKEN": "<your_pagseguro_token>"
      }
    }
  }
}

After restart, your agent can call any of the 24 tools below β€” try create_order first.

Environment variables Β· 1

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

PAGSEGURO_TOKEN
requiredsecret

API key for pagseguro

Available tools Β· 24

Each tool is independent β€” your agent loads only what it needs to reduce context and response time.

WRITEcreate_order
Create an order in PagSeguro (Pix, boleto, or credit card)
READget_order
Get order details by ID
READlist_orders
List orders with optional filters
WRITEcreate_charge
Create a standalone charge
DELETErefund
Refund a charge (full or partial)
READget_pix_qrcode
Get Pix QR code payload and image for an order charge
WRITEcreate_customer
Create a customer in PagSeguro
READget_balance
Get account balance

Compatible frameworks

MCP is a protocol β€” any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

Run `npx -y @codespar/mcp-pagseguro` and add the config block above to your MCP client β€” Claude, Cursor, VS Code, or any MCP-compatible client. No build step, no SDK required. Prefer hosted? CodeSpar's managed tier runs it for you with auth handled.
PagSeguro β€” MCP server Β· 24 tools | CodeSpar