mcpField
M
mcp-picpay

mcp-picpay

Local
github.com/codesparFinance275Updated 4w ago

About mcp-picpay

mcp-picpay is an MCP server for PicPay Business, a Brazilian digital wallet. It is aimed at merchants and agent developers who need checkout, Pix-style QR codes, subscriptions and transfers. Tools cover payments, recurring plans and wallet balance.

Key features

  1. 01Create, query and refund payments
  2. 02Generate static and dynamic PicPay QR codes
  3. 03Manage subscription plans and subscriptions
  4. 04Send B2P transfers to PicPay users
  5. 05Validate webhook callbacks with the seller token

Use cases

  1. 01Generate payment links or QR codes and track order status
  2. 02Manage recurring plans and enroll buyers in subscriptions
  3. 03Send batch transfers to PicPay users and review transaction history
  4. 04Verify notification origin before processing callbacks

MCP support

The server exposes PicPay checkout, subscription, transfer and wallet endpoints as MCP tools for MCP clients to call.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-picpay": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-picpay"
],
"env": {
"PICPAY_TOKEN": "<PICPAY_TOKEN>",
"PICPAY_SELLER_TOKEN": "<PICPAY_SELLER_TOKEN>",
"PICPAY_BASE_URL": "<PICPAY_BASE_URL>"
}
}
}
}
Run commandnpx -y @codespar/mcp-picpay
Environment variables to set
PICPAY_TOKENSecretPicPay merchant integration token (sent as x-picpay-token header)
PICPAY_SELLER_TOKENSecretPicPay seller token used to validate webhook callbacks (x-seller-token header)
PICPAY_BASE_URLPicPay ecommerce API base URL. Defaults to https://appws.picpay.com/ecommerce/public.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@codespar/mcp-picpay0.2.0-alpha.3

Tools

20

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
buyerobjectNoBuyer identity. document (CPF) is required by BCB rules.
buyer.emailstringNo
buyer.phonestringNoE.164 or BR format (e.g. +55 11 91234-5678)
buyer.documentstringYesCPF, digits only or formatted
buyer.lastNamestringYes
buyer.firstNamestringYes
valuenumberYesAmount in BRL, decimal (e.g. 100.50). Not cents.
expiresAtstringNoISO-8601 expiration timestamp (e.g. 2026-12-31T23:59:59-03:00)
returnUrlstringYesURL the buyer is redirected to after completing payment in the PicPay app.
callbackUrlstringYesHTTPS endpoint PicPay POSTs to on status changes. Validate via x-seller-token header.
referenceIdstringYesMerchant-side unique identifier for this order. Used in subsequent status/cancel calls.

Details

From the project README

@codespar/mcp-picpay

MCP server for PicPay Business — Brazilian digital wallet with 60M+ users.

PicPay's Checkout API lets merchants create a payment intent that the buyer completes inside the PicPay app, returning a redirect URL plus a Pix-style QR code. The Recurrency API adds subscription plans on top.

Tools (20)

ToolPurpose
create_paymentCreate a PicPay checkout payment.
get_payment_statusGet the status of a payment by referenceId.
cancel_paymentCancel a PicPay order.
create_planCreate a subscription plan (Recurrency API).
list_plansList all subscription plans registered for this merchant.
update_planUpdate an existing subscription plan.
delete_planDelete a subscription plan.
create_subscriptionEnroll a buyer in a subscription plan.
get_subscriptionRetrieve a subscription by id.
cancel_subscriptionCancel an active subscription.
validate_notificationVerify that an incoming webhook callback came from PicPay by comparing the x-seller-token header against PI...
refund_paymentRefund a paid PicPay order, optionally partially.
create_b2p_transferCreate a Business-to-Person (B2P) transfer: push funds from the merchant wallet to a PicPay user identified...
get_b2p_transferGet the status of a B2P transfer by referenceId.
create_batch_paymentSubmit a batch of B2P transfers in a single request.
list_transactionsList merchant transactions (payments and transfers) within a date range.
get_wallet_balanceRetrieve the merchant's current PicPay wallet balance (available and blocked amounts in BRL).
generate_static_qrcodeGenerate a static PicPay Pay QR code for in-store / reusable use.
generate_dynamic_qrcodeGenerate a dynamic PicPay Pay QR code with a fixed amount and optional expiration.
create_payment_linkCreate a shareable PicPay payment link.

Install

npm install @codespar/mcp-picpay@alpha

Environment

PICPAY_TOKEN="..."          # Merchant integration token (x-picpay-token header)
PICPAY_SELLER_TOKEN="..."   # Seller token used to validate webhook callbacks
PICPAY_BASE_URL="..."       # Optional. Defaults to https://appws.picpay.com/ecommerce/public

Authentication

Every request sends:

Content-Type: application/json
x-picpay-token: <PICPAY_TOKEN>

PicPay webhook callbacks carry x-seller-token: <PICPAY_SELLER_TOKEN>. Use the validate_notification tool (or compare the header yourself) before trusting a payload, then fetch the authoritative status with get_payment_status.

Run

# stdio (default — for Claude Desktop, Cursor, etc)
npx @codespar/mcp-picpay

# HTTP (for server-to-server testing)
MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-picpay

Status

0.1.0-alpha.1. Core checkout endpoints (/payments, /payments/{ref}/status, /payments/{ref}/cancellations) are verified against PicPay's public docs. Recurrency (plans + subscriptions) endpoints come from the documented path shape but field-level schemas (frequency enum values, subscription response) should be confirmed against the live API before production use.

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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.