# QR Code Generator MCP

> The QR Code Generator lets you create scannable image links from any text or URL, and it reads data back out of existing images. Just tell your AI client what to encode or provide a picture, and it handles the rest—no external API keys needed.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** qr-code, barcode, image-generation, data-encoding, scanner

## Description

This server gives you two critical functions for dealing with scannable data: `create_qr_code` and `read_qr_code`. You use your AI client to handle everything—whether you're whipping up a hundred unique marketing links or pulling vital info out of an old asset photo. It’s built to work right away, so forget about juggling external API keys.

The **`create_qr_code`** tool handles generation. When you need a QR code for some text, a specific URL, or any other data point, you just feed it the content. The server then spits out a direct image link to that newly generated scannable code. You’re not stuck with one look; you control how it looks and feels. You can dictate the output format—choose PNG, SVG, JPEG, or EPS depending on where the final print job is going. Furthermore, you set the dimensions; need something small for a business card? Or maybe you're doing huge posters and gotta go 400x400 pixels? You call the shots.

Beyond size and format, `create_qr_code` lets you customize the aesthetic details. You select specific colors and set the background style to match your brand guidelines exactly. But here’s the thing about physical printing: things get damaged. So, you gotta worry about readability. That's where setting the Error Correction Level comes in—you choose L, M, Q, or H. Picking a higher level means the code can stay totally scannable even if it gets partially scratched up or dirty.

When you need to read data from an existing image, you use **`read_qr_code`**. You pass the tool a public image URL containing a QR code, and it processes that picture instantly. The agent pulls out whatever encoded text or link is inside—no guessing involved. It’s simple: provide the visual, get the digital data back.

The whole process runs through your AI client. When you invoke `create_qr_code`, you give it the input data and all the styling parameters (colors, size, error level). The server handles the encoding, and you get a clean, direct URL to the finished image. It’s designed for high reliability across different domains—from inventory tracking to event ticketing. You use `read_qr_code` when you need to reverse that process: taking an existing photo and extracting the hidden link or text it represents.

## Tools

### create_qr_code
Generates a direct image URL of a QR code based on the data you provide.

### read_qr_code
Scans an existing QR code by processing and decoding a provided image URL.

## Prompt Examples

**Prompt:** 
```
Create a QR code for the URL https://vurb.io
```

**Response:** 
```
I've generated the QR code for you. You can view or download it here: [QR Code URL].
```

**Prompt:** 
```
Generate a 400x400 blue QR code for the text 'Welcome to the Team' in PNG format.
```

**Response:** 
```
The custom blue QR code (400x400) has been created. Here is your link: [QR Code URL].
```

**Prompt:** 
```
Decode the QR code from this image: https://example.com/my-qr.png
```

**Response:** 
```
I've scanned the image. The QR code contains the following data: 'https://github.com/mcp-servers'.
```

## Capabilities

### Generate Codes from Data
You pass text or URLs, and the agent outputs a scannable QR code link.

### Read Codes from Images
You give an image URL, and the tool extracts any encoded data it finds inside the QR code.

### Customize Visual Output
Set specific colors, dimensions (e.g., 400x400), and background styles for your generated codes.

### Ensure Readability
Select an Error Correction Level (L, M, Q, or H) so the code stays scannable even when partially damaged.

## Use Cases

### Inventory Audit of Damaged Goods
An ops worker takes a picture of a damaged asset tag. They feed the image URL into `read_qr_code`. The tool extracts the serial number and product ID instantly, allowing them to log the data without manual reading or transcription.

### Marketing Campaign Deep Links
A marketer needs a QR code for a new landing page. They use `create_qr_code`, specifying the URL, size (e.g., 600x600), and company brand colors in one prompt, getting an image ready for their ad copy.

### Developer Documentation Testing
A developer writes a guide that requires users to scan a specific API endpoint link. Instead of uploading the code somewhere, they call `create_qr_code` directly in the chat window and include the resulting image URL in the documentation.

### Quick Data Logging from Physical Signs
A student needs to capture a reference number off a whiteboard. They take a photo, send it into `read_qr_code`, and the tool returns the exact sequence of characters contained in the image.

## Benefits

- Need a branded flyer graphic? You don't leave the chat. Use `create_qr_code` to build custom-colored and sized codes for specific campaigns.
- Stop guessing if a code will scan. When generating, you control the Error Correction Level (L, M, Q, or H) with `create_qr_code`, ensuring your print materials work even if they get ripped up.
- Working on inventory? Instead of manual entry, just paste an image link and use `read_qr_code`. The tool pulls the asset ID right out for you.
- It handles more than links. You can encode plain text or data structures into a QR code using `create_qr_code`—it's not just for URLs.
- The entire process is self-contained. No API keys are needed for basic public use, letting your agent run the tools directly without complex setup.

## How It Works

The bottom line is you get visual encoding and decoding done in two simple steps within your chat interface.

1. Start by connecting your preferred AI client to the QR Code Generator MCP Server.
2. Call either `create_qr_code` (to build a code) or `read_qr_code` (to scan one), providing all necessary data, image links, and styling parameters.
3. Your agent receives the output: either a direct URL to the generated image file or a plain text string containing the decoded information.

## Frequently Asked Questions

**How do I generate a QR code with the QR Code Generator MCP Server?**
You call `create_qr_code` and provide the data, dimensions, and color details in your prompt. Remember that you can encode anything from a simple URL to plain text.

**What happens if the QR code I generate is damaged?**
You prevent that by adjusting the Error Correction Level (ECC) when calling `create_qr_code`. Using 'H' or 'Q' levels adds redundancy and makes it tougher to scan.

**Can I read QR codes from a file stored on my computer?**
No. The `read_qr_code` tool requires a publicly accessible image URL, not a local file path. You must upload the image first and get a shareable link.

**Is there a limit on how long the data can be for create_qr_code?**
The specific character limits depend on the encoding format, but generally, it handles standard URLs and large blocks of text without issue. Check the tool's full schema if you anticipate massive amounts of data.

**Do I need an API key or authentication when using the QR Code Generator MCP Server?**
No, basic usage requires no complex keys. You can generate and decode codes instantly from your AI client without setting up credentials first. This makes integration quick and simple for immediate testing.

**What types of data can I encode when running the `create_qr_code` tool?**
The `create_qr_code` tool handles more than just URLs or plain text. You can also embed structured data like Wi-Fi credentials, vCard information, and custom character sets into the QR code.

**How do I select the right file format when using `create_qr_code`?**
The choice depends on where you'll use it. Use SVG or EPS if the code needs to be scaled greatly (like in print). PNG is best for web embeds, while JPEG works for general digital images.

**Can I run `read_qr_code` with a local image file from my computer?**
No. The `read_qr_code` tool requires a publicly accessible image URL to decode the code. You must upload your picture somewhere online first; pasting a local path won't work.

**Can I customize the color and size of the generated QR code?**
Yes! The `create_qr_code` tool allows you to specify the `size` (e.g., '300x300'), `color` (in RGB or Hex), and `bgcolor` to match your branding requirements.

**How do I extract text from an existing QR code image?**
Use the `read_qr_code` tool and provide the `fileurl` of the image. The AI will decode the contents and return the stored text or URL to you instantly.

**What is the 'ecc' parameter and which value should I use?**
ECC stands for Error Correction Code. It allows the QR code to be read even if it's dirty or damaged. Values range from 'L' (7% recovery) to 'H' (30% recovery). Use 'H' for codes that might face physical wear.