The two tools that make it worth an agent's attention are set_link_routing_rules, which targets by device, OS, country or language with A/B weights, and preview_url_metadata, which lets a link be auto-titled from the page it points at. Because OPN_BASE_URL is a plain switch, the same conversation works against your own deployment.
An MCP server for opn.onl, an open-source URL shortener. It covers the full link lifecycle in natural language — create, schedule, protect, route and retire links — plus per-link and account-wide analytics, and it works against the hosted service or your own instance.
- shorten_url and shorten_urls_bulk — one link with an optional custom alias, title, notes, scheduling, click limit, password, burn-after-reading, folder and tags; or many at once with per-URL errors reported
- list_links, update_link, delete_link, clone_link and toggle_link_pin — browse and filter your links, change any field (with remove_ flags to clear one), duplicate a link under a fresh code, or pin it to the top
- check_alias_available — confirm a custom slug is free before you use it
- get_link_routing_rules and set_link_routing_rules — send visitors matching a device, OS, country or language to a different destination, with A/B weighting; empty match fields mean any
- get_link_stats and get_dashboard_stats — clicks, unique visitors, geography, cities, devices, browsers, OS and referrers for one link, or the same aggregated across all of them
- get_qr_code — the link's QR image, optionally branded with a colour and centre logo, as PNG or SVG
- check_url_health, build_utm_url and preview_url_metadata — confirm a destination is reachable, append UTM parameters, and read a page's Open Graph title, description and image
- list_tags, create_tag, add_tags_to_link, remove_tags_from_link, list_folders, create_folder and move_links_to_folder — the organising layer
- export_links_csv — every link as raw CSV
An opn.onl API key, created under Settings > API Keys and shown once; set it as OPN_API_KEY. Clients run npx -y opn-mcp over stdio and it talks to the hosted API by default. Point OPN_BASE_URL at your own instance's API host to use a self-hosted opn.onl.
One command plus a key — npx -y opn-mcp, then supply credentials
