A lightweight Model Context Protocol (MCP) server that enables AI agents (Claude, Cursor, Windsurf) to generate static Pix QR codes via natural-language prompts. - π§ MCP Tool: - generateStaticPix - Generate static Pix QR codes for any Pix key (no API required) - π Production-ready: Comprehensive error handling and logging - π Type-safe: Full TypeScript implementation with Zod validation - π± QR
Add this skill
npx mdskills install Regenerating-World/pix-mcpWell-documented MCP server for Brazilian Pix QR code generation with solid setup instructions
1# Pix MCP Server v2.1.023A lightweight Model Context Protocol (MCP) server that enables AI agents (Claude, Cursor, Windsurf) to generate static Pix QR codes via natural-language prompts.45## π Features67- **π§ MCP Tool**:8 - `generateStaticPix` - Generate static Pix QR codes for any Pix key (no API required)9- **π Production-ready**: Comprehensive error handling and logging10- **π Type-safe**: Full TypeScript implementation with Zod validation11- **π± QR Code generation**: Automatic QR code creation for Pix payments12- **π¦ Zero Dependencies**: No external API keys or services required13- **π Open & Accessible**: Works without any registration or credentials14- **β EMV 4.0 Compliant**: Follows BACEN PIX standards with proper CRC16-CCITT validation1516## π Quick Start1718```bash19# Install globally20npm install -g pix-mcp2122# Run in MCP mode (for Claude Desktop)23pix-mcp2425# Run in HTTP mode (for web services)26MCP_MODE=http pix-mcp27```2829## π§ Usage3031### MCP Mode (Default)3233```bash34# Start in MCP mode for Claude Desktop integration35pix-mcp36```3738### HTTP Mode3940```bash41# Start in HTTP mode on port 300042MCP_MODE=http pix-mcp43```4445### Making Requests4647#### HTTP API4849```bash50curl -X POST http://localhost:3000/tools/call \51 -H "Content-Type: application/json" \52 -d '{53 "name": "generateStaticPix",54 "arguments": {55 "pixKey": "10891990909",56 "amount": 100.50,57 "recipientName": "Franco Camelo Aguzzi",58 "recipientCity": "Florianopolis"59 }60 }'61```6263#### MCP Tool6465```typescript66const result = await mcpClient.callTool('generateStaticPix', {67 pixKey: '10891990909',68 amount: 100.5,69 recipientName: 'Franco Camelo Aguzzi',70 recipientCity: 'Florianopolis',71});72```7374## π Deployment7576### Railway7778[](https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FRegenerating-World%2Fpix-mcp)7980**β οΈ Important:** After deploying to Railway, add these environment variables in the Railway dashboard:8182- `MCP_MODE=http`83- `NODE_ENV=production` (optional)8485### Manual Deployment8687```bash88# Clone the repository89git clone https://github.com/Regenerating-World/pix-mcp.git90cd pix-mcp9192# Install dependencies93npm install9495# Build the project96npm run build9798# Start the server in HTTP mode99MCP_MODE=http NODE_ENV=production node dist/index.js100```101102## π License103104MIT105106## π§ Configuration107108### Environment Variables109110- `MCP_MODE`: Server mode (`stdio` for MCP, `http` for HTTP API) - Default: `stdio`111- `NODE_ENV`: Environment (`development`/`production`) - Default: `development`112- `PORT`: HTTP port when in HTTP mode - Default: `3000`113114## π€ Usage with AI Tools115116### Claude Desktop1171181. Install the package globally:119120```bash121npm install -g pix-mcp122```1231242. Add to your Claude Desktop MCP configuration (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS or `%APPDATA%/Claude/claude_desktop_config.json` on Windows):125126```json127{128 "mcpServers": {129 "pix-mcp": {130 "command": "npx",131 "args": ["pix-mcp"],132 "env": {133 "MCP_MODE": "stdio"134 }135 }136 }137}138```1391403. Restart Claude Desktop and start using:141142```143Create a Pix charge for R$25.50 to Maria Silva for lunch144```145146### Cursor (with MCP support)147148Add to your Cursor MCP settings:149150```json151{152 "mcpServers": {153 "pix-mcp": {154 "command": "pix-mcp"155 }156 }157}158```159160### Windsurf (with MCP support)161162Configure in Windsurf MCP settings:163164```json165{166 "pix-mcp": {167 "command": "npx pix-mcp",168 "args": []169 }170}171```172173### Any MCP-compatible tool174175Your tool should support MCP servers. Configure using:176177- **Command**: `npx pix-mcp` or `pix-mcp` (if installed globally)178- **Protocol**: stdio179- **Environment**: `MCP_MODE=stdio`180181## π¨ Available Tools182183### `generateStaticPix`184185Creates a static Pix payment QR code following BACEN EMV 4.0 standards.186187**Parameters:**188189- `pixKey` (string): Valid Pix key (email, phone, CPF, CNPJ, or random key)190- `amount` (number): Payment amount in BRL (0.01 to 999,999.99)191- `recipientName` (string): Name of the payment recipient (max 25 chars)192- `recipientCity` (string): City of the payment recipient (max 15 chars)193194**Returns:**195196- Payment details (amount, recipient, city)197- Pix copy-paste code (EMV format)198- QR code image (base64 data URL)199- Success status and message200201**Supported Pix Key Types:**202203- π§ Email: `example@email.com`204- π± Phone: `+5511999999999`205- π€ CPF: `12345678901` (11 digits)206- π’ CNPJ: `12345678000195` (14 digits)207- π Random Key: `123e4567-e89b-12d3-a456-426614174000` (UUID format)208209## ποΈ Development210211```bash212# Development mode with hot reload213npm run dev214215# Run tests216npm test217218# Build for production219npm run build220221# Lint code222npm run lint223224# Format code225npm run format226```227228## πΊοΈ Roadmap229230### Phase 1: MVP β231232- [x] `generateStaticPix` tool233- [x] Static Pix QR code generation234- [x] QR code generation235- [x] Claude Desktop compatibility236- [x] EMV 4.0 compliance237- [x] CRC16-CCITT validation238- [x] All Pix key types support239- [x] Public deployment240- [x] MCP server configuration files241- [x] Multi-tool compatibility242243### Phase 2: MCP Discovery244245- [ ] Register with MCP registry246- [ ] Add to community MCP directories247- [ ] Integration examples for more tools248249## π Security & Validation250251- β EMV 4.0 standard compliance252- β CRC16-CCITT checksum validation253- β Input validation with Zod schemas254- β Pix key format validation255- β Comprehensive error handling256- β Type-safe TypeScript implementation257258## β οΈ Important Notes259260- **CPF/CNPJ Keys**: Must be valid and registered as Pix keys261- **Test Data**: Avoid using fake CPFs like `12345678900` - they will be rejected by banks262- **Static Codes**: No expiration, recipient must check payments manually263- **Validation**: All codes are EMV-compliant and pass bank validation264265## π License266267MIT License - see [LICENSE](LICENSE) file for details.268269## π€ Contributing2702711. Fork the repository2722. Create a feature branch2733. Make your changes2744. Add tests if applicable2755. Submit a pull request276277## π Support278279- GitHub Issues: [Report bugs or request features](https://github.com/Regenerating-World/pix-mcp/issues)280- Documentation: Available in this README281282---283284Made with β€οΈ for the Brazilian Pix ecosystem285
Full transparency β inspect the skill content before installing.