opn-mcp
This server lets AI assistants manage and analyze short links on the opn.onl URL shortener platform through natural language.
Shorten URLs: Create short links with optional custom alias/slug, title, password protection, and expiry timestamp.
List Links: Retrieve your short links (most recent first) with pagination (limit/offset) and text search filtering across URL, title, notes, or code.
Get Link Analytics: View detailed click statistics for any link, including geography, device types, browsers, and referrers.
Update Links: Modify an existing link's destination URL, title, password, or expiry date.
Delete Links: Permanently remove a short link by its ID.
Generate QR Codes: Produce QR code images (PNG or SVG) with optional branding — custom hex foreground color and centre logo overlay.
Check URL Health: Verify that a destination URL is reachable (returns status and response time) before shortening it.
opn-mcp
An MCP server for opn.onl — the open-source, self-hostable URL shortener. It lets AI assistants (Claude Desktop, Cursor, etc.) shorten links, read analytics, generate QR codes, and manage links in natural language.
Works against the hosted service or your own self-hosted instance.
Setup
1. Get an API key
On your opn.onl instance, go to Settings → API Keys, create a key, and copy it (it starts with opn_ and is shown once).
2. Add the server to your MCP client
Claude Desktop — edit claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows):
{
"mcpServers": {
"opn": {
"command": "npx",
"args": ["-y", "opn-mcp"],
"env": {
"OPN_API_KEY": "opn_your_key_here"
}
}
}
}Restart your client. That's it — it talks to the hosted API (https://l.opn.onl) by default.
Prefer to run from source? Swap the
argsfor the GitHub build — same config:"args": ["-y", "github:ysalitrynskyi/opn-mcp"](it builds on install).
Self-hosted instance
Point OPN_BASE_URL at your own instance's API host:
{
"mcpServers": {
"opn": {
"command": "npx",
"args": ["-y", "opn-mcp"],
"env": {
"OPN_API_KEY": "opn_your_key_here",
"OPN_BASE_URL": "https://l.your-domain.com"
}
}
}
}Related MCP server: PicSee Short Link
Configuration
Env var | Required | Default | Description |
| ✅ | — | Your API key ( |
| — |
| API base URL — set this for a self-hosted instance |
Tools
Links
Tool | Description |
| Create a short link — optional alias, title, notes, scheduling ( |
| Shorten many URLs at once, optionally into a folder |
| List your links (limit, offset, search, folder or tag filter) |
| Update destination, title, notes, scheduling, click limit, folder or protections; clear fields with |
| Delete a link |
| Duplicate a link under a fresh short code |
| Pin or unpin a link |
| Check whether a custom alias is free before using it |
Analytics
Tool | Description |
| Per-link analytics (clicks, unique visitors, geo, cities, devices, browsers, OS, referrers); optional |
| Account-wide analytics across all your links |
QR & URL helpers
Tool | Description |
| Get a link's QR image — optional brand colour, centre logo, PNG/SVG |
| Check a destination URL is reachable before shortening |
| Append UTM campaign parameters to a URL |
| Fetch Open Graph metadata (title, description, image) for a URL |
Tags & folders
Tool | Description |
| List or create tags |
| Attach or detach tags on a link |
| List or create folders |
| Move links into a folder |
Example prompts
"Shorten https://example.com/very/long/url and call it launch-2026"
"Shorten these five URLs into a new folder called Q3 Campaign"
"How many clicks did link 42 get in the last 30 days, and from which countries?"
"Give me a branded SVG QR code for link 42"
"Tag my last 10 links as 'newsletter' and show my dashboard stats"
"Build a UTM link for https://example.com — source newsletter, medium email"
Development
npm install
npm run build # tsc → dist/
npm test # vitest
OPN_API_KEY=opn_… npm run dev # run from source (stdio)Releasing
All three registries are owned by ysalitrynskyi (npm user, GitHub user, and
the io.github.ysalitrynskyi MCP-registry namespace), so publishing must be done
while signed in as that account.
Bump the version in three places and keep them identical:
package.json,server.json(top-level and thepackages[0].version), andSERVER_VERSIONinsrc/server.ts.Land it: commit to
mainand push. CI (.github/workflows/ci.yml) runsbuild+test— it does not publish.Publish to npm (as npm user
ysalitrynskyi):npm login npm publish # prepublishOnly runs the buildPublish to the MCP registry (as GitHub user
ysalitrynskyi):mcp-publisher validate # optional, offline check mcp-publisher login github # interactive browser OAuth mcp-publisher publish
Smithery (smithery.yaml) and Glama
(glama.json) track the npm/registry release automatically — no separate step.
License
MIT © ysalitrynskyi. Part of the opn.onl project.
Available Tools
2 toolsadd_tags_to_linkB
Attach one or more existing tags to a link.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The link id | |
| tag_ids | Yes | Tag ids to attach |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It does not disclose behaviors like error handling when tags or link don't exist, idempotency, or authorization requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is a single sentence with no extraneous words. It is efficient and to the point.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 2 simple params and no output schema, the description covers core action but lacks critical context like error states, side effects, or prerequisites.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema already describes both parameters well (100% coverage). Description adds minimal value by implying tags should be existing, but otherwise adds no new meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (attach) and the resources (tags to a link). It distinguishes itself from the sibling tool get_qr_code, which is unrelated. However, it could be more specific about the nature of 'existing' tags.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs. alternatives. It does not mention prerequisites (e.g., tags must exist) or conditions for use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_qr_codeB
Get the QR code for a link, optionally branded with a colour, centre logo, and PNG/SVG format.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The link id | |
| logo | No | Overlay the brand logo in the centre | |
| color | No | Hex foreground colour, e.g. 2f37d8 | |
| format | No | Image format (default png) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It implies read-only retrieval via 'Get', but doesn't explicitly confirm non-destructive behavior, response format, or error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, 21 words, efficient and front-loaded. However, it could be slightly more structured (e.g., separate required vs optional).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a simple 'get' tool, but missing return type (likely image or URL) and any mention of the required 'id' parameter in the description itself.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. Description adds a summary of optional parameters but no new semantic information beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and the resource 'QR code for a link', and mentions optional customizations (colour, logo, format). This distinguishes it from sibling tools like shorten_url or list_links.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives, such as checking URL health or getting link stats. It doesn't specify prerequisites or conditions for use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.2.0- Added
add_tags_to_link - Removed
delete_link - Added
get_qr_code
6 tool updates
v1.2.0- Removed
check_url_health - Removed
get_link_stats - Removed
get_qr_code - Removed
list_links - Removed
shorten_url - Removed
update_link
7 tool updates
v1.1.0- First observed
check_url_health - First observed
delete_link - First observed
get_link_stats - First observed
get_qr_code - First observed
list_links - First observed
shorten_url - First observed
update_link
TDQS
Scored across 2 tools
The two tools serve entirely different purposes: one manages tags on links, the other generates QR codes. There is no functional overlap.
Both tools follow a clear verb_noun pattern: 'add_tags_to_link' and 'get_qr_code'. The naming is uniform and predictable.
With only two tools, the server feels minimal. While it may cover a narrow use case, the count is borderline for a typical MCP server.
The domain appears to be link management, but essential operations like creating, retrieving, or deleting links are missing. This leaves obvious gaps.
Maintenance
Related MCP Connectors
Official in.bio MCP server: shorten URLs, styled QR codes, and click analytics. No API key needed.
Create and manage CodeQR short links, QR codes, and analytics from any MCP client.
Official PicSee MCP server for short links, link management, click analytics, and optional OAuth.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables URL shortening and management through MCP, allowing creation of short links with optional tags and expiry, search, and stats.6 npm1MIT
- AlicenseNot gradedqualityAmaintenanceOfficial PicSee MCP server for creating short links. OAuth unlocks link management and click analytics; anonymous shortening is supported.MIT

INBIO MCP Serverofficial
AlicenseNot gradedqualityCmaintenanceOfficial MCP server for INBIO's URL shortener with click analytics and customizable QR codes. Enables link shortening, QR code generation, and link management with optional authentication for advanced features.MIT- FlicenseNot gradedqualityBmaintenanceRemote MCP server for CodeQR that lets you create and manage short links and QR codes, retrieve analytics, and more via natural language in ChatGPT and other MCP clients.-