Skip to main content
PA

Pagar.me

v0.2.1API Key

Payment gateway with card, Pix, and boleto. Receivables anticipation and risk management built for Brazilian marketplaces.

22 tools2 env vars🇧🇷 Brazilstable on npm

What your agent can do

Pagar.me gives your agent 22 tools it calls directly — pick the ones it needs, in Claude, Cursor, or any MCP client.

  • create_orderCreate an order in Pagar.me with items and payment
  • get_orderGet order details by ID
  • list_ordersList 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-pagar-me

Quickstart

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

claude_desktop_config.json
{
  "mcpServers": {
    "pagar-me": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-pagar-me"
      ],
      "env": {
        "PAGARME_API_KEY": "<your_pagarme_api_key>"
      }
    }
  }
}

After restart, your agent can call any of the 22 tools below — try create_order first.

Environment variables · 2

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

PAGARME_API_KEY
requiredsecret

Secret key (sk_xxx) for Pagar.me

PAGARME_PUBLIC_KEY
optional

Public key (pk_xxx) for card tokenization (required only for create_card_token)

Available tools · 22

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

WRITEcreate_order
Create an order in Pagar.me with items and payment
READget_order
Get order details by ID
READlist_orders
List orders with optional filters
WRITEcreate_charge
Create a charge (Pix, boleto, or credit card)
WRITEget_charge
Get charge details by ID
WRITEcreate_recipient
Create a recipient for split payments
READget_balance
Get current account balance
WRITEcreate_transfer
Create a transfer to a recipient

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-pagar-me` 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.
Pagar.me — MCP server · 22 tools | CodeSpar