Gathering detailed insights and metrics for enhanced-mcp-qr-generator
Gathering detailed insights and metrics for enhanced-mcp-qr-generator
Gathering detailed insights and metrics for enhanced-mcp-qr-generator
Gathering detailed insights and metrics for enhanced-mcp-qr-generator
A powerful and flexible MCP (Model Context Protocol) server for generating QR codes from URLs and text.
npm install enhanced-mcp-qr-generator
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (74.93%)
Shell (16.85%)
JavaScript (6.82%)
Dockerfile (1.39%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
32 Commits
1 Branches
Updated on May 31, 2025
Latest Version
3.0.0
Package Id
enhanced-mcp-qr-generator@3.0.0
Unpacked Size
514.80 kB
Size
121.29 kB
File Count
79
NPM Version
11.4.1
Node Version
22.14.0
Published on
May 31, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
A powerful and flexible MCP (Model Context Protocol) server for generating QR codes from URLs and text.
Developed by James Karanja at Zavora AI.
1npm install enhanced-mcp-qr-generator
The Enhanced MCP QR Generator uses a single HTTP server that handles:
/health
for monitoringThe server uses port 9999 by default. You can change this by:
PORT
environment variablePORT
environment variable in docker-compose.ymlExample:
1# Run with a custom port 2PORT=8080 npx enhanced-mcp-qr-generator
Configuration values are determined in the following order (highest priority first):
1# Run directly from command line 2npx enhanced-mcp-qr-generator 3 4# With custom options 5npx enhanced-mcp-qr-generator --error-correction-level=H --format=svg --size=500
The Enhanced MCP QR Generator implements the Model Context Protocol (MCP), allowing it to be used with various AI assistants and tools.
To use with Amazon Q CLI, create an MCP configuration file:
1# Create a configuration directory if it doesn't exist 2mkdir -p ~/.aws/amazonq 3 4# Create the MCP configuration file 5cat > ~/.aws/amazonq/mcp.json << EOF 6{ 7 "mcpServers": { 8 "qr-generator": { 9 "command": "npx", 10 "args": ["-y", "enhanced-mcp-qr-generator"] 11 } 12 } 13} 14EOF 15 16# Start Amazon Q with MCP support enabled 17q chat
You can also place the configuration in your project directory at .amazonq/mcp.json
to share it with your team.
To use with Claude Desktop, create an MCP configuration file:
1{ 2 "mcpServers": { 3 "qr-generator": { 4 "command": "npx", 5 "args": ["-y", "enhanced-mcp-qr-generator"] 6 } 7 } 8}
Add this configuration to your Claude Desktop settings file.
You can then use the QR generator tools in your conversation:
> Can you generate a QR code for my website https://example.com?
You can also run the server using Docker:
1{ 2 "mcpServers": { 3 "qr-generator": { 4 "command": "docker", 5 "args": ["run", "-i", "--rm", "zavorai/enhanced-mcp-qr-generator"] 6 } 7 } 8}
Create a custom configuration to control server behavior:
1import { generateQR, ServerConfig } from 'enhanced-mcp-qr-generator'; 2 3const config: ServerConfig = { 4 defaultErrorCorrectionLevel: 'H', 5 defaultFormat: 'svg', 6 defaultSize: 500, 7 defaultMargin: 2, 8 defaultColor: '#000000', 9 defaultBackgroundColor: '#ffffff', 10 maxQRCodeSize: 2000, 11 maxLogoSize: 2 * 1024 * 1024, // 2MB 12 // ... other options 13}; 14 15// Use the configuration with any operation 16const qrCode = await generateQR('https://example.com', {}, config);
When running as an MCP server, the following command line options are available:
--error-correction-level=<L|M|Q|H> Set error correction level
--format=<png|svg|base64|terminal> Set output format
--size=<pixels> Set QR code size
--margin=<modules> Set margin size
--color=<color> Set QR code color
--background-color=<color> Set background color
Generates a QR code from text or URL.
Returns a QRCodeResult object:
Saves a QR code to a file.
Returns the path to the saved file.
This project implements the Model Context Protocol (MCP) specification, providing a standardized way for AI assistants to generate QR codes. The implementation follows the JSON-RPC 2.0 format required by MCP.
The MCP server provides two tools:
generate_qr: Generates a QR code and returns it in the specified format
save_qr: Generates a QR code and saves it to a file
All requests and responses follow the JSON-RPC 2.0 format:
1// Example request 2{ 3 "jsonrpc": "2.0", 4 "id": 1, 5 "method": "tools/call", 6 "params": { 7 "name": "generate_qr", 8 "arguments": { 9 "text": "https://example.com", 10 "format": "png", 11 "size": 300 12 } 13 } 14} 15 16// Example response 17{ 18 "jsonrpc": "2.0", 19 "id": 1, 20 "result": { 21 "content": [ 22 { 23 "type": "image", 24 "data": "base64-encoded-data", 25 "mimeType": "image/png" 26 } 27 ], 28 "structuredContent": { 29 "format": "png", 30 "size": 300, 31 "content": "https://example.com", 32 "timestamp": "2025-05-30T21:00:00Z" 33 } 34 } 35}
1# Install dependencies 2npm install 3 4# Build the project 5npm run build 6 7# Run tests 8npm test
If you encounter permission issues with node_modules, use one of these solutions:
Run the included script to fix permissions:
1./fix-permissions.sh
This script will:
Use the Docker-based npm script to avoid permission issues:
1# Install dependencies 2./docker-npm.sh install 3 4# Or use npm ci for clean install 5./docker-npm.sh ci
This runs npm commands in a Docker container with your user permissions, preventing any root-owned files.
The project includes both unit tests and integration tests:
1# Run all tests 2npm test 3 4# Run only unit tests 5npm run test:unit 6 7# Run only integration tests 8npm run test:integration 9 10# Run tests with coverage 11npm run test:coverage
MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
No vulnerabilities found.
No security vulnerabilities found.