
A lightweight Model Context Protocol (MCP) server that enables AI agents (Claude, Cursor, Windsurf) to generate static Pix QR codes via natural-language prompts.
概览
A lightweight Model Context Protocol (MCP) server that enables AI agents (Claude, Cursor, Windsurf) to generate static Pix QR codes via natural-language prompts. - : - generateStaticPix - Generate static Pix QR codes for any Pix key (no API required) - : Comprehensive error handling and logging - : Full TypeScript implementation with Zod validation - : Automatic QR code creation for Pix payments - : No external API keys or services required - : Works without any registration or credentials - : Follows BACEN PIX standards with proper CRC16-CCITT validation After deploying to Railway, add these environment variables in the Railway dashboard: - MCP_MODE=http - NODE_ENV=production (optional) - 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 2.
README
以下为原文 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
⚠️ Important: After deploying to Railway, add these environment variables in the Railway dashboard:
MCP_MODE=httpNODE_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 (stdiofor MCP,httpfor HTTP API) - Default:stdioNODE_ENV: Environment (development/production) - Default:developmentPORT: HTTP port when in HTTP mode - Default:3000
🤖 Usage with AI Tools
Claude Desktop
- Install the package globally:
npm install -g pix-mcp
- Add to your Claude Desktop MCP configuration (
~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS or%APPDATA%/Claude/claude_desktop_config.jsonon Windows):
{
"mcpServers": {
"pix-mcp": {
"command": "npx",
安装
npx pix-mcp配置
{
"mcpServers": {
"pix-mcp": {
"command": "npx",
"args": ["pix-mcp"],
"env": {
"MCP_MODE": "stdio"
}
}
}
}