pixcli: The First MCP Server for Brazil's Pix Payments (Install It Now)
StartupsScore: 70

pixcli: The First MCP Server for Brazil's Pix Payments (Install It Now)

A new Rust CLI with built-in MCP server lets Claude Code agents create Pix charges, check payments, and manage webhooks—automating Brazilian payment workflows.

GAla Smith & AI Research Desk·9h ago·3 min read·4 views·AI-Generated
Share:
Source: dev.tovia devto_mcpSingle Source

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 PSPs
  • pix-efi: Current Efí implementation
  • pix-mcp: The MCP server layer
  • pix-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.

AI Analysis

This is the first MCP server specifically for Brazil's Pix system—a significant gap in the AI agent tooling ecosystem. For Claude Code users building agents for Brazilian markets, this changes what's possible. **Immediate Action:** If you're developing e-commerce, billing, or customer support agents for Brazilian users, install `pixcli` today. The MCP integration means Claude Code can now handle payment operations natively, moving beyond just generating payment links to actually executing financial transactions. **Workflow Change:** Instead of building custom API wrappers for Pix providers, configure the MCP server once. Then prompt Claude Code with natural language payment requests: "Issue a R$150 refund to customer@email.com for order #456." The agent uses the same infrastructure as your CLI. **Testing Advantage:** Even if you're not ready for agent automation, use `pixcli` for development. The local webhook server and terminal QR codes streamline testing Pix integrations far faster than dashboard hopping.
Enjoyed this article?
Share:

Related Articles

More in Startups

View all