Skip to main content
MCP server CX Codex

mcp-pagar-me — Claude Code MCP server: what it does, how to install

Connects AI agents to the Pagar.me payment platform to issue Pix charges, handle split payouts, and manage billing.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env PAGARME_API_KEY=<PAGARME_API_KEY> --env PAGARME_PUBLIC_KEY=<PAGARME_PUBLIC_KEY> --transport stdio pagar-me -- npx -y @codespar/mcp-pagar-me
Open on GitHub

What mcp-pagar-me does

This server links your workspace with the Stone-owned Pagar.me gateway. It provides 22 callable tools. An assistant can generate orders, check account balances, or trigger transactions via Pix or credit cards. Two-step charge capture and refund flows work out of the box.

Beyond single transactions, the tooling covers multi-party split payouts. You can configure recipients and schedule direct bank withdrawals. Subscription billing is supported alongside automated webhook registration.

You need PAGARME_API_KEY in your environment to authenticate calls. Tokenizing card details via create_card_token fails unless you also define PAGARME_PUBLIC_KEY. You can test safe workflows first by supplying sandbox test credentials from your Pagar.me account.

What it helps with

  • Generate customer charges using Pix or bank cards
  • Configure split payouts and direct transfers to recipient accounts
  • Execute complete or partial refunds on existing transactions
  • Set up recurring subscription plans and customer enrollments

Example prompts for the agent

  • Create a new Pix charge for 150 BRL
  • Check the current balance and retrieve anticipation limits for this recipient
  • Issue a partial refund for charge ID ch_12345

How to install mcp-pagar-me

Platform CLI

claude mcp add --env PAGARME_API_KEY=<PAGARME_API_KEY> --env PAGARME_PUBLIC_KEY=<PAGARME_PUBLIC_KEY> --transport stdio pagar-me -- npx -y @codespar/mcp-pagar-me

Replace <…> 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-pagar-me

How to install mcp-pagar-me in Claude Code?

Run claude mcp add mcp-pagar-me -e PAGARME_API_KEY=<PAGARME_API_KEY> -- npx -y @codespar/mcp-pagar-me in your terminal.

What does mcp-pagar-me do?

It supplies 22 tools to interact with Pagar.me, letting models process charges, manage recipients, split payments, and control subscriptions.

When is PAGARME_PUBLIC_KEY necessary?

You only need the public key when calling create_card_token for card tokenization. All other endpoints run strictly on PAGARME_API_KEY.

Similar MCP servers

Everything for Finance and business →

From the same set124

mcp-payway Gives an AI agent access to the Payway gateway: tokenize a card, charge it, capture or refund. Built for teams wiring payments into an Argentine merchant setup. CX Codex +1 ★ 274repo stars mcp-paypal MCP server connecting AI assistants to the PayPal REST API. Handles order checkout, recurring subscriptions, batch payouts, and customer dispute resolution. CX Codex +1 ★ 274repo stars 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. CX Codex +1 ★ 274repo stars mcp-pagbrasil Wires three PagBrasil tools into your agent: create an order, check its status, issue a refund. Useful when your store sells into Brazil and takes Pix or boleto. CX Codex +1 ★ 274repo stars mcp-openpay Connects an AI coding agent to Openpay for charges, customers, subscriptions, MXN payouts, and webhooks. Built for the Mexican gateway. CX Codex +1 ★ 274repo stars mcp-open-finance Connects a coding agent to Open Finance Brasil: accounts, transactions, consents, cards, loans and investments. Useful when your code talks to Brazilian banking APIs. CX Codex +1 ★ 274repo stars mcp-onfido Connects Onfido identity verification and KYC workflows to your AI assistant. Useful for managing applicants, file uploads, and checks from IDE chats. CX Codex +1 ★ 274repo stars mcp-omie Connects an AI agent to Omie for customer, product, order, invoice, and finance operations. Useful when ERP actions should run from an agent chat. CX Codex +1 ★ 274repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor