QR Code Generation MCP Server
Generate customizable QR codes from text via an MCP-compliant server.
Key Features
Use Cases
README
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
uv sync
# or
pip install qrcode Pillow mcp
Usage
0. Docker Usage
Build Image
docker build -t qrcode-mcp .
Run Container
# Default SSE mode
docker run -p 8008:8008 qrcode-mcp
# HTTP mode
docker run -p 8008:8008 -e TRANSPORT_MODE=http qrcode-mcp
# STDIO mode (for testing)
docker run -e TRANSPORT_MODE=stdio qrcode-mcp
# Custom host and port
docker run -p 9000:9000 -e TRANSPORT_MODE=http -e HOST=0.0.0.0 -e PORT=9000 qrcode-mcp
Environment Variables
TRANSPORT_MODE: Transport mode (sse,http,stdio), default:sseHOST: Host address to bind, default:0.0.0.0PORT: Port to bind, default:8008
Docker Compose
version: '3.8'
services:
qrcode-mcp:
build: .
ports:
- "8008:8008"
environment:
- TRANSPORT_MODE=sse
- HOST=0.0.0.0
- PORT=8008
1. MCP Server Mode
Start Server
# STDIO mode (for Claude Desktop)
python qrcode_mcp_server.py
# HTTP mode
python qrcode_mcp_server.py --http --host 127.0.0.1 --port 8008
# SSE mode (Server-Sent Events) Deprecated
python qrcode_mcp_server.py --sse --host 127.0.0.1 --port 8008
Configure Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
STDIO Mode (Local Use):
{
"mcpServers": {
"qrcode-mcp": {
"command": "python",
"args": ["/ABSOLUTE/PATH/TO/qrcode_mcp/qrcode_mcp_server.py"],
"cwd": "/ABSOLUTE/PATH/TO/qrcode_mcp"
}
}
}
HTTP Mode (Network Deployment):
{
"mcpServers": {
"qrcode-mcp": {
"transport": "http",
"url": "http://127.0.0.1:8008/mcp/"
}
}
}
SSE Mode (Server-Sent Events):
{
"mcpServers": {
"qrcode-mcp": {
"serverUrl": "http://127.0.0.1:8008/sse"
}
}
}
2. Direct Python API Usage
from qrcode_utils import text_to_qr_base64
# Basic usage
base64_result = text_to_qr_base64("Hello, World!")
# Custom styling
base64_result = text_to_qr_base64(
"Custom QR Code",
box_size=15,
fill_color="darkblue",
back_color="lightgray"
)
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
python test_mcp_client.py
License
MIT License
Star History
Repository Owner
User
Repository Details
Programming Languages
Tags
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
Unichat MCP Server
Universal MCP server providing context-aware AI chat and code tools across major model vendors.
Unichat MCP Server enables sending standardized requests to leading AI model vendors, including OpenAI, MistralAI, Anthropic, xAI, Google AI, DeepSeek, Alibaba, and Inception, utilizing the Model Context Protocol. It features unified endpoints for chat interactions and provides specialized tools for code review, documentation generation, code explanation, and programmatic code reworking. The server is designed for seamless integration with platforms like Claude Desktop and installation via Smithery. Vendor API keys are required for secure access to supported providers.
- ⭐ 37
- MCP
- amidabuddha/unichat-mcp-server
Yuque-MCP-Server
Seamless integration of Yuque knowledge base with Model-Context-Protocol for AI model context management.
Yuque-MCP-Server provides an MCP-compatible server for interacting with the Yuque knowledge base platform. It enables AI models to retrieve, manage, and analyze Yuque documents and user information through a standardized Model-Context-Protocol interface. The server supports operations such as document creation, reading, updating, deletion, advanced search, and team statistics retrieval, making it ideal for AI-powered workflows. Inspired by Figma-Context-MCP, it facilitates contextual awareness and dynamic knowledge management for AI applications.
- ⭐ 31
- MCP
- HenryHaoson/Yuque-MCP-Server
PDF Tools MCP
Comprehensive PDF manipulation via MCP protocol.
PDF Tools MCP provides an extensive suite of PDF manipulation operations using the Model Context Protocol framework. It supports both local and remote PDF tasks, such as rendering pages, merging, extracting metadata, retrieving text, and combining documents. The tool registers endpoints through the MCP protocol, enabling seamless server-based PDF processing for various clients. Built with Python, it emphasizes secure handling and compatibility with Claude Desktop via the Smithery ecosystem.
- ⭐ 31
- MCP
- danielkennedy1/pdf-tools-mcp
mcp-server-rabbitmq
RabbitMQ Reference Implementation for the Model Context Protocol (MCP)
Implements a server for the Model Context Protocol (MCP) using RabbitMQ as the messaging backend. Provides a standardized approach for handling model context, enabling scalable and efficient context management for AI applications. The project has been migrated to the official Amazon MQ repository.
- ⭐ 40
- MCP
- kenliao94/mcp-server-rabbitmq
OpenAI MCP Server
Bridge between Claude and OpenAI models using the MCP protocol.
OpenAI MCP Server enables direct querying of OpenAI language models from Claude via the Model Context Protocol (MCP). It provides a configurable Python server that exposes OpenAI APIs as MCP endpoints. The server is designed for seamless integration, requiring simple configuration updates and environment variable setup. Automated testing is supported to verify connectivity and response from the OpenAI API.
- ⭐ 77
- MCP
- pierrebrunelle/mcp-server-openai
piapi-mcp-server
TypeScript-based MCP server for PiAPI media content generation
piapi-mcp-server is a TypeScript implementation of a Model Context Protocol (MCP) server that connects with PiAPI to enable media generation workflows from MCP-compatible applications. It handles image, video, music, TTS, 3D, and voice generation tasks using a wide range of supported models like Midjourney, Flux, Kling, LumaLabs, Udio, and more. Designed for easy integration with clients such as Claude Desktop, it includes an interactive MCP Inspector for development, testing, and debugging.
- ⭐ 62
- MCP
- apinetwork/piapi-mcp-server
Didn't find tool you were looking for?