API & MCP
Everything a person can do on Barcode Generator (EAN-13, UPC-A, Code 128), a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://printshopbarcode.usefulweb.app/api/v1/calculate– run Barcode Generator (EAN-13, UPC-A, Code 128)GET https://printshopbarcode.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Barcode Generator (EAN-13, UPC-A, Code 128)
Make an EAN-13, UPC-A or Code 128 barcode. EAN/UPC check digits are calculated (or verified), Code 128 switches between code sets A, B and C for the shortest symbol, and the result prints at GS1 sizes with quiet zones and a test square.
| Field | Type | Default | Description |
|---|---|---|---|
symbology | select (ean13, upca, code128) | "ean13" | Barcode type |
data | text | "400638133393" | Data. EAN-13: 12 digits (the check digit is added) or 13 digits (it is checked). UPC-A: 11 or 12 digits. Code 128: up to 80 ASCII characters. |
magnification | number | 1 | Size (magnification). EAN/UPC: 1 = 0.33 mm modules (GS1 nominal); Code 128: 1 = 0.30 mm modules. |
height | number | 22.85 | Bar height (mm) |
text | boolean | true | Print the digits under the bars |
layout | select (one, sheet) | "one" | Print layout |
caption | text | — | Caption above the barcode |
paper | select (a3, a4, a5, a6, b5, letter, legal, tabloid, halfletter) | "a4" | Paper size |
Example request
EAN-13 with the check digit added
curl -X POST https://printshopbarcode.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"symbology":"ean13","data":"400638133393"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://printshopbarcode.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
printshop_barcode - Local stdio connector:
node src/mcp-stdio.ts --tool=printshop-barcode
{
"mcpServers": {
"printshop-barcode": { "type": "http", "url": "https://printshopbarcode.usefulweb.app/mcp" }
}
}