Mcp Pagar Me

io.github.codesparPublished by GitHub account codesparv0.2.2Updated Oct 24, 2026

MCP server for Pagar.me — orders, charges, recipients, transfers, plans, subscriptions, webhooks

VerifiedSTDIODesktop onlyFinanceBusiness & Commerce

Overview

AI-generated overview

Local MCP server for Pagar.me payments that lets an assistant create and inspect orders, charges, recipients, transfers, plans, subscriptions and webhooks.

What you can do
Create, retrieve and list orders and charges, including Pix, boleto and credit card charges, capture and refunds (full or partial). Create and list recipients for split payments, check account balance, create transfers and withdrawals, and request or inspect receivables anticipation and its limits. Create, update and cancel subscription plans and recurring subscriptions. Tokenize credit cards and register webhook endpoints for event notifications.
When to use it
Useful when an assistant should work with a Pagar.me account directly: drafting or placing orders, issuing and refunding charges, managing split recipients and payouts, handling subscriptions, or setting up webhooks. Test mode is recommended while evaluating it.
Requirements
Runs locally via npx from the npm package @codespar/mcp-pagar-me, configured in a desktop MCP client such as Claude Desktop, Claude Code, Cursor or VS Code. Requires a Pagar.me account and the PAGARME_API_KEY secret key; PAGARME_PUBLIC_KEY is needed only for card tokenization. Network access to the Pagar.me API.
Before you install
The server can move real money: charges, transfers, withdrawals, refunds and anticipation requests act on the live account, so use a test-mode key (sk_test_xxx) until verified. It handles a secret API key and card tokenization, so treat PAGARME_API_KEY and PAGARME_PUBLIC_KEY as sensitive. Several tools create, change or cancel data (orders, plans, subscriptions, webhooks).

Installation

In SourceWeft

  1. Open Mcp Pagar Me in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

@codespar/mcp-pagar-me

MCP server for Pagar.me — Stone ecosystem payments with orders, charges, and split payments

[npm] [License: MIT]

Quick Start

Claude Desktop

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

json
{  "mcpServers": {    "pagar-me": {      "command": "npx",      "args": ["-y", "@codespar/mcp-pagar-me"],      "env": {        "PAGARME_API_KEY": "sk_your-key"      }    }  }}

Claude Code

bash
claude mcp add pagar-me -- npx @codespar/mcp-pagar-me

Cursor / VS Code

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

json
{  "servers": {    "pagar-me": {      "command": "npx",      "args": ["-y", "@codespar/mcp-pagar-me"],      "env": {        "PAGARME_API_KEY": "sk_your-key"      }    }  }}

Tools (22)

ToolPurpose
create_orderCreate an order in Pagar.me with items and payment
get_orderGet order details by ID
list_ordersList orders with optional filters
create_chargeCreate a charge (Pix, boleto, or credit card)
get_chargeGet charge details by ID
create_recipientCreate a recipient for split payments
get_balanceGet current account balance
create_transferCreate a transfer to a recipient
refundRefund a charge (full or partial)
list_recipientsList recipients with optional filters
create_anticipationRequest anticipation of receivables for a recipient (antecipação)
get_anticipationGet anticipation details by ID
get_anticipation_limitsGet anticipation limits available for a recipient
create_planCreate a subscription plan
update_planUpdate an existing subscription plan
create_subscriptionCreate a recurring subscription for a customer
cancel_subscriptionCancel a recurring subscription
create_card_tokenTokenize a credit card (PCI-safe).
create_withdrawalCreate a withdrawal (saque) transferring recipient balance to their registered bank account
register_webhookRegister a webhook endpoint to receive event notifications
capture_chargeCapture a pre-authorized charge (auth-then-capture flow).
partial_refundRefund a portion of a charge (explicit partial refund;

Authentication

Pagar.me uses Basic Auth with the secret key (sk_xxx) as username and empty password.

Sandbox / Testing

Pagar.me provides test mode via the dashboard. Use a test-mode API key to avoid real charges.

Get your credentials

  1. Go to Pagar.me Dashboard
  2. Create an account
  3. Get your secret key (sk_test_xxx for test mode)
  4. Set the PAGARME_API_KEY environment variable

Environment Variables

VariableRequiredDescription
PAGARME_API_KEYYesSecret key (sk_xxx) from Pagar.me dashboard
PAGARME_PUBLIC_KEYNoPublic key (pk_xxx) for create_card_token only

Roadmap

v0.3 (planned)

  • list_charges — List charges with filters
  • list_subscriptions — List subscriptions
  • list_plans — List plans
  • batch_charges — Create multiple charges in a single request
  • list_webhooks / delete_webhook — Full webhook management

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

Source: packages/payments/pagar-me/README.md at commit d0a519a

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.2.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts