{"_id":"@bitnovopay/mcp-bitnovo-pay","_rev":"4-96ecf3813f3e18b1031889b9c98bee3f","name":"@bitnovopay/mcp-bitnovo-pay","dist-tags":{"latest":"1.2.1"},"versions":{"1.1.0":{"name":"@bitnovopay/mcp-bitnovo-pay","version":"1.1.0","keywords":["mcp","model-context-protocol","bitnovo","cryptocurrency","payments","ai-agents","bitcoin","ethereum","claude","openai","gemini"],"author":{"name":"Bitnovo"},"license":"MIT","_id":"@bitnovopay/mcp-bitnovo-pay@1.1.0","maintainers":[{"name":"lucianobitnovo","email":"luciano@bitnovo.com"}],"homepage":"https://github.com/bitnovo/mcp-bitnovo-pay#readme","bugs":{"url":"https://github.com/bitnovo/mcp-bitnovo-pay/issues"},"bin":{"mcp-bitnovo-pay":"dist/index.js"},"dist":{"shasum":"8758b00d35df77cabfe440dd576009b466c1d8d4","tarball":"https://registry.npmjs.org/@bitnovopay/mcp-bitnovo-pay/-/mcp-bitnovo-pay-1.1.0.tgz","fileCount":136,"integrity":"sha512-JQc7G8ny5QADr4BIrT+rQDuhewDMUAWLkmxT3VxfN7oRA+VqCTzCyu1FU/kkuC5YV3epSdzHJ9hrjmjIgRuxGQ==","signatures":[{"sig":"MEYCIQCxNjdp72WQAjkcPPpIf7MKVvegmHwdXeaCQ1Z8Hwr9eAIhANTtBGBtDeQhU5oMQmZjMLuxZyjsTvZb8Aa6OVPahubO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":699509},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"5a4d12ed17f3d8b12059a705ad1514f80fc300de","scripts":{"dev":"tsx src/index.ts","lint":"eslint src tests --ext .ts","test":"jest","build":"tsc && npm run copy:assets","clean":"rm -rf dist","start":"node dist/index.js","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"npm run build","lint:fix":"eslint src tests --ext .ts --fix","test:mcp":"tsx test-mcp-client.ts","test:watch":"jest --watch","copy:assets":"mkdir -p dist/assets && cp -r src/assets/* dist/assets/","test:coverage":"jest --coverage","test:mcp:verbose":"LOG_LEVEL=debug tsx test-mcp-client.ts"},"_npmUser":{"name":"lucianobitnovo","email":"luciano@bitnovo.com"},"repository":{"url":"git+https://github.com/bitnovo/mcp-bitnovo-pay.git","type":"git"},"_npmVersion":"10.8.2","description":"MCP server for Bitnovo Pay integration with AI agents","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.22.0","cors":"^2.8.5","axios":"^1.6.0","sharp":"^0.33.0","helmet":"^7.1.0","express":"^4.18.2","winston":"^3.11.0","@ngrok/ngrok":"^1.5.2","@openziti/zrok":"^1.1.5","qrcode-generator":"^2.0.4","@modelcontextprotocol/sdk":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.0.0","jest":"^29.7.0","eslint":"^8.50.0","ts-jest":"^29.1.0","prettier":"^3.0.0","typescript":"^5.2.0","@types/cors":"^2.8.17","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/express":"^4.17.21","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","@typescript-eslint/parser":"^8.45.0","@typescript-eslint/eslint-plugin":"^8.45.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-bitnovo-pay_1.1.0_1759324782314_0.7674142247779556","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@bitnovopay/mcp-bitnovo-pay","version":"1.1.1","keywords":["mcp","model-context-protocol","bitnovo","cryptocurrency","payments","ai-agents","bitcoin","ethereum","claude","openai","gemini"],"author":{"name":"Bitnovo"},"license":"MIT","_id":"@bitnovopay/mcp-bitnovo-pay@1.1.1","maintainers":[{"name":"lucianobitnovo","email":"luciano@bitnovo.com"}],"homepage":"https://github.com/bitnovo/mcp-bitnovo-pay#readme","bugs":{"url":"https://github.com/bitnovo/mcp-bitnovo-pay/issues"},"bin":{"mcp-bitnovo-pay":"dist/index.js"},"dist":{"shasum":"fb4b8a69b422a9f1a18efe96b330de97c651dcf0","tarball":"https://registry.npmjs.org/@bitnovopay/mcp-bitnovo-pay/-/mcp-bitnovo-pay-1.1.1.tgz","fileCount":136,"integrity":"sha512-Vitbzf60eof+m1CapTIlExrbeJCU8riRiHRzFltxDTC+9Nzc5K5W6nvujCjbry2Fez7uHxDojUX3BexTp7T+yw==","signatures":[{"sig":"MEUCIEzVWsGwB5tbyUxA+ZvEEUrkcHhB55HX2Hb6cnqKGuWwAiEA7W6F+m4jrSAbtIR11nXEWhx+XBImQbWqe9oC9Ck5tXc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":700451},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"32eaca33c4e5fac62e820f888a84afa60786cd76","scripts":{"dev":"tsx src/index.ts","lint":"eslint src tests --ext .ts","test":"jest","build":"tsc && npm run copy:assets","clean":"rm -rf dist","start":"node dist/index.js","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"npm run build","lint:fix":"eslint src tests --ext .ts --fix","test:mcp":"tsx test-mcp-client.ts","test:watch":"jest --watch","copy:assets":"mkdir -p dist/assets && cp -r src/assets/* dist/assets/","test:coverage":"jest --coverage","test:mcp:verbose":"LOG_LEVEL=debug tsx test-mcp-client.ts"},"_npmUser":{"name":"lucianobitnovo","email":"luciano@bitnovo.com"},"repository":{"url":"git+https://github.com/bitnovo/mcp-bitnovo-pay.git","type":"git"},"_npmVersion":"10.8.2","description":"MCP server for Bitnovo Pay integration with AI agents","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.22.0","cors":"^2.8.5","axios":"^1.6.0","sharp":"^0.33.0","helmet":"^7.1.0","express":"^4.18.2","winston":"^3.11.0","@ngrok/ngrok":"^1.5.2","@openziti/zrok":"^1.1.5","qrcode-generator":"^2.0.4","@modelcontextprotocol/sdk":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.0.0","jest":"^29.7.0","eslint":"^8.50.0","ts-jest":"^29.1.0","prettier":"^3.0.0","typescript":"^5.2.0","@types/cors":"^2.8.17","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/express":"^4.17.21","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","@typescript-eslint/parser":"^8.45.0","@typescript-eslint/eslint-plugin":"^8.45.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-bitnovo-pay_1.1.1_1759844461458_0.5747643360336028","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@bitnovopay/mcp-bitnovo-pay","version":"1.2.0","keywords":["mcp","model-context-protocol","bitnovo","cryptocurrency","payments","ai-agents","bitcoin","ethereum","claude","openai","gemini"],"author":{"name":"Bitnovo"},"license":"MIT","_id":"@bitnovopay/mcp-bitnovo-pay@1.2.0","maintainers":[{"name":"lucianobitnovo","email":"luciano@bitnovo.com"}],"homepage":"https://github.com/bitnovo/mcp-bitnovo-pay#readme","bugs":{"url":"https://github.com/bitnovo/mcp-bitnovo-pay/issues"},"bin":{"mcp-bitnovo-pay":"dist/index.js"},"dist":{"shasum":"183d6af572d63445df453b0d9abddde898937947","tarball":"https://registry.npmjs.org/@bitnovopay/mcp-bitnovo-pay/-/mcp-bitnovo-pay-1.2.0.tgz","fileCount":136,"integrity":"sha512-mVbWUzGiRhzp42MhoRTCY77VCbzJsv3lXxOA70ULGW6sbzaIMX7N6dUre2ey+XL3aPX46ogV72ZZCz/0h0/v8w==","signatures":[{"sig":"MEUCIQD4ChiGUWh81GB4Hm9qbQoOCrRAVY/f3lUFrWUwItedegIgDU6WcO8Hycv1/ylXIgnPoMUO1z1E72g0F/DpEkIu27g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":711760},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"72d087fb1a82797bf9a093aa1ee8d07d505c1333","scripts":{"dev":"tsx src/index.ts","lint":"eslint src tests --ext .ts","test":"jest","build":"tsc && npm run copy:assets","clean":"rm -rf dist","start":"node dist/index.js","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"npm run build","lint:fix":"eslint src tests --ext .ts --fix","test:mcp":"tsx test-mcp-client.ts","test:watch":"jest --watch","copy:assets":"mkdir -p dist/assets && cp -r src/assets/* dist/assets/","test:coverage":"jest --coverage","test:mcp:verbose":"LOG_LEVEL=debug tsx test-mcp-client.ts"},"_npmUser":{"name":"lucianobitnovo","email":"luciano@bitnovo.com"},"repository":{"url":"git+https://github.com/bitnovo/mcp-bitnovo-pay.git","type":"git"},"_npmVersion":"10.9.4","description":"MCP server for Bitnovo Pay integration with AI agents","directories":{},"_nodeVersion":"22.21.0","dependencies":{"zod":"^3.22.0","cors":"^2.8.5","axios":"^1.6.0","sharp":"^0.33.0","helmet":"^7.1.0","express":"^4.18.2","winston":"^3.11.0","@ngrok/ngrok":"^1.5.2","@openziti/zrok":"^1.1.5","qrcode-generator":"^2.0.4","@modelcontextprotocol/sdk":"^1.20.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.0.0","jest":"^29.7.0","eslint":"^8.50.0","ts-jest":"^29.1.0","prettier":"^3.0.0","typescript":"^5.2.0","@types/cors":"^2.8.17","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/express":"^4.17.21","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","@typescript-eslint/parser":"^8.45.0","@typescript-eslint/eslint-plugin":"^8.45.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-bitnovo-pay_1.2.0_1761127579004_0.34963459034114797","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@bitnovopay/mcp-bitnovo-pay","version":"1.2.1","description":"MCP server for Bitnovo Pay integration with AI agents","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc && npm run copy:assets","copy:assets":"mkdir -p dist/assets && cp -r src/assets/* dist/assets/","dev":"tsx src/index.ts","start":"node dist/index.js","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","test:mcp":"tsx test-mcp-client.ts","test:mcp:verbose":"LOG_LEVEL=debug tsx test-mcp-client.ts","lint":"eslint src tests --ext .ts","lint:fix":"eslint src tests --ext .ts --fix","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","clean":"rm -rf dist","prepare":"npm run build"},"keywords":["mcp","model-context-protocol","bitnovo","cryptocurrency","payments","ai-agents","bitcoin","ethereum","claude","openai","gemini"],"author":{"name":"Bitnovo"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/bitnovo/mcp-bitnovo-pay.git"},"bugs":{"url":"https://github.com/bitnovo/mcp-bitnovo-pay/issues"},"homepage":"https://github.com/bitnovo/mcp-bitnovo-pay#readme","bin":{"mcp-bitnovo-pay":"dist/index.js"},"publishConfig":{"access":"public"},"dependencies":{"@modelcontextprotocol/sdk":"^1.20.0","@ngrok/ngrok":"^1.5.2","@openziti/zrok":"^1.1.5","axios":"^1.6.0","cors":"^2.8.5","express":"^4.18.2","helmet":"^7.1.0","qrcode-generator":"^2.0.4","sharp":"^0.33.0","winston":"^3.11.0","zod":"^3.22.0"},"devDependencies":{"@types/cors":"^2.8.17","@types/express":"^4.17.21","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/eslint-plugin":"^8.45.0","@typescript-eslint/parser":"^8.45.0","eslint":"^8.50.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","jest":"^29.7.0","prettier":"^3.0.0","ts-jest":"^29.1.0","tsx":"^4.0.0","typescript":"^5.2.0"},"engines":{"node":">=18.0.0"},"_id":"@bitnovopay/mcp-bitnovo-pay@1.2.1","gitHead":"d94509c46566a1f220634f2221adb56c52e8e52b","_nodeVersion":"22.21.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-Z9R7BrXoanOc6tC8j3HoScIEeoYiq3bknb4kKd0CO/MlR/pKZOyhdja8XNIolEeUhyyMwXLbsmYfJJ4Hp3Xjog==","shasum":"325f8aaec86f4031913eb91f10f4d796808e7a1d","tarball":"https://registry.npmjs.org/@bitnovopay/mcp-bitnovo-pay/-/mcp-bitnovo-pay-1.2.1.tgz","fileCount":136,"unpackedSize":712809,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCLO233mX/G7F6Y0EZ2EszcUnENoygxMyD9AlOAo70REQIhAOvwdOP/mMq1lLpLQCSsFPgf+ETHSKkrHjlIYuJupTb6"}]},"_npmUser":{"name":"lucianobitnovo","email":"luciano@bitnovo.com"},"directories":{},"maintainers":[{"name":"lucianobitnovo","email":"luciano@bitnovo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-bitnovo-pay_1.2.1_1761215162476_0.8427050149698363"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-01T13:19:42.248Z","modified":"2025-10-23T10:26:02.963Z","1.1.0":"2025-10-01T13:19:42.521Z","1.1.1":"2025-10-07T13:41:01.716Z","1.2.0":"2025-10-22T10:06:19.231Z","1.2.1":"2025-10-23T10:26:02.727Z"},"bugs":{"url":"https://github.com/bitnovo/mcp-bitnovo-pay/issues"},"author":{"name":"Bitnovo"},"license":"MIT","homepage":"https://github.com/bitnovo/mcp-bitnovo-pay#readme","keywords":["mcp","model-context-protocol","bitnovo","cryptocurrency","payments","ai-agents","bitcoin","ethereum","claude","openai","gemini"],"repository":{"type":"git","url":"git+https://github.com/bitnovo/mcp-bitnovo-pay.git"},"description":"MCP server for Bitnovo Pay integration with AI agents","maintainers":[{"name":"lucianobitnovo","email":"luciano@bitnovo.com"}],"readme":"# MCP Bitnovo Pay\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18.0.0-green.svg)](https://nodejs.org/)\n[![MCP](https://img.shields.io/badge/MCP-2025--01--27-blue.svg)](https://modelcontextprotocol.io/)\n\n**MCP server for Bitnovo Pay integration with AI agents**\n\nA Model Context Protocol (MCP) server that provides AI agents with cryptocurrency payment capabilities through Bitnovo Pay API integration. This server enables AI models to create payments, check payment status, manage QR codes, and access cryptocurrency catalogs.\n\n## 🚀 Features\n\n- **8 MCP Tools** for comprehensive payment management:\n  - `create_payment_onchain` - Generate cryptocurrency addresses for direct payments\n  - `create_payment_link` - Create web payment URLs with redirect handling\n  - `get_payment_status` - Query payment status with detailed information\n  - `list_currencies_catalog` - Get supported cryptocurrencies with filtering\n  - `generate_payment_qr` - Generate custom QR codes from existing payments\n  - `get_webhook_events` - Query webhook events received in real-time\n  - `get_webhook_url` - Get public webhook URL with configuration instructions\n  - `get_tunnel_status` - Diagnose tunnel connection status\n\n- **Automatic Webhook System** with 3 tunnel providers:\n  - 🔗 **ngrok**: Free persistent URL (1 static domain per account)\n  - 🌐 **zrok**: 100% free open-source with persistent URLs\n  - 🏢 **manual**: For servers with public IP (N8N, Opal, VPS)\n\n- **Multi-LLM Support** - Compatible with:\n  - 🤖 **OpenAI ChatGPT** (GPT-5, GPT-4o, Responses API, Agents SDK)\n  - 🧠 **Google Gemini** (Gemini 2.5 Flash/Pro Sept 2025, CLI, FastMCP)\n  - 🔮 **Claude** (Claude Desktop, Claude Code)\n\n- **High-Quality QR Codes** (v1.1.0+):\n  - 📱 512px default resolution (up from 300px) for modern displays\n  - 🖨️ Support up to 2000px for professional printing\n  - ✨ Sharp edges with optimized interpolation algorithms\n  - 🎨 Custom Bitnovo Pay branding with smooth logo scaling\n\n- **Privacy by Default** - Sensitive data masked in logs, minimal data exposure\n- **Secure** - HTTPS enforcement, HMAC signature validation, secure secret handling\n- **Reliable** - Built-in retry logic, timeout handling, stateless operation\n\n## 📋 Prerequisites\n\n- **Node.js 18+**\n- **Bitnovo Pay Account** with Device ID and optional Device Secret\n- **Environment Configuration** (see setup guides below)\n\n## ⚡ Quick Start\n\n### 1. Get Your Bitnovo Credentials\n\n1. Sign up at [Bitnovo Pay](https://www.bitnovo.com/pay)\n2. Obtain your **Device ID** from the Bitnovo dashboard\n3. (Optional) Generate a **Device Secret** for webhook signature validation\n\n### 2. Configure Your MCP Client\n\nAdd this configuration to your MCP client config file:\n\n**For Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"bitnovo-pay\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@bitnovopay/mcp-bitnovo-pay\"],\n      \"env\": {\n        \"BITNOVO_DEVICE_ID\": \"your_device_id_here\",\n        \"BITNOVO_BASE_URL\": \"https://pos.bitnovo.com\"\n      }\n    }\n  }\n}\n```\n\n**For OpenAI ChatGPT** (see [OpenAI Setup Guide](docs/setup/openai-setup.md)):\n\n```json\n{\n  \"mcpServers\": {\n    \"bitnovo-pay\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@bitnovopay/mcp-bitnovo-pay\"],\n      \"env\": {\n        \"BITNOVO_DEVICE_ID\": \"your_device_id_here\",\n        \"BITNOVO_BASE_URL\": \"https://pos.bitnovo.com\"\n      }\n    }\n  }\n}\n```\n\n### 3. Restart Your MCP Client\n\nRestart Claude Desktop, ChatGPT, or your MCP client to load the server.\n\n### 4. Test the Integration\n\nAsk your AI assistant: *\"Create a payment for 10 euros\"*\n\n---\n\n## ☁️ Cloud Deployment (NEW in v1.2.0)\n\nMCP Bitnovo Pay now supports remote deployment on cloud platforms with HTTP transport mode. This enables AI platforms like claude.ai to connect to your MCP server remotely.\n\n### Deploy to Railway (Recommended)\n\n[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template)\n\n**Quick Setup:**\n\n1. Click \"Deploy to Railway\" or create a new project\n2. Set environment variables:\n   - `BITNOVO_DEVICE_ID` - Your Bitnovo device ID\n   - `BITNOVO_BASE_URL` - `https://pos.bitnovo.com`\n3. Deploy (Railway auto-detects Dockerfile)\n4. Get your public URL: `https://your-app.up.railway.app`\n\n**Connect to claude.ai:**\n- Add server in Settings → Model Context Protocol\n- Server URL: `https://your-app.up.railway.app/mcp`\n\n📖 **Full Guide**: See [RAILWAY.md](RAILWAY.md) for detailed deployment instructions, troubleshooting, and configuration.\n\n### Deploy to Docker\n\n```bash\n# Build the image\ndocker build -t mcp-bitnovo-pay .\n\n# Run with environment variables\ndocker run -d \\\n  -p 3000:3000 \\\n  -e PORT=3000 \\\n  -e BITNOVO_DEVICE_ID=your_device_id \\\n  -e BITNOVO_BASE_URL=https://pos.bitnovo.com \\\n  mcp-bitnovo-pay\n```\n\n### Deploy to Other Platforms\n\nThe server works on any platform that supports Node.js and Docker:\n- **Heroku**: Push Dockerfile with environment variables\n- **Fly.io**: Deploy with `fly.toml` configuration\n- **Google Cloud Run**: Deploy Docker container\n- **AWS ECS/Fargate**: Deploy with task definition\n\n**Required Environment Variables:**\n- `PORT` - HTTP port (auto-set by most platforms)\n- `BITNOVO_DEVICE_ID` - Your Bitnovo device ID\n- `BITNOVO_BASE_URL` - Bitnovo API URL\n\n**Transport Mode Detection:**\n- If `PORT` env var is set → HTTP mode (remote connections)\n- If no `PORT` → stdio mode (local connections)\n\n---\n\n## 📦 Installation Options\n\n### Option A: Using npx (Recommended)\n\n**No installation required!** The `npx` command automatically downloads and runs the latest version.\n\n```bash\nnpx -y @bitnovopay/mcp-bitnovo-pay\n```\n\n**Advantages**:\n- ✅ Always get the latest version\n- ✅ No manual updates needed\n- ✅ No local installation required\n- ✅ Works immediately\n\n### Option B: Clone Repository (For Development)\n\nFor contributors or advanced users who need to modify the code:\n\n```bash\n# Clone the repository\ngit clone https://github.com/bitnovo/mcp-bitnovo-pay.git\ncd mcp-bitnovo-pay\n\n# Or install from npm\nnpm install -g @bitnovopay/mcp-bitnovo-pay\n\n# Install dependencies\nnpm install\n\n# Build the project\nnpm run build\n\n# Run locally\nnpm start\n```\n\n**Advantages**:\n- ✅ Full control of source code\n- ✅ Ability to modify and test changes\n- ✅ Ideal for contributing to the project\n\n\n## 🔧 Configuration by LLM Platform\n\nChoose your AI platform and follow the specific setup guide:\n\n### Claude Desktop (Anthropic)\n\n**Config File Location**: `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)\n**Guide**: [Claude Setup Guide](docs/setup/claude-setup.md)\n\n**Basic Configuration**:\n```json\n{\n  \"mcpServers\": {\n    \"bitnovo-pay\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@bitnovopay/mcp-bitnovo-pay\"],\n      \"env\": {\n        \"BITNOVO_DEVICE_ID\": \"your_device_id_here\",\n        \"BITNOVO_BASE_URL\": \"https://pos.bitnovo.com\"\n      }\n    }\n  }\n}\n```\n\n**With Webhooks** (for real-time payment notifications):\n```json\n{\n  \"mcpServers\": {\n    \"bitnovo-pay\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@bitnovopay/mcp-bitnovo-pay\"],\n      \"env\": {\n        \"BITNOVO_DEVICE_ID\": \"your_device_id_here\",\n        \"BITNOVO_BASE_URL\": \"https://pos.bitnovo.com\",\n        \"BITNOVO_DEVICE_SECRET\": \"your_device_secret_hex\",\n        \"WEBHOOK_ENABLED\": \"true\",\n        \"TUNNEL_ENABLED\": \"true\",\n        \"TUNNEL_PROVIDER\": \"ngrok\",\n        \"NGROK_AUTHTOKEN\": \"your_ngrok_token\",\n        \"NGROK_DOMAIN\": \"your-domain.ngrok-free.app\"\n      }\n    }\n  }\n}\n```\n\n### OpenAI ChatGPT\n\n**Guide**: [OpenAI Setup Guide](docs/setup/openai-setup.md)\n**Supported**: GPT-5, GPT-4o, Responses API, Agents SDK\n\n**Basic Configuration**:\n```json\n{\n  \"mcpServers\": {\n    \"bitnovo-pay\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@bitnovopay/mcp-bitnovo-pay\"],\n      \"env\": {\n        \"BITNOVO_DEVICE_ID\": \"your_device_id_here\",\n        \"BITNOVO_BASE_URL\": \"https://pos.bitnovo.com\"\n      }\n    }\n  }\n}\n```\n\n### Google Gemini\n\n**Guide**: [Gemini Setup Guide](docs/setup/gemini-setup.md)\n**Supported**: Gemini 2.5 Flash/Pro (Sept 2025), CLI, FastMCP\n\n**Basic Configuration**:\n```json\n{\n  \"mcpServers\": {\n    \"bitnovo-pay\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@bitnovopay/mcp-bitnovo-pay\"],\n      \"env\": {\n        \"BITNOVO_DEVICE_ID\": \"your_device_id_here\",\n        \"BITNOVO_BASE_URL\": \"https://pos.bitnovo.com\"\n      }\n    }\n  }\n}\n```\n\n### Environment Variables\n\n| Variable | Required | Description | Example |\n|----------|----------|-------------|---------|\n| `BITNOVO_DEVICE_ID` | ✅ Yes | Your Bitnovo Pay device identifier | `12345678-abcd-1234-abcd-1234567890ab` |\n| `BITNOVO_BASE_URL` | ✅ Yes | Bitnovo API endpoint | `https://pos.bitnovo.com` (production)<br>`https://payments.pre-bnvo.com` (development) |\n| `BITNOVO_DEVICE_SECRET` | ⚠️ Optional | HMAC secret for webhook validation | `your_hex_secret` |\n| `WEBHOOK_ENABLED` | ⚠️ Optional | Enable webhook server | `true` or `false` |\n| `TUNNEL_ENABLED` | ⚠️ Optional | Auto-start tunnel for webhooks | `true` or `false` |\n| `TUNNEL_PROVIDER` | ⚠️ Optional | Tunnel provider | `ngrok`, `zrok`, or `manual` |\n\n> **Security Note**: Never commit credentials to version control. Use environment variables or secure secret management.\n\n## 🛠️ MCP Tools Reference\n\n### Payment Creation\n\n#### `create_payment_onchain`\nCreates a cryptocurrency payment with a specific address for direct transactions.\n\n**Use when**: User specifies a cryptocurrency (Bitcoin, ETH, USDC, etc.)\n\n```json\n{\n  \"amount_eur\": 50.0,\n  \"input_currency\": \"BTC\",\n  \"notes\": \"Coffee payment\"\n}\n```\n\n#### `create_payment_link`\nCreates a web-based payment URL where customers can choose their cryptocurrency.\n\n**Use when**: Generic payment request without specific crypto mentioned (DEFAULT OPTION)\n\n```json\n{\n  \"amount_eur\": 50.0,\n  \"url_ok\": \"https://mystore.com/success\",\n  \"url_ko\": \"https://mystore.com/cancel\",\n  \"notes\": \"Order #1234\"\n}\n```\n\n### Payment Management\n\n#### `get_payment_status`\nRetrieves current payment status with detailed information.\n\n```json\n{\n  \"identifier\": \"payment_id_here\"\n}\n```\n\n**Status Codes**:\n- `NR` (Not Ready): Pre-payment created, no crypto assigned\n- `PE` (Pending): Waiting for customer payment\n- `AC` (Awaiting Completion): Crypto detected in mempool\n- `CO` (Completed): Payment confirmed on blockchain\n- `EX` (Expired): Payment time limit exceeded\n- `CA` (Cancelled): Payment cancelled\n- `FA` (Failed): Transaction failed to confirm\n\n#### `list_currencies_catalog`\nGets available cryptocurrencies with optional amount-based filtering.\n\n```json\n{\n  \"filter_by_amount\": 25.0\n}\n```\n\n#### `generate_payment_qr`\nCreates custom QR codes for existing payments with high-quality output.\n\n```json\n{\n  \"identifier\": \"payment_id_here\",\n  \"qr_type\": \"both\",\n  \"size\": 512,\n  \"style\": \"branded\"\n}\n```\n\n**QR Types**:\n- `address`: Crypto address only (customer enters amount manually)\n- `payment_uri`: Address + amount included (recommended)\n- `both`: Generate both types (recommended)\n- `gateway_url`: QR of payment gateway URL\n\n**QR Size Options** (v1.1.0+):\n- **Default**: 512px (optimized for modern displays)\n- **Range**: 100px - 2000px\n- **Recommended sizes**:\n  - `512px`: Mobile and web displays\n  - `800-1200px`: Standard printing\n  - `1600-2000px`: High-quality printing (posters, stands)\n\n**Quality Improvements** (v1.1.0):\n- ✨ Sharp edges with `nearest` kernel interpolation for QR patterns\n- 🎯 High-quality logo scaling with `lanczos3` kernel\n- 📦 PNG compression level 6 with adaptive filtering\n- 🖼️ Default size increased from 300px to 512px for better clarity\n\n### Webhook Tools\n\n#### `get_webhook_events`\nQuery webhook events received in real-time from Bitnovo Pay API.\n\n**Available when**: `WEBHOOK_ENABLED=true`\n\n```json\n{\n  \"identifier\": \"payment_id_here\",\n  \"limit\": 50,\n  \"validated_only\": true\n}\n```\n\n#### `get_webhook_url`\nGet public webhook URL with configuration instructions for Bitnovo panel.\n\n**Available when**: `WEBHOOK_ENABLED=true`\n\n```json\n{\n  \"validate\": true\n}\n```\n\n#### `get_tunnel_status`\nDiagnose tunnel connection status (ngrok, zrok, or manual).\n\n**Available when**: `WEBHOOK_ENABLED=true`\n\n```json\n{}\n```\n\n## 📚 Documentation\n\n- **[API Tools Reference](docs/api/tools-reference.md)** - Detailed documentation for all MCP tools\n- **[Usage Examples](docs/api/examples.md)** - Real-world usage examples\n- **[Error Handling](docs/api/error-handling.md)** - Error codes and troubleshooting\n- **[Webhook System](WEBHOOKS.md)** - Webhook configuration and tunnel management\n\n## 🏗️ Development\n\n### Available Scripts\n\n```bash\nnpm run build        # Compile TypeScript to JavaScript\nnpm run dev          # Run development server with hot reload\nnpm start            # Start production server\nnpm test             # Run test suite\nnpm run test:watch   # Run tests in watch mode\nnpm run lint         # Run ESLint\nnpm run format       # Format code with Prettier\n```\n\n### Architecture\n\n```\n┌─────────────────┐\n│   MCP Tools     │ ← 8 tools: 5 payment + 3 webhook\n│ (src/tools/)    │\n├─────────────────┤\n│   Services      │ ← Business logic: PaymentService, CurrencyService\n│ (src/services/) │\n├─────────────────┤\n│   API Client    │ ← Bitnovo API integration with retry logic\n│ (src/api/)      │\n├─────────────────┤\n│ Webhook Server  │ ← HTTP Express + Event Store + Tunnel Manager\n│ (src/webhook-*) │\n├─────────────────┤\n│   Utilities     │ ← Logging, validation, error handling, crypto\n│ (src/utils/)    │\n└─────────────────┘\n```\n\n### Dual-Server Architecture\n\nThe MCP server can run two servers simultaneously:\n\n```\n┌─────────────────────────────────────────────────────────┐\n│             MCP Bitnovo Pay Server                      │\n│                                                         │\n│  ┌──────────────┐  ┌──────────────────┐ ┌────────────┐│\n│  │ MCP Server   │  │ Webhook Server   │ │  Tunnel    ││\n│  │ (stdio)      │  │ (HTTP :3000)     │ │  Manager   ││\n│  └──────┬───────┘  └────────┬─────────┘ └──────┬─────┘│\n│         │                   │                   │      │\n│         │    Event Store    │     Public URL    │      │\n│         │   (in-memory)     │   (ngrok/zrok)    │      │\n│         └──────────┬────────┴──────────┬────────┘      │\n└────────────────────┼───────────────────┼───────────────┘\n                     │                   │\n            ┌────────┴────────┐  ┌───────┴────────┐\n            │                 │  │                │\n       Claude Desktop   Bitnovo API    Tunnel Provider\n       (MCP Tools)      (Webhooks)    (ngrok/zrok/manual)\n```\n\n## 🔒 Security\n\n- **HTTPS Only** - All API calls use HTTPS\n- **HMAC Validation** - Webhook signature verification with SHA-256\n- **Replay Attack Prevention** - Nonce caching with 5-minute TTL\n- **Data Privacy** - Sensitive information is masked in logs\n- **No Rate Data** - Exchange rates not exposed to prevent inaccuracies\n- **Stateless Design** - No local persistence, real-time API queries\n- **Auto-reconnection** - Exponential backoff up to 10 retries for tunnels\n- **Health Monitoring** - Connection verification every 60 seconds\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📞 Support\n\n- **Issues**: [GitHub Issues](https://github.com/bitnovo/mcp-bitnovo-pay/issues)\n- **Bitnovo Support**: [https://www.bitnovo.com/](https://www.bitnovo.com/)\n- **MCP Protocol**: [https://modelcontextprotocol.io/](https://modelcontextprotocol.io/)\n\n## 🌟 Related\n\n- **[Model Context Protocol](https://modelcontextprotocol.io/)** - Official MCP specification\n- **[Bitnovo Pay](https://www.bitnovo.com/pay)** - Cryptocurrency payment platform\n- **[Bitnovo Pay - Documentation](https://bitnovo.gitbook.io/pay)** - Bitnovo Pay Official Documentation\n- **[Bitnovo Pay - Documención en Español](https://bitnovo.gitbook.io/pay-es)** - Bitnovo Pay Documentación Oficial\n- **[MCP SDK](https://github.com/modelcontextprotocol/sdk)** - Official MCP SDK for TypeScript\n","readmeFilename":"README.md"}