Skip to main content
Glama

pix-agent

Pix for AI agents. An MCP server that lets agents (Claude, ChatGPT, Cursor, your own bots) charge people by Pix, confirm payment, and send Pix, with the owner's spending rules in front of every payment.

  • Charge: create a Pix "copia e cola" (and QR) and know when it's paid.

  • Send: every payment is checked against your rules: sent, queued for your approval, or rejected.

  • You stay in control: agents can't approve payments, raise limits or edit rules. Approval happens only in your owner channel (a CLI in v0.1).

  • Your own account: pix-agent connects to your provider account (Asaas today). It never holds your money.

Unmaintained. This is a finished v0.1 experiment, published as is and no longer developed. The Asaas adapter has been tested only against a fake server built from the docs, never the real API: validate it in the Asaas sandbox before trusting it with money. Fork freely.

Quick start (mock mode, no account needed)

npm install
npm run build
node dist/cli.js init          # creates ~/.pix-agent/policy.json

Add it to your MCP client, e.g. Claude Code:

claude mcp add pix-agent -e PIX_PROVIDER=mock -- node /path/to/pix-agent/dist/server.js

Or Claude Desktop / Cursor (mcpServers config):

{
  "mcpServers": {
    "pix-agent": {
      "command": "node",
      "args": ["/path/to/pix-agent/dist/server.js"],
      "env": { "PIX_PROVIDER": "mock" }
    }
  }
}

In mock mode, charges are real, valid static Pix codes for PIX_RECEIVER_KEY (paying one in a bank app sends real money to that key). Mark them paid with node dist/cli.js simulate-pay <chargeId>. Sends never move money.

Related MCP server: paywings

Tools

Tool

What it does

pix_create_charge

Create a charge; returns copia e cola (+ QR image)

pix_check_charge

pending / paid / expired / cancelled

pix_send

Send a Pix through the owner's rules (use idempotencyKey)

pix_payment_status

pending_approval / processing / sent / failed / rejected

pix_balance

Provider balance, spent today, remaining daily limit

pix_spending_rules

Read-only view of the rules

pix_list_activity

Recent charges and payments

Spending rules

~/.pix-agent/policy.json (amounts in reais), read on every call:

{
  "perPaymentLimit": 500,
  "dailyLimit": 1000,
  "autoApproveUpTo": 50,
  "requireApprovalForNewRecipients": true,
  "trustedKeys": ["fornecedor@example.com"],
  "blockedKeys": [],
  "allowlistOnly": false,
  "maxChargeAmount": 5000
}

Hard rules (blocked key, per-payment limit, daily limit, allowlist) reject and still apply after you approve. Soft rules (above auto-approve, first payment to a new recipient) queue the payment for you.

Owner CLI

node dist/cli.js pending
node dist/cli.js approve <paymentId>
node dist/cli.js reject <paymentId> "reason"
node dist/cli.js log
node dist/cli.js summary

Keep the CLI out of your agent's reach: an agent with shell access on the same machine could run it.

Asaas

PIX_PROVIDER=asaas ASAAS_ENV=sandbox ASAAS_API_KEY=... ASAAS_DEFAULT_CUSTOMER_ID=cus_... node dist/server.js

See .env.example for all settings.

Development

npm run verify typechecks and runs the end-to-end suite (a real MCP client against the server and CLI, plus a fake Asaas server). Changes follow changes/NNNN-*/{intent,spec,plan}.md; see CLAUDE.md.

License

MIT. See LICENSE.

Available Tools

7 tools
pix_balancePix balanceB

Account balance at the provider, how much was committed today, and what is left under the owner's daily limit.

Inputs: no named parameters.

pix_check_chargeCheck Pix chargeA

Get the current status of a charge you created: pending, paid, expired or cancelled. Only 'paid' means the money arrived.

Inputs: chargeId (required).

pix_create_chargeCreate Pix chargeA

Create a Pix charge (money IN) and get the Pix 'copia e cola' code to send to the payer. Use pix_check_charge to learn when it is paid. Do not tell the payer it is paid until pix_check_charge says status 'paid'.

Inputs: amount (required), description (required), idempotencyKey, includeQrImage, +1 more.

pix_list_activityRecent Pix activityB

List recent charges and payments, newest first.

Inputs: limit.

pix_payment_statusPix payment statusA

Get the current status of a payment you requested with pix_send: pending_approval, processing, sent, failed or rejected.

Inputs: paymentId (required).

pix_sendSend PixA

Send a Pix (money OUT) from the owner's account. Every payment goes through the owner's spending rules and is either sent, queued for the owner's approval, or rejected. You cannot approve payments or change the rules. Do NOT split a payment into smaller ones, change the key or amount, or retry to get around a rejection or a pending approval. Always pass an idempotencyKey and reuse it on retries. Check pix_spending_rules first if unsure.

Inputs: amount (required), pixKey (required), description (required), keyType, +1 more.

pix_spending_rulesSpending rulesA

Read the owner's spending rules (limits, approval rules, trusted keys). Read-only: you cannot change them.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool targets a distinct Pix operation: incoming charge creation/checking, outgoing payments/status, balance, spending rules, and activity listing. The charge-status vs payment-status distinction is explicitly clear.

    Naming Consistency4/5

    All tools use the same pix_ prefix and snake_case, which makes the set easy to scan. However, naming mixes verb-led actions (pix_create_charge, pix_check_charge, pix_send, pix_list_activity) with noun phrases (pix_balance, pix_spending_rules, pix_payment_status).

    Tool Count5/5

    Seven tools is well-scoped for a focused Pix payment agent. Each tool covers a meaningful operation without unnecessary surface area.

    Completeness4/5

    The core lifecycle is covered: create/check incoming charges, send/check outgoing payments, balance, rules, and activity. Minor gaps remain, such as explicit charge cancellation or refund handling, but core agent workflows are supported.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Create Pix charges (Woovi/OpenPix) · List payments & check status · Refund transactions · Multi-provider routing · Daily/per-tx spending limits · Human-in-the-loop confirmation · JSONL audit trail
      7
      38 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to request policy-governed payments through MCP tools, with server-side enforcement of spending limits, merchant allow-lists, Pix BR Code validation, approval thresholds, and hash-chained audit logging in a sandbox. It lets agents check wallets, create card or Pix payment intents, and poll or list payments while keeping approval and limit changes out of agent control.
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to pay PIX bills and transfers using USDT on Polygon or Solana, without a conventional account or mandatory KYC. Provides local encrypted wallet management, on-chain balance checks, natural-language and document-based payment parsing, contacts, coupons, quotes, scheduled and recurring payments, receipts, and unresolved-operation alerts.
      2
      MIT