Developer beta
QR code MCP and REST API
Generate a static SVG QR code from an AI assistant or a script. This beta is free, rate-limited, and has no availability guarantee. No PrivQR account or API key is required.
Try the live API
Generate an SVG for https://example.com with the same service used by the REST API.
Connect an MCP client
Use the Streamable HTTP endpoint https://api.privqr.com/mcp. After connecting, look for generate_qr.
Claude
In Claude, open Customize → Connectors, add a custom connector with the endpoint above, and select No sign in.
In Claude Code, run the following command.
claude mcp add --transport http privqr https://api.privqr.com/mcpCursor
Add PrivQR to your project’s .cursor/mcp.json, then enable it in Cursor’s MCP settings.
{
"mcpServers": {
"privqr": {
"url": "https://api.privqr.com/mcp"
}
}
}The tool returns the SVG as text. Save that text as a .svg file to open or scan it.
Call the REST API
Send JSON with POST. A successful response contains an image/svg+xml body.
curl --fail-with-body 'https://api.privqr.com/api/v1/qr' \
-H 'Content-Type: application/json' \
--data '{"url":"https://example.com","size":512,"margin":4}' \
--output qr.svgtextorurlis required. Send one field, up to 2,000 characters. Use an absolute HTTP(S) address forurl.sizesets the width and height in pixels (128–1024, default 512).marginsets the quiet zone in modules (0–16, default 4).errorCorrectionLevelacceptsL,M,Q, orH(defaultM). Higher levels leave less room for content.foregroundandbackgroundaccept six-digit hex colors. The defaults are#000000and#ffffff.
The API and live example share a default limit of 30 requests per minute and 1,000 per UTC day per IP, including MCP setup requests. After a 429, wait for the number of seconds in Retry-After.
What is sent to the server
MCP and REST send the value you provide to PrivQR for encoding. PrivQR does not open submitted URLs or retain your QR content. Usage logs contain a timestamp, tool or endpoint, client family, approximate country, and outcome. If you want to keep the value on your device, use the browser QR generator.