QR Code Generation MCP Server
A QR code generation MCP server implemented using FastMCP, supporting text-to-QR code conversion with base64 encoding output.
Features
Support for any text to QR code conversion (including Chinese characters)
Customizable colors and styles
Base64 encoding
Support for STDIO, HTTP, and SSE transport modes
Installation
Usage
0. Docker Usage
Build Image
Run Container
Environment Variables
TRANSPORT_MODE
: Transport mode (sse
,http
,stdio
), default:sse
HOST
: Host address to bind, default:0.0.0.0
PORT
: Port to bind, default:8008
Docker Compose
1. MCP Server Mode
Start Server
Configure Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json
:
STDIO Mode (Local Use):
HTTP Mode (Network Deployment):
SSE Mode (Server-Sent Events):
2. Direct Python API Usage
MCP Tools
generate_qr_code
Generate QR code and return base64 encoding.
Parameters:
text
(required): Text content to convertbox_size
(optional): Pixel size of each box, default 10border
(optional): Number of border boxes, default 4fill_color
(optional): Foreground color, default "black"back_color
(optional): Background color, default "white"return_data_url
(optional): Whether to return Data URL format, default false
Testing
License
MIT License
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
mcp tool to generate qrcode
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server that generates customizable QR codes with options for size, colors, error correction, and margin settings.Last updated -16MIT License
- MIT License
- Apache 2.0
- MIT License