Skip to content

Commit 0186f1e

Browse files
committed
docs: 📝 Update README.md for v2.1.0 with latest changes
- Update version to v2.1.0 in title - Fix CLI commands (remove non-existent --http flags) - Add MCP_MODE environment variable documentation - Update HTTP API endpoint and request format - Add Railway deployment environment variables instructions - Update tool name from createPixCharge to generateStaticPix - Add supported Pix key types with examples - Update MCP configuration to use npx command - Add EMV 4.0 compliance and validation features - Add important notes about CPF validation and test data - Fix repository URLs and remove non-existent links - Update roadmap with completed v2.1.0 features
1 parent 276984a commit 0186f1e

File tree

1 file changed

+85
-56
lines changed

1 file changed

+85
-56
lines changed

README.md

Lines changed: 85 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Pix MCP Server
1+
# Pix MCP Server v2.1.0
22

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

@@ -11,57 +11,64 @@ A lightweight Model Context Protocol (MCP) server that enables AI agents (Claude
1111
- **📱 QR Code generation**: Automatic QR code creation for Pix payments
1212
- **📦 Zero Dependencies**: No external API keys or services required
1313
- **🌍 Open & Accessible**: Works without any registration or credentials
14+
- **✅ EMV 4.0 Compliant**: Follows BACEN PIX standards with proper CRC16-CCITT validation
1415

1516
## 🚀 Quick Start
1617

1718
```bash
1819
# Install globally
19-
npm install -g pix-mcp-server
20+
npm install -g pix-mcp
2021

21-
# Run the server
22-
pix-mcp-server --http --http-port 3000
22+
# Run in MCP mode (for Claude Desktop)
23+
pix-mcp
24+
25+
# Run in HTTP mode (for web services)
26+
MCP_MODE=http pix-mcp
2327
```
2428

2529
## 🔧 Usage
2630

27-
### MCP Mode
31+
### MCP Mode (Default)
2832

2933
```bash
30-
# Start in MCP mode (default)
31-
pix-mcp-server
34+
# Start in MCP mode for Claude Desktop integration
35+
pix-mcp
3236
```
3337

3438
### HTTP Mode
3539

3640
```bash
37-
# Start in HTTP mode
38-
pix-mcp-server --http --http-port 3000
41+
# Start in HTTP mode on port 3000
42+
MCP_MODE=http pix-mcp
3943
```
4044

4145
### Making Requests
4246

4347
#### HTTP API
4448

4549
```bash
46-
curl -X POST http://localhost:3000/generate-static-pix \
50+
curl -X POST http://localhost:3000/tools/call \
4751
-H "Content-Type: application/json" \
4852
-d '{
49-
"pixKey": "10891990909",
50-
"amount": 100.50,
51-
"recipientName": "Franco Camelo Aguzzi",
52-
"recipientCity": "Florianopolis",
53-
"description": "Payment for services"
53+
"name": "generateStaticPix",
54+
"arguments": {
55+
"pixKey": "10891990909",
56+
"amount": 100.50,
57+
"recipientName": "Franco Camelo Aguzzi",
58+
"recipientCity": "Florianopolis",
59+
"description": "Payment for services"
60+
}
5461
}'
5562
```
5663

5764
#### MCP Tool
5865

5966
```typescript
6067
const result = await mcpClient.callTool('generateStaticPix', {
61-
pixKey: "10891990909",
62-
amount: 100.50,
63-
recipientName: "Franco Camelo Aguzzi",
64-
recipientCity": "Florianopolis",
68+
pixKey: '10891990909',
69+
amount: 100.5,
70+
recipientName: 'Franco Camelo Aguzzi',
71+
recipientCity: 'Florianopolis',
6572
description: 'Payment for services',
6673
});
6774
```
@@ -72,6 +79,11 @@ const result = await mcpClient.callTool('generateStaticPix', {
7279

7380
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FRegenerating-World%2Fpix-mcp)
7481

82+
**⚠️ Important:** After deploying to Railway, add these environment variables in the Railway dashboard:
83+
84+
- `MCP_MODE=http`
85+
- `NODE_ENV=production` (optional)
86+
7587
### Manual Deployment
7688

7789
```bash
@@ -85,8 +97,8 @@ npm install
8597
# Build the project
8698
npm run build
8799

88-
# Start the server
89-
NODE_ENV=production node dist/index.js --http --http-port 3000
100+
# Start the server in HTTP mode
101+
MCP_MODE=http NODE_ENV=production node dist/index.js
90102
```
91103

92104
## 📝 License
@@ -97,21 +109,23 @@ MIT
97109

98110
### Environment Variables
99111

100-
- `NODE_ENV`: (Optional) Environment (development/production)
112+
- `MCP_MODE`: Server mode (`stdio` for MCP, `http` for HTTP API) - Default: `stdio`
113+
- `NODE_ENV`: Environment (`development`/`production`) - Default: `development`
114+
- `PORT`: HTTP port when in HTTP mode - Default: `3000`
101115

102116
## 🤖 Usage with Claude Desktop
103117

104-
### Method 1: Direct Tool Usage (Phase 1)
118+
### MCP Configuration
105119

106120
```json
107121
// Add to your Claude Desktop MCP configuration
108122
{
109123
"mcpServers": {
110124
"pix-mcp": {
111-
"command": "node",
112-
"args": ["/path/to/pix-mcp-server/dist/index.js"],
125+
"command": "npx",
126+
"args": ["pix-mcp"],
113127
"env": {
114-
# No external API keys needed for static Pix generation
128+
"MCP_MODE": "stdio"
115129
}
116130
}
117131
}
@@ -124,32 +138,34 @@ Then in Claude:
124138
Create a Pix charge for R$25.50 to Maria Silva for lunch
125139
```
126140

127-
### Method 2: Remote Tool Usage (Future)
128-
129-
```
130-
Use tools from https://pixmcp.com/
131-
Create a Pix charge for R$15 to João for coffee
132-
```
133-
134141
## 🔨 Available Tools
135142

136-
### `createPixCharge`
143+
### `generateStaticPix`
137144

138-
Creates a new Pix payment charge with QR code.
145+
Creates a static Pix payment QR code following BACEN EMV 4.0 standards.
139146

140147
**Parameters:**
141148

149+
- `pixKey` (string): Valid Pix key (email, phone, CPF, CNPJ, or random key)
142150
- `amount` (number): Payment amount in BRL (0.01 to 999,999.99)
143-
- `recipientName` (string): Name of the payment recipient (1-100 chars)
144-
- `description` (string, optional): Payment description (max 200 chars)
151+
- `recipientName` (string): Name of the payment recipient (max 25 chars)
152+
- `recipientCity` (string): City of the payment recipient (max 15 chars)
153+
- `description` (string, optional): Payment description (max 25 chars)
145154

146155
**Returns:**
147156

148-
- Transaction ID (txid)
149-
- Pix copy-paste code
157+
- Payment details (amount, recipient, city, description)
158+
- Pix copy-paste code (EMV format)
150159
- QR code image (base64 data URL)
151-
- Expiration timestamp
152-
- Payment details
160+
- Success status and message
161+
162+
**Supported Pix Key Types:**
163+
164+
- 📧 Email: `[email protected]`
165+
- 📱 Phone: `+5511999999999`
166+
- 👤 CPF: `12345678901` (11 digits)
167+
- 🏢 CNPJ: `12345678000195` (14 digits)
168+
- 🔑 Random Key: `123e4567-e89b-12d3-a456-426614174000` (UUID format)
153169

154170
## 🏗️ Development
155171

@@ -160,6 +176,9 @@ npm run dev
160176
# Run tests
161177
npm test
162178

179+
# Build for production
180+
npm run build
181+
163182
# Lint code
164183
npm run lint
165184

@@ -171,29 +190,40 @@ npm run format
171190

172191
### Phase 1: MVP ✅
173192

174-
- [x] `createPixCharge` tool
193+
- [x] `generateStaticPix` tool
175194
- [x] Static Pix QR code generation
176195
- [x] QR code generation
177196
- [x] Claude Desktop compatibility
197+
- [x] EMV 4.0 compliance
198+
- [x] CRC16-CCITT validation
199+
- [x] All Pix key types support
178200

179201
### Phase 2: MCP Discovery
180202

181203
- [ ] Register with MCP registry
182-
- [ ] Public deployment at pixmcp.com
204+
- [ ] Public deployment
205+
206+
### Phase 3: Tool Expansion
207+
208+
- [ ] Dynamic Pix codes (with expiration)
209+
- [ ] Payment status checking
210+
- [ ] Webhook support for payment notifications
183211

184-
### Phase 4: Tool Expansion
212+
## 🔒 Security & Validation
185213

186-
- [ ] `getPixStatus` tool
187-
- [ ] `cancelPixCharge` tool
188-
- [ ] Webhook listener for payment confirmation
214+
- ✅ EMV 4.0 standard compliance
215+
- ✅ CRC16-CCITT checksum validation
216+
- ✅ Input validation with Zod schemas
217+
- ✅ Pix key format validation
218+
- ✅ Comprehensive error handling
219+
- ✅ Type-safe TypeScript implementation
189220

190-
## 🔒 Security
221+
## ⚠️ Important Notes
191222

192-
- Environment variables for sensitive credentials
193-
- Token caching with automatic refresh
194-
- Input validation with Zod schemas
195-
- Comprehensive error handling
196-
- Sandbox mode for testing
223+
- **CPF/CNPJ Keys**: Must be valid and registered as Pix keys
224+
- **Test Data**: Avoid using fake CPFs like `12345678900` - they will be rejected by banks
225+
- **Static Codes**: No expiration, recipient must check payments manually
226+
- **Validation**: All codes are EMV-compliant and pass bank validation
197227

198228
## 📝 License
199229

@@ -209,9 +239,8 @@ MIT License - see [LICENSE](LICENSE) file for details.
209239

210240
## 📞 Support
211241

212-
- GitHub Issues: [Report bugs or request features](https://github.com/your-org/pix-mcp-server/issues)
213-
- Documentation: [Full API documentation](https://pixmcp.com/docs)
214-
242+
- GitHub Issues: [Report bugs or request features](https://github.com/Regenerating-World/pix-mcp/issues)
243+
- Documentation: Available in this README
215244

216245
---
217246

0 commit comments

Comments
 (0)