Labsco
ysalitrynskyi logo

opn-mcp

from ysalitrynskyi

Shorten links, read click analytics, and manage opn.onl short links (hosted or self-hosted) from your AI assistant.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

opn-mcp

opn-mcp MCP server

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.

Tools

ToolDescription
shorten_urlCreate a short link (url, optional alias / title / expiry / password)
list_linksList your links (limit, offset, search)
get_link_statsClick analytics for a link (geo, devices, browsers, referrers)
update_linkUpdate a link's destination, title, expiry or password
delete_linkDelete a link
get_qr_codeGet a link's QR image โ€” optional brand colour, centre logo, PNG/SVG
check_url_healthCheck a destination URL is reachable before shortening

Example prompts

  • "Shorten https://example.com/very/long/url and call it launch-2026"
  • "How many clicks did link 42 get, and from which countries?"
  • "Give me a branded SVG QR code for link 42"
  • "List my last 10 links"

Development

npm install
npm run build      # tsc โ†’ dist/
npm test           # vitest
OPN_API_KEY=opn_โ€ฆ npm run dev   # run from source (stdio)

License

MIT ยฉ ysalitrynskyi. Part of the opn.onl project.