Pix MCP Server

Pix MCP Server

Generate static Pix QR codes via natural language through Model Context Protocol.

2
Stars
3
Forks
2
Watchers
1
Issues
Pix MCP Server enables AI agents and tools to generate static Pix QR codes for payments using Model Context Protocol (MCP). It offers a secure, lightweight, and type-safe server that supports both stdio (MCP) and HTTP interfaces, requiring no external API dependencies. The implementation follows BACEN EMV 4.0 standards for Pix payments and is compatible with tools such as Claude Desktop, Cursor, and Windsurf. Configuration is straightforward, making it suitable for quick integration into MCP-supporting environments.

Key Features

Generates static Pix QR codes for any valid Pix key
Works in both stdio (MCP) and HTTP server modes
No external API keys or services required
Full TypeScript implementation with Zod-based runtime validation
Comprehensive error handling and logging
BACEN PIX EMV 4.0 and CRC16-CCITT compliance
Zero dependencies for QR code generation
Ready-to-use with AI agent tools (Claude Desktop, Cursor, Windsurf)
Simple configuration via environment variables
Quick deployment options including Railway integration

Use Cases

Automating Pix payment QR code generation from natural language requests
Integrating Pix QR code creation into AI-powered workflows
Providing secure, programmatic Pix charge creation for merchants or apps
Generating compliant Pix codes for business invoicing systems
Instant QR-based payment solutions for freelancers and SMEs
Embedding QR code creation into chatbots or virtual assistants
Supporting cashier-less checkout in retail or digital commerce
Building custom finance or banking tools around Pix protocol
Offering contextual Pix payment generation in collaborative coding environments
Testing or demonstrating compliance with BACEN Pix standards in sandboxed environments

README

Pix MCP Server v2.1.0

A lightweight Model Context Protocol (MCP) server that enables AI agents (Claude, Cursor, Windsurf) to generate static Pix QR codes via natural-language prompts.

πŸš€ Features

  • πŸ”§ 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 Code generation: Automatic QR code creation for Pix payments
  • πŸ“¦ Zero Dependencies: No external API keys or services required
  • 🌍 Open & Accessible: Works without any registration or credentials
  • βœ… EMV 4.0 Compliant: Follows BACEN PIX standards with proper CRC16-CCITT validation

πŸš€ Quick Start

bash
# Install globally
npm install -g pix-mcp

# Run in MCP mode (for Claude Desktop)
pix-mcp

# Run in HTTP mode (for web services)
MCP_MODE=http pix-mcp

πŸ”§ Usage

MCP Mode (Default)

bash
# Start in MCP mode for Claude Desktop integration
pix-mcp

HTTP Mode

bash
# Start in HTTP mode on port 3000
MCP_MODE=http pix-mcp

Making Requests

HTTP API

bash
curl -X POST http://localhost:3000/tools/call \
  -H "Content-Type: application/json" \
  -d '{
    "name": "generateStaticPix",
    "arguments": {
      "pixKey": "10891990909",
      "amount": 100.50,
      "recipientName": "Franco Camelo Aguzzi",
      "recipientCity": "Florianopolis"
    }
  }'

MCP Tool

typescript
const result = await mcpClient.callTool('generateStaticPix', {
  pixKey: '10891990909',
  amount: 100.5,
  recipientName: 'Franco Camelo Aguzzi',
  recipientCity: 'Florianopolis',
});

πŸš€ Deployment

Railway

Deploy on Railway

⚠️ Important: After deploying to Railway, add these environment variables in the Railway dashboard:

  • MCP_MODE=http
  • NODE_ENV=production (optional)

Manual Deployment

bash
# Clone the repository
git clone https://github.com/Regenerating-World/pix-mcp.git
cd pix-mcp

# Install dependencies
npm install

# Build the project
npm run build

# Start the server in HTTP mode
MCP_MODE=http NODE_ENV=production node dist/index.js

πŸ“ License

MIT

πŸ”§ Configuration

Environment Variables

  • MCP_MODE: Server mode (stdio for MCP, http for HTTP API) - Default: stdio
  • NODE_ENV: Environment (development/production) - Default: development
  • PORT: HTTP port when in HTTP mode - Default: 3000

πŸ€– Usage with AI Tools

Claude Desktop

  1. Install the package globally:
bash
npm install -g pix-mcp
  1. 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):
json
{
  "mcpServers": {
    "pix-mcp": {
      "command": "npx",
      "args": ["pix-mcp"],
      "env": {
        "MCP_MODE": "stdio"
      }
    }
  }
}
  1. Restart Claude Desktop and start using:
Create a Pix charge for R$25.50 to Maria Silva for lunch

Cursor (with MCP support)

Add to your Cursor MCP settings:

json
{
  "mcpServers": {
    "pix-mcp": {
      "command": "pix-mcp"
    }
  }
}

Windsurf (with MCP support)

Configure in Windsurf MCP settings:

json
{
  "pix-mcp": {
    "command": "npx pix-mcp",
    "args": []
  }
}

Any MCP-compatible tool

Your tool should support MCP servers. Configure using:

  • Command: npx pix-mcp or pix-mcp (if installed globally)
  • Protocol: stdio
  • Environment: MCP_MODE=stdio

πŸ”¨ Available Tools

generateStaticPix

Creates a static Pix payment QR code following BACEN EMV 4.0 standards.

Parameters:

  • pixKey (string): Valid Pix key (email, phone, CPF, CNPJ, or random key)
  • amount (number): Payment amount in BRL (0.01 to 999,999.99)
  • recipientName (string): Name of the payment recipient (max 25 chars)
  • recipientCity (string): City of the payment recipient (max 15 chars)

Returns:

  • Payment details (amount, recipient, city)
  • Pix copy-paste code (EMV format)
  • QR code image (base64 data URL)
  • Success status and message

Supported Pix Key Types:

  • πŸ“§ Email: example@email.com
  • πŸ“± Phone: +5511999999999
  • πŸ‘€ CPF: 12345678901 (11 digits)
  • 🏒 CNPJ: 12345678000195 (14 digits)
  • πŸ”‘ Random Key: 123e4567-e89b-12d3-a456-426614174000 (UUID format)

πŸ—οΈ Development

bash
# Development mode with hot reload
npm run dev

# Run tests
npm test

# Build for production
npm run build

# Lint code
npm run lint

# Format code
npm run format

πŸ—ΊοΈ Roadmap

Phase 1: MVP βœ…

  • generateStaticPix tool
  • Static Pix QR code generation
  • QR code generation
  • Claude Desktop compatibility
  • EMV 4.0 compliance
  • CRC16-CCITT validation
  • All Pix key types support
  • Public deployment
  • MCP server configuration files
  • Multi-tool compatibility

Phase 2: MCP Discovery

  • Register with MCP registry
  • Add to community MCP directories
  • Integration examples for more tools

πŸ”’ Security & Validation

  • βœ… EMV 4.0 standard compliance
  • βœ… CRC16-CCITT checksum validation
  • βœ… Input validation with Zod schemas
  • βœ… Pix key format validation
  • βœ… Comprehensive error handling
  • βœ… Type-safe TypeScript implementation

⚠️ Important Notes

  • CPF/CNPJ Keys: Must be valid and registered as Pix keys
  • Test Data: Avoid using fake CPFs like 12345678900 - they will be rejected by banks
  • Static Codes: No expiration, recipient must check payments manually
  • Validation: All codes are EMV-compliant and pass bank validation

πŸ“ License

MIT License - see LICENSE file for details.

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

πŸ“ž Support


Made with ❀️ for the Brazilian Pix ecosystem

Star History

Star History Chart

Repository Owner

Regenerating-World
Regenerating-World

Organization

Repository Details

Language TypeScript
Default Branch main
Size 204 KB
Contributors 2
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

TypeScript
52.74%
JavaScript
44.31%
Dockerfile
2.95%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • QR Code Generation MCP Server

    QR Code Generation MCP Server

    Generate customizable QR codes from text via an MCP-compliant server.

    Provides a server for generating QR codes from text input using the Model Context Protocol (MCP), supporting multiple transport modes such as STDIO, HTTP, and SSE. Allows customization of QR code appearance with options for color, style, and encoding settings. Outputs QR codes as base64 strings for easy integration or direct use in applications. Designed for compatibility with platforms like Claude Desktop and deployments using Docker or direct Python API usage.

    • ⭐ 11
    • MCP
    • 2niuhe/qrcode_mcp
  • piapi-mcp-server

    piapi-mcp-server

    TypeScript-based MCP server for PiAPI media content generation

    piapi-mcp-server is a TypeScript implementation of a Model Context Protocol (MCP) server that connects with PiAPI to enable media generation workflows from MCP-compatible applications. It handles image, video, music, TTS, 3D, and voice generation tasks using a wide range of supported models like Midjourney, Flux, Kling, LumaLabs, Udio, and more. Designed for easy integration with clients such as Claude Desktop, it includes an interactive MCP Inspector for development, testing, and debugging.

    • ⭐ 62
    • MCP
    • apinetwork/piapi-mcp-server
  • MCP XRPL Server

    MCP XRPL Server

    Unified Model Context Protocol server for seamless AI-driven interaction with the XRP Ledger.

    MCP XRPL Server provides a comprehensive Model Context Protocol implementation for the XRP Ledger, enabling AI agents to access blockchain services seamlessly across MainNet, TestNet, and DevNet. It offers an extensive suite of features including account management, token transfers, NFT operations, DIDs, AMM operations, and oracle interactions, all via a standardized MCP interface. The server supports context-driven interactions, making XRPL functionality readily accessible for AI-powered agents.

    • ⭐ 5
    • MCP
    • RomThpt/mcp-xrpl
  • Codex MCP Server

    Codex MCP Server

    An MCP-compatible server delivering enriched blockchain data for AI models.

    Codex MCP Server implements the Model Context Protocol to provide enriched blockchain data from Codex. It is compatible with MCP clients such as Claude Desktop and Claude CLI, allowing seamless integration in AI workflows that require blockchain context. Users can run the server locally or via npx, and configure it for various MCP-compatible tools using their Codex API key.

    • ⭐ 20
    • MCP
    • Codex-Data/codex-mcp
  • Braintree MCP Server

    Braintree MCP Server

    Enables AI assistants to securely access and manage Braintree payment processing via MCP.

    Braintree MCP Server implements the Model Context Protocol (MCP) to provide AI assistants with structured, direct access to PayPal Braintree's payment services. It supports both STDIO and Server-Sent Events (SSE) transports, facilitating integration with AI clients and standalone web-based deployments. The server allows execution of GraphQL queries against Braintree, supports multi-client access, and handles authentication through environment-based configuration. Designed for secure, extensible, and automated payment operations in AI-driven workflows.

    • ⭐ 3
    • MCP
    • QuentinCody/braintree-mcp-server
  • Replicate Flux MCP

    Replicate Flux MCP

    MCP-compatible server for high-quality image and SVG generation via Replicate models.

    Replicate Flux MCP is an advanced Model Context Protocol (MCP) server designed to enable AI assistants to generate high-quality raster images and vector graphics. It leverages Replicate's Flux Schnell model for image synthesis and Recraft V3 SVG model for vector output, supporting seamless integration with AI platforms like Cursor, Claude Desktop, Smithery, and Glama.ai. Users can generate images and SVGs by simply providing natural language prompts, with support for parameter customization, batch processing, and variant creation.

    • ⭐ 66
    • MCP
    • awkoy/replicate-flux-mcp
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results