Automate Workflows
Let AI agents batch-create links, generate branded QR codes, or pull analytics reports as part of larger automation pipelines.
Use the xQR MCP Server to let AI agents create links, generate QR codes, query analytics, and manage your workspace — all from natural language prompts.
Automate Workflows
Let AI agents batch-create links, generate branded QR codes, or pull analytics reports as part of larger automation pipelines.
Natural Language Queries
Ask “which link got the most scans last week?” and get an answer without writing API calls.
| Client | Transport | Setup |
|---|---|---|
| Claude Desktop | stdio | Config file |
| Claude Code (CLI) | stdio | Config file |
| VS Code (Copilot/MCP extension) | stdio | settings.json |
| Cursor | stdio | Config file |
| Windsurf | stdio | Config file |
| Custom agents (Agent SDK) | stdio | Programmatic |
Get an API key — Go to Settings → Developers in your xQR dashboard and create a key with * scope
Configure your AI client — Add the xQR MCP server to your client’s config
Start chatting — Ask your AI agent to interact with your xQR workspace
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{ "mcpServers": { "xqr": { "command": "npx", "args": ["@xqr/mcp-server"], "env": { "XQR_API_KEY": "xqr_pk_a1b2c3d4.your_secret_here" } } }}Edit ~/.claude/settings.json:
{ "mcpServers": { "xqr": { "command": "npx", "args": ["@xqr/mcp-server"], "env": { "XQR_API_KEY": "xqr_pk_a1b2c3d4.your_secret_here" } } }}Add to your .vscode/settings.json:
{ "mcp.servers": { "xqr": { "command": "npx", "args": ["@xqr/mcp-server"], "env": { "XQR_API_KEY": "xqr_pk_a1b2c3d4.your_secret_here" } } }}Edit ~/.cursor/mcp.json:
{ "mcpServers": { "xqr": { "command": "npx", "args": ["@xqr/mcp-server"], "env": { "XQR_API_KEY": "xqr_pk_a1b2c3d4.your_secret_here" } } }}You: Create a short link to https://example.com/black-friday with the slug “bf2026” and labels “campaign” and “q4”
Agent: Created short link
https://xqr.co/bf2026pointing tohttps://example.com/black-fridaywith labelscampaignandq4.
You: What are my top 5 performing links this month?
Agent: Here are your top 5 links by scan count for the last 30 days:
promo-spring— 2,341 scansbf2026— 1,892 scansdocs— 1,204 scanscareers— 987 scanssignup— 756 scans
You: Generate a QR code for https://example.com with my “brand-primary” template
Agent: Generated a QR code using the “brand-primary” template. The image has been saved as
qr-brand.svg.
You: Create 5 short links for these URLs: [list of URLs]
Agent: Created 5 short links. Here are the results:
https://xqr.co/abc123→ https://example.com/page-1https://xqr.co/def456→ https://example.com/page-2 …
Use the xQR MCP server programmatically with the Claude Agent SDK:
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const response = await client.messages.create({ model: "claude-sonnet-4-20250514", max_tokens: 1024, messages: [ { role: "user", content: "Create a short link to https://example.com and get its QR code", }, ], // MCP tools are automatically available when configured});Or use the REST API directly for non-MCP agent frameworks:
import httpx
class XQRAgent: def __init__(self, api_key: str): self.client = httpx.Client( base_url="https://xqr.co/api/v1", headers={"Authorization": f"Bearer {api_key}"}, )
def create_link(self, url: str, slug: str = None) -> dict: body = {"url": url} if slug: body["custom_slug"] = slug res = self.client.post("/links", json=body) res.raise_for_status() return res.json()["data"]
def get_analytics(self, period: str = "30d") -> dict: res = self.client.get("/analytics/summary", params={"period": period}) res.raise_for_status() return res.json()["data"]The xQR MCP server exposes 27 tools across 6 domains:
| Domain | Tools | Examples |
|---|---|---|
| Links | 7 | Create, list, get, update, delete, bulk create, get QR |
| QR Codes | 4 | Generate, list/create/render templates |
| Analytics | 6 | Summary, timeseries, geography, devices, top links, link stats |
| Link-in-Bio | 5 | CRUD + publish/unpublish |
| Assets | 4 | List, get, publish, delete |
| Workspace | 3 | Info, usage, members |
See the full Tools Reference for parameter details.
Was this page helpful?
Thanks for your feedback!