Mcp Pagar Me

io.github.codespar由 GitHub 账号 codespar 发布v0.2.2更新于 Oct 24, 2026

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

已验证STDIO仅桌面金融商业与电商

概览

AI 生成的概览

面向 Pagar.me 支付的本地 MCP 服务器,让助手创建和查询订单、收款、收款方、转账、订阅计划、订阅与 Webhook。

可以做什么
创建、查询和列出订单与收款,支持 Pix、boleto 和信用卡收款,并可捕获预授权收款和全额或部分退款。创建和列出用于分账的收款方,查询账户余额,创建转账和提现,申请或查看应收账款提前结算及其额度。创建、更新和取消订阅计划与周期订阅。对信用卡进行令牌化,并注册接收事件通知的 Webhook 端点。
适用场景
适合让助手直接操作 Pagar.me 账户的场景:起草或创建订单、发起和退款收款、管理分账收款方与出款、处理订阅,或配置 Webhook。评估阶段建议使用测试模式。
运行要求
通过 npx 从 npm 包 @codespar/mcp-pagar-me 在本地运行,需在 Claude Desktop、Claude Code、Cursor 或 VS Code 等桌面 MCP 客户端中配置。需要 Pagar.me 账户和 PAGARME_API_KEY 密钥;仅信用卡令牌化需要 PAGARME_PUBLIC_KEY。需要访问 Pagar.me API 的网络连接。
安装前请注意
该服务器可操作真实资金:收款、转账、提现、退款和提前结算请求都会作用于真实账户,验证前请使用测试模式密钥(sk_test_xxx)。它涉及密钥和信用卡令牌化,应将 PAGARME_API_KEY 与 PAGARME_PUBLIC_KEY 视为敏感信息。多个工具会创建、修改或取消数据(订单、计划、订阅、Webhook)。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Pagar Me,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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

来源:packages/payments/pagar-me/README.md,提交 d0a519a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分