Connecting an MCP Server
How to connect Claude or another MCP-compatible AI agent to your SMLLR analytics, using your existing API key.
What Is an MCP Server?
MCP (Model Context Protocol) is a standard that lets AI agents like Claude call tools directly — instead of you copy-pasting data back and forth, you can just ask a question in plain language and the agent fetches the real numbers itself.
@smllr/mcp-server is SMLLR's MCP server. It wraps the same read-only reporting API documented at /docs as a set of tools: account summary, QR code analytics, campaign analytics, and client analytics. It uses the same API key you already have — see Managing API Keys if you haven't generated one yet.
It is read-only: it cannot create, edit, or delete QR codes, campaigns, or clients — that's dashboard-only. It also never returns Lead Hub contact data (names, emails, phone numbers, or consent records) — only aggregated scan, campaign, and client analytics.
Setting It Up
The Settings → API page has a ready-to-copy version of this command pre-filled with your key right after you generate or regenerate it.
Get your API key
Go to Settings → API and generate a key if you don't already have one. See Managing API Keys for details.
Add the server to Claude Code
Run: claude mcp add smllr --env SMLLR_API_KEY=your_key_here -- npx -y @smllr/mcp-server
Or add it to Claude Desktop
Add this to your claude_desktop_config.json:
@@CODEPLACEHOLDER0@@
Ask a question
Try something like "what's my QR scan summary for the last 30 days?" — Claude will call the right tool and read back real data from your account.
Available Tools
Seven tools, one per reporting endpoint — same data as the REST API, same limits:
| Tool | Same As |
|---|---|
get_summary | GET /summary |
list_qr_codes | GET /qrs |
get_qr_code | GET /qr/:id |
list_campaigns | GET /campaigns |
get_campaign | GET /campaign/:id |
list_clients | GET /clients |
get_client | GET /client/:id |
Security
The API key you give the MCP server carries the same full read access to your organization's reporting analytics, QR code metadata, campaign performance, and client lists as it does anywhere else. Don't share it, and don't commit it to a public repository or config file that gets checked into version control.
If you ever suspect your key has been exposed, regenerate it immediately from Settings → API — the old key stops working instantly, including for any MCP connections using it.
Troubleshooting
Server exits immediately with an error about SMLLR_API_KEY — the environment variable isn't set, or is empty. Double-check the
--envflag (Claude Code) or theenvblock (Claude Desktop config).A tool call returns
plan_upgrade_required— your account isn't on the Premium plan. The error includes anupgradeUrlyou can visit directly.A tool call returns
rate_limited— you've exceeded 60 requests per minute on that API key. The error includesretryAfterSeconds.A tool call returns
not_found— the QR code, campaign, or client ID either doesn't exist or doesn't belong to your account.
Was this article helpful?
Related Articles
Managing API Keys
Account & Security