QRnegie

Scotty, beam me there

QRnegie Reference

Make QR codes with an image URL or an MCP tool call. Both use the same renderer and take the same content and design choices.

Image URLs

RequestResponse
GET /qr.svgSVG image (image/svg+xml)
GET /qr.pngPNG image (image/png)

Add query parameters to either address. This example encodes www.cmu.edu in Mosaic Scotty at 1024 pixels:

https://qrnegie.andrew.cmu.edu/qr.svg?text=https%3A%2F%2Fwww.cmu.edu%2F&style=mosaic&width=1024

Parameters

ParameterAccepted ValueDefault
textText or a link, up to 1024 UTF-8 bytes. URL-encode the complete value.Required
styleA value from the style table.scotty
widthThe width of the whole image in pixels, including the QR code's margin and design: a whole number up to 2048. The minimum depends on the style and content.512
above, belowOne line above or below the code, up to 40 characters each. Letters, numbers, spaces and common punctuation; other characters return an error. Leave it blank for no line.None
iconA Bootstrap Icons name, like wifi or calendar-event. Used only with style=icon. /icons.json lists the available names. The Builder picks an icon for the content type unless you choose one.link-45deg

Supply each parameter once. Unknown parameter names are rejected.

Style Values

StyleValueError CorrectionMinimum Pixels per Module
Basic ScottyscottyHigh3
Mosaic ScottymosaicHigh6
Kraus Campokraus-campoHigh6
Wean HallweanHigh5
Binary Heartbinary-heartHigh6
Block Monogramblock-monogramMedium3
Tilted Squaretilted-squareMedium3
Basic BlackplainMedium3
Center IconiconHigh3

The module limit is the minimum number of pixels for one cell in the QR code's grid. It's a rendering limit, not a recommended print size. The required image width also depends on the content, border and artwork; a width error reports the minimum for that request. Each style sets its own error correction.

Content Payloads

An image URL encodes the text value as supplied. A contact card, event or network is a formatted text payload, not a separate image parameter. The Builder's content fields assemble those payloads for you.

Content TypePayload Form
Link or TextA complete destination URL or the text to display
Contact CardA vCard, beginning with BEGIN:VCARD
EventAn event, beginning with BEGIN:VEVENT
EmailA mailto: address, optionally with a subject and message
Phone CallA tel: address
Map LocationA map link for the chosen map app (Google Maps, Apple Maps or OpenStreetMap)
Wi-Fi NetworkA WIFI: payload or a connection-instructions URL, depending on the network

URL-encode the whole payload, including its own ampersands, question marks and line breaks. The 1024-byte limit applies to the decoded UTF-8 payload, not the longer percent-encoded query string. An image URL contains that payload, just as the QR code does.

In JavaScript, use URLSearchParams to encode the values:

const query = new URLSearchParams({
  text: "https://www.cmu.edu/",
  style: "icon",
  icon: "calendar-event",
  width: "1024",
  above: "Visit CMU",
});
const imageUrl = `https://qrnegie.andrew.cmu.edu/qr.svg?${query}`;

Embedding and Downloads

Use an image URL directly in HTML. Escape its query separators as &:

<img src="https://qrnegie.andrew.cmu.edu/qr.svg?text=https%3A%2F%2Fwww.cmu.edu%2F&amp;style=plain&amp;width=512"
  alt="QR code for the Carnegie Mellon website" width="512">

The example leaves the height unset so the image keeps its natural proportions. If your layout requires both dimensions, use the exported image's actual width and height. Include a normal link beside a QR code on a web page so someone can open the destination without scanning.

To keep a file with your project, download the response. This command URL-encodes the text values and stops on an HTTP error:

curl --fail --show-error --get 'https://qrnegie.andrew.cmu.edu/qr.png' \
  --data-urlencode 'text=https://www.cmu.edu/' \
  --data 'style=icon' \
  --data 'icon=calendar-event' \
  --data 'width=1024' \
  --data-urlencode 'above=Visit CMU' \
  --output qrnegie.png

A downloaded file stays exactly as it was. An image URL always uses QRnegie's current designs, so its look can change when a design does, though never what it encodes. Browsers and other caches can keep a copy for up to a day.

MCP Server

Connect an AI agent to QRnegie's MCP server with these settings:

ConnectionValue
Server Nameqrnegie
Endpointhttps://qrnegie.andrew.cmu.edu/mcp
TransportStreamable HTTP, without sign-in

It offers these tools:

ToolInputResult
get_guideNo argumentsImage parameters and integration guidance
generate_qrtext; optional style, width, above, below and iconA PNG image, SVG and PNG URLs, and HTML with the image's dimensions

For generate_qr, use the same parameter meanings and defaults as image URLs. Pass width as an integer from 96 to 2048; a style or payload may require a higher minimum. These are tool arguments, not a query string:

{
  "text": "https://www.cmu.edu/",
  "style": "icon",
  "icon": "calendar-event",
  "width": 1024,
  "above": "Visit CMU"
}

A generation failure returns a tool result marked isError with an explanatory message. MCP protocol errors are separate from image errors; check the tool result as well as the connection.

To set up an agent, start with the prompt on the home page.

Errors

StatusMeaningWhat to Check
400QRnegie can't make that image.Read the plain-text response. Check parameter names, repeated values, content length, style, width, text characters and icon name. A width error gives the required minimum; artwork may also require shorter content or a different style.
500Something went wrong making the image.Check the response before saving it as an image. Try again; if it keeps happening, report it on GitHub with a made-up example.

Successful image requests return image data. Error responses are plain text, so integrations should check the HTTP status and content type before using the body. A successful image doesn't replace the checks on the finished layout.