๐Ÿ”— MCP SSE Server Connection Guide

Connect AI models to Barcodes.dev using Model Context Protocol

๐Ÿ“‹ Overview

The Barcodes.dev MCP (Model Context Protocol) server enables AI models like Claude Desktop to generate barcodes, QR codes, and other 2D codes directly through a standardized protocol. This integration allows for seamless automation and AI-powered barcode generation workflows.

๐ŸŒ Server Endpoints

Primary MCP Endpoint: https://barcodes.dev/mcp/
SSE Stream: https://barcodes.dev/mcp/sse
Message Handler: https://barcodes.dev/mcp/message
Health Check: https://barcodes.dev/mcp/health

Integrating with Claude

Step-by-Step Setup Guide

Follow these steps to add the Barcodes.dev MCP connector to Claude on the web:

1 Access Claude Settings and Connectors

Open Claude and navigate to the settings menu, then select "Connectors".

Claude Settings Menu Connectors

2 Add a Custom Connector

Click on "Add Custom Connector" to create a new MCP connection.

Add Custom Connector

Use the following configuration values from the setup section above:

  • Name: Barcode Generator
  • URL: https://barcodes.dev/mcp/
  • Advanced settingsNot applicable at the moment

3 Verify Connection Status

Once successfully connected, the interface will show a "Configure" button

Barcodes.dev Connector Added

4 View Available Tools

Click "Configure" to see the complete list of available barcode generation tools. You can select here the tools you want enabled.

Tool List

5 Configure Tool Permissions (Optional)

For seamless experience, set tool permissions to "Always Allow" to avoid confirmation prompts for each barcode generation.

Always Allow Setting

6 Start Generating Barcodes

You're all set! Start using the tools by asking Claude to generate barcodes, QR codes, and more.

Prompt Sample

Setup Complete!

You can now generate barcodes directly in Claude conversations. Try asking: "Create a Code128 barcode for product SKU ABC-123" or "Generate a QR code for my website URL: https://barcodes.dev"

๐Ÿ–ฅ๏ธ Claude Desktop Configuration

If you are using Claude desktop client, you can follow the same steps than above for the web configuration, or you can modify your local config files.

Remote SSE Server

Configure Claude Desktop to connect to the production SSE server:

// File: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
// File: %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
  "mcpServers": {
    "barcode-generator": {
      "url": "https://barcodes.dev/mcp/",
      "type": "sse"
    }
  }
}

โš ๏ธ Configuration Notes

  • Restart Claude Desktop after modifying the configuration file
  • Ensure the configuration file has valid JSON syntax
  • For production use, prefer the HTTPS endpoint for security
  • Local development servers should only be used for testing

๐Ÿ› ๏ธ Available MCP Tools

The MCP server provides 6 specialized tools for generating different types of barcodes and codes:

generate_barcode

Generate linear barcodes like Code128, EAN13, UPC-A, etc.

text* Text to encode
barcode_type code128, ean13, upca, etc.
image_format PNG or SVG
width Width in pixels
height Height in pixels
generate_qr_code

Generate QR codes with customizable error correction.

text* Text or URL to encode
image_format PNG or SVG
size Size in pixels
error_correction L, M, Q, or H
generate_postal_code

Generate postal barcodes for mail services.

text* Postal code or tracking number
postal_type usps_intelligent_mail, royal_mail, etc.
image_format PNG or SVG
generate_2d_barcode

Generate 2D barcodes like Data Matrix, PDF417, Aztec.

text* Text to encode
barcode_type datamatrix, pdf417, aztec, etc.
image_format PNG or SVG
size Size in pixels
generate_composite_barcode

Generate composite barcodes combining linear and 2D components.

primary_data* Primary barcode data
composite_data* Composite 2D data
composite_type cc-a, cc-b, cc-c
primary_type ean13, upca, code128, etc.
image_format PNG or SVG
generate_stacked_barcode

Generate stacked barcodes like PDF417 Compact, MicroPDF417.

text* Text to encode
stacked_type pdf417compact, micropdf417, etc.
image_format PNG or SVG
rows Number of rows
columns Number of columns

๐Ÿ’ก Example Usage

Sample AI Prompts

Once configured, you can ask Claude to generate barcodes like this:

Simple Barcode:

"Generate a Code128 barcode for 'PRODUCT-123'"

QR Code with URL:

"Create a QR code linking to 'https://barcodes.dev'"

Multiple Barcodes:

"Generate both an EAN13 barcode for '1234567890123' and a Data Matrix code for 'SERIAL-456'"

Postal Barcode:

"Create a USPS Intelligent Mail barcode for tracking number '12345678901234567890'"

โš™๏ธ Technical Details

Protocol Information
  • Protocol: MCP 2025-06-18 (default), 2024-11-05 (legacy)
  • Transport: Streamable HTTP + Server-Sent Events (SSE)
  • Format: JSON-RPC 2.0
  • Authentication: None required
  • Rate Limiting: Standard web limits apply
Output Formats
  • SVG: Scalable vector graphics markup
  • PNG: Downloadable files via secure URLs (expires after 1 hour)
  • Embedding: Direct display in Claude responses
  • Download: Save to files for external use

๐Ÿ”— Connection Flow

  1. Claude Desktop reads configuration and initiates SSE connection
  2. Server responds with available tools and capabilities
  3. User prompts trigger tool calls via JSON-RPC messages
  4. Server processes requests and returns barcode data
  5. Claude displays generated barcodes in the conversation

๐Ÿ”ง Troubleshooting

Common Issues
Tools not appearing in Claude:
  • Verify JSON configuration syntax is correct
  • Restart Claude Desktop after config changes
  • Check server health at https://barcodes.dev/mcp/health
Connection timeouts:
  • Ensure stable internet connection
  • Try switching between HTTP and HTTPS endpoints
  • Check if corporate firewall blocks SSE connections
Generation errors:
  • Verify input data meets barcode format requirements
  • Check parameter names match tool specifications
  • Review error messages for specific format guidance

๐Ÿ“ž Support & Resources

๐Ÿ“–

Documentation

Complete API docs and examples

View API Docs โ†’
๐Ÿฅ

Health Check

Monitor server status

Check Status โ†’
๐Ÿ”ง

Generator Tool

Test barcode generation manually

Try Generator โ†’

Need help? The MCP integration is designed to be plug-and-play. Most connection issues resolve with a Claude Desktop restart after configuration.