URL Shortener MCP Server: Shorten and Track Links from Claude
MiniLy runs a hosted MCP server, so Claude, Cursor and Codex can shorten links and read bot-filtered click analytics in plain English. Here is how to connect it.
TL;DR: MiniLy runs a hosted MCP server at https://minily.org/api/mcp. Connect it to Claude Code, Claude Desktop, Cursor, Windsurf or Codex with a personal API key and your assistant can create short links, apply tags, generate QR codes and read your click analytics without you leaving the chat. Setup takes about two minutes, the analytics filter bots by default, and you can start for free with 5 links. This is a first-party tutorial: we built the server, so the commands below are the exact ones we ship.
What is an MCP server (and why give one to your AI assistant)
An MCP server is a small service that exposes tools an AI assistant can call. The Model Context Protocol is an open standard for connecting AI applications to external systems, described by its maintainers as "a USB-C port for AI applications." Give your assistant an MCP server and it stops guessing about your data and starts acting on it directly.
MCP was introduced by Anthropic and is now supported across Claude, ChatGPT, Visual Studio Code, Cursor and many other clients. That shared plumbing is the point: a tool built once works everywhere. MiniLy's MCP server puts your links, tags, QR codes and analytics behind that same standard, so the assistant you already use can run your link workflow for you. Read the MCP feature page for the full tool list.
What you can do with it
You talk to your links in plain English and the assistant calls the right tool. It can shorten a URL, tag it, pull click stats, break traffic down by country or device, and build a styled QR code. Everything is scoped to your account and your plan, so the assistant sees exactly what you would see in the dashboard, nothing more.
The workflow that sells it is agent to link to stats in one conversation. A few prompts that map to real tools:
- "Shorten this URL and tag it launch-day." Creates a short link and attaches the tag in one step.
- "Which of my links got the most real human clicks this week?" Pulls the analytics summary with bots filtered out by default.
- "Break down last month's clicks by country and device for my newsletter link." Runs the country and device tools scoped to a single link.
- "Generate a QR code for my pricing link with rounded dots and my brand color." Upserts the QR styling on that link.
- "List every link I created in June that has zero clicks so I can clean them up." Lists and filters, then you delete the dead ones by asking.
Because the assistant reads the same numbers as the web app, you can ask follow-up questions ("now compare that to the previous 30 days") and it keeps the context. The analytics tools cover clicks over time, referrers, countries, cities, devices, operating systems, activity timing and UTM parameters. Bot traffic is excluded unless you explicitly ask for it, which matters when more than half of raw clicks on a public link can be automated (we measured 56% on our own links, and that is a floor). See the analytics feature for what each metric means.
Set up the MCP server step by step
There are two steps: create a personal API key in your MiniLy settings, then paste one snippet into your AI client. The key is a Bearer token that starts with mly_. It is shown once, stored only as a hash, and you can revoke or expire it whenever you want. Total time is about two minutes.
1. Create your API key
Open your MiniLy dashboard, go to Settings, then API keys, and click Create key. Give it a name that tells you where it lives (for example "Claude Desktop"), and optionally set an expiry. Copy the key immediately: it is displayed only at creation and cannot be shown again. If you lose it, revoke it and make a new one.
2a. Claude Code (CLI)
Claude Code speaks Streamable HTTP natively, so a single command wires it up. Replace mly_your_key_here with your real key:
claude mcp add --transport http minily https://minily.org/api/mcp \
--header "Authorization: Bearer mly_your_key_here"
That is the whole thing. Ask Claude "list my MiniLy links" to confirm the connection.
2b. Claude Desktop and Cursor (config JSON)
Cursor connects to Streamable HTTP directly. Add this to your MCP config:
{
"mcpServers": {
"minily": {
"url": "https://minily.org/api/mcp",
"headers": { "Authorization": "Bearer mly_your_key_here" }
}
}
}
Claude Desktop and Windsurf are stdio clients, so they need the mcp-remote bridge to reach a remote server. Use this form instead:
{
"mcpServers": {
"minily": {
"command": "npx",
"args": [
"-y", "mcp-remote", "https://minily.org/api/mcp",
"--header", "Authorization: Bearer mly_your_key_here"
]
}
}
}
Codex uses the same bridge with TOML config, and the MiniLy dashboard hands you a copy-paste snippet for each client so you never have to type this by hand. Restart the client after saving, and the minily tools appear in its tool list.
Security notes
The API key is the only credential, so treat it like a password. It is stored as a SHA-256 hash, never in plain text, and MiniLy cannot show it to you again after creation. You can revoke a key or set it to expire at any time, and banned accounts are rejected outright. Plan gating runs server-side, identical to the web app.
- Never commit the key. Keep it out of git, screenshots and shared configs. If it leaks, revoke it in Settings and issue a fresh one.
- Use expiry for short-lived work. A key you set to expire in 30 days limits the blast radius if it ever slips out.
- The server is account-scoped, not an admin backdoor. A key only ever touches its owner's links and data, and Pro-only analytics stay locked on the free plan.
- Rate limiting is on. Requests are capped per IP (120 per minute) as a first line of defense against floods and brute-forcing.
- No raw IPs. Analytics tools never return visitor IP addresses, and link creation runs the same domain-rule and malware checks as the website, so the MCP cannot bypass moderation.
Why this matters for AI-driven traffic
AI assistants and agents increasingly generate and share links on your behalf, in chats, in generated docs, in automated posts. A raw destination URL in that flow is invisible to you. A short link is the one thing you can point an agent at that stays measurable, so you can see whether AI-placed links actually drive real human clicks.
That is also where llms.txt comes in. It is a plain-text file at the root of a site that tells AI crawlers what your site is and where the useful content lives, the way robots.txt talks to search engines. MiniLy publishes one so assistants can understand the product cleanly. Pair a discoverable site with short links your agent creates, and the loop closes: the AI finds you, shortens links, and you measure the traffic it sends.
How MiniLy compares to other shortener MCPs
MiniLy is not the only URL shortener with an MCP server, and pretending otherwise would be silly. Short.io ships one at https://ai-assistant.short.io/mcp for Claude Desktop and VS Code, and smaller services like s.ee have community MCP servers too. If you already pay for one of those, use it. The choice comes down to what you get for free and how good the analytics are.
Where MiniLy earns its place:
- Free to start, no card. The free plan covers 5 links, unlimited QR codes, global analytics and password protection. You can test the whole MCP flow before paying anything. Pricing scales to Pro at 5 EUR per month (48 EUR per year) when you need unlimited links and per-link analytics. See pricing.
- Analytics you query in natural language, with bots filtered. Ask for "real human clicks" and you get exactly that, because bot exclusion is the default. That is a different experience from a tool that hands the agent a raw clickstream.
- QR codes over MCP. The assistant can style and attach a QR code to any link, with custom dots, corners, colors and a center logo, and get the configuration back.
MCP itself is no longer niche. Public directories now index tens of thousands of servers: the Glama registry listed 50,845 MCP servers as of 2 July 2026, and PulseMCP counted 5,500-plus as far back as 22 October 2025. The protocol has real momentum, which means the client you use today will almost certainly keep speaking it tomorrow.
Frequently asked questions
Is there a free plan?
Yes. The free plan includes 5 short links, unlimited QR codes, global click analytics and password protection, with no credit card required. The MCP server works on the free plan, with Pro-only analytics tools returning an upgrade message instead of data. Upgrade to Pro (5 EUR per month or 48 EUR per year) for unlimited links, per-link and per-tag analytics, cities, devices and custom ranges. Full details on the pricing page.
Does it work with ChatGPT?
Not yet directly. MiniLy's MCP server is live for Claude Code, Claude Desktop, Cursor, Windsurf and Codex today. ChatGPT support is planned once OAuth 2.1 authorization ships, which is what ChatGPT's custom connectors expect. In the meantime, any client that accepts a Bearer token in an Authorization header can connect.
What data can the AI access?
Only the data belonging to the key's owner, scoped to that account's plan. The assistant can read your links, tags, custom domains, QR configs, account profile and click analytics, and it can create or update links, tags and QR codes. It never sees other users' data, and analytics tools never return visitor IP addresses. Bot traffic is excluded from analytics unless you explicitly ask to include it.
Can I revoke access?
Yes, instantly. Go to Settings, then API keys, and revoke the key. The next request from any client using it fails with a 401. You can also set an expiry when you create a key so it dies automatically after a chosen number of days. Because keys are stored as hashes, revoking is the correct move if a key is ever exposed.
Which transport does the server use?
Streamable HTTP. Server-Sent Events (SSE) is disabled because the MCP spec deprecated it. Clients that speak Streamable HTTP natively, like Claude Code and Cursor, connect with a URL and header. Stdio-only clients, like Claude Desktop and Windsurf, bridge through the mcp-remote npm package, as shown in the setup snippets above.
Will the assistant delete my links by accident?
Deletion is a distinct tool marked as destructive, so a well-behaved client asks before calling it. Creating and updating links is non-destructive, and every write runs the same quota, domain-rule and malware checks as the web app. If you are cautious, use a key with an expiry and review what the assistant proposes before confirming irreversible actions.
Related Articles
You might also enjoy these