What Is the QRGen MCP Server?
The official QRGen MCP server gives AI agents a dedicated QR code tool through the open Model Context Protocol. Instead of teaching an agent how to construct API calls, connect it once and ask for a QR code in normal language.
The server runs on the same Cloudflare Worker as the QRGen API using stateless Streamable HTTP. It exposes only generate_qr, uses the public API's no-key access model, and applies the same rate limiting.
Setup
The remote MCP endpoint is:
https://qrgenapp.com/mcpA normal browser or crawler can open the machine-readable MCP discovery document to verify the server version, Streamable HTTP transport, supported QR types, and the single generate_qr tool. MCP clients send protocol requests to the same URL with POST.
Claude Code
claude mcp add --transport http qrgen https://qrgenapp.com/mcpRun claude mcp list to verify the connection, then open /mcp inside Claude Code to see the generate_qr tool.
Claude Desktop / JSON MCP Clients
{
"mcpServers": {
"qrgen": {
"type": "http",
"url": "https://qrgenapp.com/mcp"
}
}
}If an older desktop client does not support remote Streamable HTTP directly, configure mcp-remote as a local proxy:
{
"mcpServers": {
"qrgen": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://qrgenapp.com/mcp"]
}
}
}OpenAI Codex
Add the server to ~/.codex/config.toml or a trusted project's .codex/config.toml:
[mcp_servers.qrgen]
url = "https://qrgenapp.com/mcp"You can also run codex mcp add qrgen --url https://qrgenapp.com/mcp, then use codex mcp list to verify it.
The generate_qr Tool
The intentionally small tool surface keeps agent context and tool selection simple. The tool accepts:
type—url,text,wifi,vcard, orupicontent— a string or structured fields for WiFi, vCard, and UPI payloadsformat—pngorsvgsize— 32 to 2048 pixelserrorCorrection—L,M,Q, orH
The result includes the standards-compatible encoded data and a public QR image URL from /api/qr. No API key or signup is required.
Example Prompts
WiFi QR for café guests
Make a WiFi QR for my café guests. The network is CafeGuest, the password is freshcoffee24, and security is WPA. Use a 768px PNG with high error correction.vCard QR for a contact
Generate a vCard QR for Priya Shah, owner of North Star Studio, phone +91 98765 43210 and email priya@example.com. Return an SVG.UPI QR for a shop
Create a UPI QR for my shop. UPI ID is myshop@upi, payee name is My Shop, and leave the amount open for the customer.Run the Server Locally
The server source is part of the QRGen Worker. From the repository root:
npm install
npm run devConnect an MCP client to http://localhost:8787/mcp, adjusting the port if Wrangler prints a different one. The production discovery document remains available at https://qrgenapp.com/mcp.
Frequently Asked Questions
What is MCP for QR codes?
The Model Context Protocol lets AI agents use tools through a standard interface. The QRGen MCP server exposes a generate_qr tool so connected agents can create QR codes from natural-language requests.
How do I set up the MCP server?
Connect your MCP client to https://qrgenapp.com/mcp using Streamable HTTP. For Claude Code, run claude mcp add --transport http qrgen https://qrgenapp.com/mcp, then run claude mcp list to verify the connection.
What QR code types does the MCP server support?
The generate_qr tool supports URL, text, WiFi, vCard, and UPI QR codes with PNG or SVG output. No API key or signup is required; public API rate limits apply.
Build directly with the API
Need batch generation, validation, styling, or raw module data? Use the complete public API or install the official typed JavaScript SDK.
Official SDK