MCP server
What it is
payzu-mcp-pix is a local MCP server. It runs on your machine via npx and talks to the AI assistant over stdio. It is not a hosted server and has no URL: the assistant decides which tool to call and the server performs the HTTP call to the Pix Processamento API using your token.
MCP is the open protocol that lets AI assistants call external tools via JSON-RPC. Use MCP when you want the assistant to run real actions on your account during development or interactive use. If your goal is your production app talking to PayZu, use the SDK (payzu-pix).
Requires payzu-mcp-pix 0.3.0 or higher and Node 20 or higher.
Before you start
Get your API token at abrirconta.payzu.com.br:
- Sign in to your account.
- Open the credentials area (the API token section).
- Copy the token. That value goes into
PAYZU_TOKEN.
The token gives real access to your account: create charges, withdraw and check balance. Treat it like a password. We recommend approving each agent action before it runs, instead of letting it run unattended.
Google Antigravity
In the Antigravity interface:
- In the agent panel (Agent Manager), click the
...menu at the top. - Choose
MCP Servers, thenManage MCP Servers. - Click
View raw config. - Paste the config below, replacing it with your token:
{
"mcpServers": {
"payzu-pix": {
"command": "npx",
"args": ["-y", "payzu-mcp-pix"],
"env": { "PAYZU_TOKEN": "your-token-here" }
}
}
}Paste the literal token inside env. Variable expansion ${VAR} fails in some versions.
The config file lives at:
~/.gemini/config/mcp_config.jsonon newer versions (Antigravity 2.0).~/.gemini/antigravity/mcp_config.jsonon earlier builds.
Save and click Refresh on the Manage MCP Servers screen.
Antigravity needs payzu-mcp-pix 0.3.0 or higher. The dotted tool names from older versions were rejected by the models (Gemini, Claude, GPT) that Antigravity uses.
Claude Code
claude mcp add payzu-pix --env PAYZU_TOKEN=your-token -- npx -y payzu-mcp-pixUse --scope user for the server to apply across all projects:
claude mcp add payzu-pix --scope user --env PAYZU_TOKEN=your-token -- npx -y payzu-mcp-pixClaude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"payzu-pix": {
"command": "npx",
"args": ["-y", "payzu-mcp-pix"],
"env": { "PAYZU_TOKEN": "your-token-here" }
}
}
}Restart Claude Desktop after saving.
Cursor
Edit .cursor/mcp.json in the project or ~/.cursor/mcp.json to apply everywhere:
{
"mcpServers": {
"payzu-pix": {
"command": "npx",
"args": ["-y", "payzu-mcp-pix"],
"env": { "PAYZU_TOKEN": "your-token-here" }
}
}
}VS Code (GitHub Copilot)
Edit .vscode/mcp.json. Here the key is servers (not mcpServers), with type set to stdio. Use inputs with promptString and password so the token is not committed:
{
"servers": {
"payzu-pix": {
"type": "stdio",
"command": "npx",
"args": ["-y", "payzu-mcp-pix"],
"env": { "PAYZU_TOKEN": "${input:payzu-token}" }
}
},
"inputs": [
{
"id": "payzu-token",
"type": "promptString",
"description": "PayZu API token",
"password": true
}
]
}Windsurf
Edit ~/.codeium/windsurf/mcp_config.json, same mcpServers shape:
{
"mcpServers": {
"payzu-pix": {
"command": "npx",
"args": ["-y", "payzu-mcp-pix"],
"env": { "PAYZU_TOKEN": "your-token-here" }
}
}
}Step by step
- Get your token at abrirconta.payzu.com.br.
- Configure your client (Antigravity, Claude Code, Claude Desktop, Cursor, VS Code or Windsurf) with one of the blocks above.
- Ask for a charge in plain language, for example:
"Create a R$ 50.00 Pix charge with reference pedido-001 and callback https://meusite.com.br/webhook"
- The agent calls
pix_createand returns the chargeidandqrCodeText. - Ask "what's my balance?" and the agent calls
account_balanceand answers with the number.
Not working?
- Error
[401]: invalid or expired token. Generate a new one at abrirconta.payzu.com.br. - Server missing from the tool list: reload or restart the client (in Antigravity, use
Refresh).
Tool list (29)
All names in snake_case. Each tool has a description with a direct link to the endpoint page in the docs.
Pix charges (4)
| Tool | HTTP |
|---|---|
pix_create | POST /pix |
pix_get | GET /pix |
pix_qr_code | GET /pix/qr-code/{transactionId} |
pix_proof | GET /proof/{id} |
Withdrawals (6)
| Tool | HTTP |
|---|---|
withdraw_create | POST /withdraw |
withdraw_get | GET /withdraw |
withdraw_by_qr | POST /withdraw/qrcode |
withdraw_read_qr | POST /pix/qrcode/read |
withdraw_dict | GET /pix/key?pixKey={key} |
withdraw_proof | GET /withdraw/proof/{id} |
Internal transfer (2)
| Tool | HTTP |
|---|---|
internal_transfer_create | POST /internal-transfer |
internal_transfer_get | GET /internal-transfer |
Account (2)
| Tool | HTTP |
|---|---|
account_profile | GET /user |
account_balance | GET /user/balance |
Reports (6)
| Tool | HTTP |
|---|---|
reports_list_transactions | GET /user/transactions |
reports_get_transaction | GET /user/transactions/{id} |
reports_create_csv | POST /user/report |
reports_list_jobs | GET /user/report |
reports_get_job | GET /user/report/{id} |
reports_download | POST /user/report/{id}/download |
Callbacks (4)
| Tool | HTTP |
|---|---|
callbacks_list | GET /user/callbacks |
callbacks_get | GET /user/callbacks/{id} |
callbacks_resend | POST /user/callbacks/resend/{transactionId} |
callbacks_resend_bulk | POST /user/callbacks/resend |
MED infractions (5)
| Tool | HTTP |
|---|---|
infractions_list | GET /user/infractions |
infractions_get | GET /user/infractions/{id} |
infractions_create_defense | POST /user/infractions/{id}/defenses (multipart) |
infractions_list_defenses | GET /user/infractions/{id}/defenses |
infractions_get_defense | GET /user/infractions/{id}/defenses/{defenseId} |
Applied conventions
- Values in decimal BRL. The tool rejects cents:
9990becomes a validation error, it has to be99.90. clientReferencerequired on creations (idempotency).callbackUrlrequired on creations, otherwise nobody tells you the status.- Auto-retry on 5xx/429 with exponential backoff and jitter (max 3 attempts).
- Errors include
requestId, copy and paste it into support if needed. - Zero admin endpoints, only the public and client surface.
Environment variables
| Env var | Required | Default | Description |
|---|---|---|---|
PAYZU_TOKEN | yes | Token from abrirconta.payzu.com.br | |
PAYZU_API_URL | no | https://api.payzu.processamento.com/v1 | Override for whitelabel |
Support
Postman
Collection oficial PayZu Pix com 29 endpoints prontos pra testar no Postman. Importa com um clique, Bearer token pré-configurado e mock server para desenvolvimento sem precisar de credenciais.
Para IAs (LLMs)
Toda a documentação da PayZu disponível em formato consumível por modelos de linguagem. Copie o conteúdo direto, baixe o dump completo, ou use as URLs específicas por página. Funciona com ChatGPT, Claude, Gemini, Cursor, Copilot, etc.