pixcli
MCP Server

MCP Server Overview

Use Pix operations from AI agents via the Model Context Protocol

pixcli includes an MCP (Model Context Protocol) server that exposes Pix operations as tools for AI agents. This allows Claude, GPT, and other LLM-based agents to create charges, check balances, and manage payments through natural language.

What is MCP?

The Model Context Protocol is an open standard for connecting AI agents to external tools and data sources. It defines a JSON-RPC-based protocol that AI assistants use to discover and invoke tools.

Starting the MCP Server

pix-mcp

The pix-mcp binary is included when you install pixcli. It reads from the same ~/.pixcli/config.toml configuration file.

Available Tools

The MCP server exposes the following tools:

ToolDescription
get_balanceQuery account balance
create_chargeCreate a new Pix charge
get_chargeGet charge details by TxID
list_chargesList recent charges
list_pixList received Pix transactions
generate_qrGenerate a static Pix QR code

Tool Details

get_balance

No parameters required. Returns the available balance.

create_charge

ParameterTypeRequiredDescription
amountstringYesAmount in BRL
keystringNoPix key (uses default)
descriptionstringNoPayment description
expirynumberNoExpiry in seconds

get_charge

ParameterTypeRequiredDescription
txidstringYesTransaction ID

list_charges

ParameterTypeRequiredDescription
daysnumberNoDays to look back (default: 7)

list_pix

ParameterTypeRequiredDescription
daysnumberNoDays to look back (default: 7)

generate_qr

ParameterTypeRequiredDescription
keystringYesPix key
amountnumberNoAmount in BRL
namestringNoMerchant name
citystringNoMerchant city

Example Conversations

With Claude Code

You: Check my Pix balance

Claude: Your current available balance is R$1,250.00.

You: Create a charge for R$50 with description "Monthly subscription"

Claude: I've created a Pix charge:

  • TxID: abc123def456
  • Amount: R$50.00
  • Status: ATIVA
  • Expires in 1 hour

Next Steps

On this page