npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

pix-mcp

v2.1.1

Published

Standalone MCP server for generating static Pix QR codes without external dependencies

Downloads

46

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

# 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)

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

HTTP Mode

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

Making Requests

HTTP API

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

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

# 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 Claude Desktop

MCP Configuration

// Add to your Claude Desktop MCP configuration
{
  "mcpServers": {
    "pix-mcp": {
      "command": "npx",
      "args": ["pix-mcp"],
      "env": {
        "MCP_MODE": "stdio"
      }
    }
  }
}

Then in Claude:

Create a Pix charge for R$25.50 to Maria Silva for lunch

🔨 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: [email protected]
  • 📱 Phone: +5511999999999
  • 👤 CPF: 12345678901 (11 digits)
  • 🏢 CNPJ: 12345678000195 (14 digits)
  • 🔑 Random Key: 123e4567-e89b-12d3-a456-426614174000 (UUID format)

🏗️ Development

# 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 ✅

  • [x] generateStaticPix tool
  • [x] Static Pix QR code generation
  • [x] QR code generation
  • [x] Claude Desktop compatibility
  • [x] EMV 4.0 compliance
  • [x] CRC16-CCITT validation
  • [x] All Pix key types support
  • [x] Public deployment

Phase 2: MCP Discovery

  • [ ] Register with MCP registry

🔒 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