Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
⚡️ Zero-dependency QR Code generator and decoder for Go
Fetched from the repository for this visit.
Zero-dependency QR Code encoding, styling and decoding for Go.
Playground · Getting started · Documentation · API reference
Encode switches modes within the text, picks
the smallest version and raises error correction into spare capacity.Verify renders the result, decodes it and
checks the contrast, so you know a design scans before you publish it,
and Grade grades a rendering or a photo of a print by the quality
parameters of ISO/IEC 15415.DecodeAll every code in a photo. It reads about as many real photos as
zxing-cpp and more than WeChat, ZBar and gozxing
(comparison).go get github.com/piglig/go-qr/v2
Requires Go 1.23 or later. Upgrading from v1? See Upgrading to v2.
package main
import (
"log"
"os"
"github.com/piglig/go-qr/v2"
)
func main() {
code, err := qr.Encode("https://github.com/piglig/go-qr")
if err != nil {
log.Fatal(err)
}
png, err := code.PNG(qr.WithModuleShape(qr.ModuleRounded))
if err != nil {
log.Fatal(err)
}
if err := os.WriteFile("qr.png", png, 0o644); err != nil {
log.Fatal(err)
}
}
Decode an image:
res, err := qr.Decode(img) // any image.Image
fmt.Println(res.Text)
The getting started tutorial goes from here to a styled, verified code in a few minutes.
| Tutorial | Getting started |
| Guides | Encoding · Rendering · Styling · Decoding · Payloads · Batch processing · Troubleshooting · Command-line tool · AI assistants (MCP) |
| Reference | API on pkg.go.dev · Errors · Standards support · Changelog |
| Background | How it works · Performance |
go install github.com/piglig/go-qr/tools/generator@latest
generator encode -png hello.png "Hello, world!"
generator decode hello.png
See the CLI guide for every flag.
go-qr-mcp is an MCP server that lets
Claude, Cursor and other assistants decode, generate and inspect QR Codes
exactly, instead of guessing from pixels, and flags risky content such as
lookalike URLs or embedded 2FA secrets:
go install github.com/piglig/go-qr/mcp/cmd/go-qr-mcp@latest
claude mcp add go-qr -- go-qr-mcp
See the MCP guide for other clients and the tools.
Bug reports, ideas and pull requests are welcome. Read CONTRIBUTING.md for how to set up the repository, run the tests and fuzzers, and send a change. Report security issues privately as described in SECURITY.md.
Loading reviews...
GitHub checked 334h ago - refresh overdue. Recently viewed repositories target hourly refresh.
Replace {MCP_ENDPOINT_URL} with this MCP’s endpoint URL (from its repo or docs above). Connect directly and complete any provider authentication separately; this is not platform-key access.
Tool
OS
Config file: ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-server": {
"url": "{MCP_ENDPOINT_URL}"
}
}
}Paste into mcpServers in the config file. Restart Cursor after saving.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.