What It Does — Pix Payments via CLI and MCP
pixcli is an open-source Rust CLI that solves a specific pain point for Brazilian developers: working with Pix, the country's dominant instant payment system. While Pix moves trillions annually, developer tooling has been fragmented—until now.
The tool provides terminal commands for:
- Creating immediate and due-date Pix charges
- Checking payment status by transaction ID
- Generating QR codes (terminal Unicode or PNG)
- Running a local webhook server for testing
- Most importantly: serving as an MCP server for AI agents
Setup — How to Install and Configure with Claude Code
Install via Cargo:
cargo install pixcli
Configure credentials interactively:
pixcli config init
Or set environment variables:
export PIX_CLIENT_ID="your-client-id"
export PIX_CLIENT_SECRET="your-client-secret"
export PIX_CERTIFICATE_PATH="/path/to/cert.p12"
To connect with Claude Code, add to your .mcp.json:
{
"mcpServers": {
"pixcli": {
"command": "pixcli",
"args": ["mcp", "serve"]
}
}
}
Once configured, Claude Code gains native Pix tools. You can prompt: "Create a R$50 Pix charge for order #1234" and the agent will execute it using your configured PSP (currently Efí/Gerencianet, with Itaú and Bradesco planned).
When To Use It — Specific Use Cases Where It Shines
Automated E-commerce Workflows: Build AI agents that process orders end-to-end. The agent can create the Pix charge, monitor payment status, and trigger fulfillment—all without human intervention.
Autonomous Customer Support: Agents that can issue refunds via Pix immediately when identifying a valid refund case, rather than escalating to human processing.
Development & Testing: The CLI itself is valuable for debugging Pix integrations. Create test charges, verify webhook payloads, and generate QR codes without touching a dashboard.
Recurring Billing Automation: Agents managing subscription pipelines can react to payment failures, reissue charges, and report status programmatically.
The modular architecture (separate crates for core types, provider abstraction, BR Code generation, and MCP) means you can use components independently. The pix-mcp crate specifically exposes Pix operations as MCP tools following Anthropic's protocol.
Architecture That Matters for Extensibility
The Rust workspace structure enables clean separation:
pix-core: Shared domain types (Charge, Payment, Webhook)pix-provider: Abstraction trait for PSPspix-efi: Current Efí implementationpix-mcp: The MCP server layerpix-brcode: EMV-compliant BR Code generation
This means adding support for new payment providers (Itaú, Bradesco, Mercado Pago) doesn't require changing your CLI scripts or agent workflows—just implement the PixProvider trait.
Try It Now — First Commands to Run
After installation and configuration:
# Create your first test charge
pixcli charge create --amount 10.00 --description "Test"
# Start the MCP server for Claude Code
pixcli mcp serve
# Generate a QR code in terminal
pixcli qrcode generate --txid YOUR_TXID_HERE
# Start local webhook server on port 8080
pixcli webhook serve --port 8080
The project includes 210+ tests covering BR Code generation to API integration, following Rust community conventions with CI, clippy linting, and rustfmt formatting.









