pix-mcp is a lightweight Model Context Protocol (MCP) server that enables AI agents (such as Claude, Cursor, Windsurf) to generate static Pix QR codes through natural language prompts.
Purpose
The project targets the Brazilian instant payment ecosystem, aiming to let AI agents directly create static Pix payment QR codes compliant with the BACEN PIX standard, without calling external APIs or registering accounts.
Main capabilities
- Provides the MCP tool generateStaticPix, which can generate a static QR code for any Pix key.
- Supports multiple Pix key types: email (such as example@email.com), phone (such as +5511999999999), CPF (11 digits), CNPJ (14 digits), and random keys (UUID format).
- The generated content includes: an EMV-format Pix copy-and-paste code, a QR code image as a base64 data URL, and a success status and message.
- Complies with EMV 4.0 and BACEN PIX standards, using CRC16-CCITT checksum.
- Implemented in TypeScript, using Zod for input validation, with complete error handling and logging.
- Zero external dependencies, no API key required, no registration or credentials required.
Usage
- Global installation:
npm install -g pix-mcp(according to the installation command provided in the README; please refer to the repository for the actual command). - Can be run directly
npx pix-mcpor (after global installation)pix-mcp.\n- Configure it in the MCP configuration file for Claude Desktop (macOS:~/Library/Application Support/Claude/claude_desktop_config.json;Windows:%APPDATA%/Claude/claude_desktop_config.json), then restart to use it. - It can also be configured in Cursor, Windsurf, or other MCP-compatible tools that support MCP.
- MCP tool call parameters:
pixKey(string): a valid Pix key (email, phone, CPF, CNPJ, or random key).amount(number): the payment amount in Brazilian reais (0.01 to 999,999.99).recipientName(string): the payee name (maximum 25 characters).recipientCity(string): the payee's city (maximum 15 characters).
- Environment variables:
MCP_MODE: server mode (stdiofor MCP,httpfor HTTP API), defaultstdio。NODE_ENV: environment (development/production), defaultdevelopment。PORT: port in HTTP mode, default 3000.
- After deploying to Railway, you need to add the above environment variables in the Railway dashboard.
Use cases
- Generate Pix payment QR codes directly in AI agent conversations.
- Customer service, e-commerce, or automation workflows that need to quickly create static payment codes compliant with the Brazilian Pix standard.
- Integrate with MCP-compatible tools such as Claude, Cursor, and Windsurf to provide the ability to generate QR codes from natural language.
Limitations and notes
- Only static Pix QR codes are supported: no expiration time, and the payee must manually verify the payment.
- CPF/CNPJ keys must be valid and registered as Pix keys.
- Avoid using fake CPFs (such as 12345678900); banks will reject them.
- All code complies with the EMV standard and has passed bank verification, but the amount range is limited to 0.01 to 999,999.99 Brazilian reais.
- The license is MIT.