opn-mcp is an MCP server for the open-source, self-hostable short link service opn.onl, used to let AI assistants (such as Claude Desktop, Cursor, etc.) complete short link-related operations using natural language.
Purpose: shorten links, read click analytics, generate QR codes, and manage links in AI clients, and it can connect to the opn.onl hosted service or a user's self-hosted instance.
Main capabilities: shorten single or multiple links and name them, and put them into folders; query the click count and source countries of a link within a specified time period; generate branded SVG QR codes; tag links and view dashboard statistics; build links with UTM parameters.
How to use: first create an API key in the Settings → API Keys of the opn.onl instance (starting with opn_, shown only once). Then configure the server in the MCP client, for example in Claude Desktop edit claude_desktop_config.json (on macOS located at ~/Library/Application Support/Claude/, on Windows located at %APPDATA%\Claude/), restart the client and it will work, connecting by default to the hosted API https://l.opn.onl。也可从源码运行,将 replace args with the GitHub build: "args": ["-y", "github:ysalitrynskyi/opn-mcp"]. When self-hosting, point OPN_BASE_URL to the API host of your own instance.
Use cases: users who need to batch-generate short links in AI conversations, create marketing campaign links and UTM tracking, view link click analytics, or generate QR codes.
Limitations: you need to prepare an opn.onl API key yourself; self-hosting requires configuring OPN_BASE_URL; release-related processes are only for the project maintainer account, and ordinary users do not need to pay attention to them. The project uses the MIT license.