MCP server for opn.onl — shorten links, read analytics & manage links from AI assistants. Works with the hosted service or your self-hosted instance.
git clone https://github.com/ysalitrynskyi/opn-mcp{
"mcpServers": {
"opn-mcp": {
"command": "node",
"args": ["/path/to/opn-mcp/dist/index.js"],
"env": {
"OPN_API_KEY": "<opn_api_key>"
}
}
}
}OPN_API_KEYMCP Servers overview
# opn-mcp
An [MCP](https://modelcontextprotocol.io) server for **[opn.onl](https://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):
```json
{
"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.
> Not published to npm yet? Use the GitHub source instead — same config, just swap the `args`:
> `"args": ["-y", "github:ysalitrynskyi/opn-mcp"]` (it builds on install).
### Self-hosted instance
Point `OPN_BASE_URL` at your own instance's API host:
```json
{
"mcpServers": {
"opn": {
"command": "npx",
"args": ["-y", "opn-mcp"],
"env": {
"OPN_API_KEY": "opn_your_key_here",
"OPN_BASE_URL": "https://l.your-domain.com"
}
}
}
}
```
## Configuration
| Env var | Required | Default | Description |
|---------|----------|---------|-------------|
| `OPN_API_KEY` | ✅ | — | Your API key (`opn_…`), from Settings → API Keys |
| `OPN_BASE_URL` | — | `https://l.opn.onl` | API base URL — set this for a self-hosted instance |
## Tools
| Tool | Description |
|------|-------------|
| `shorten_url` | Create a short link (url, optional alias / title / expiry / password) |
| `list_links` | List your links (limit, offset, search) |
| `get_link_stats` | Click analytics for a link (geo, devices, browsers, referrers) |
| `update_link` | Update a link's destination, title, expiry or password |
| `delete_link` | Delete a link |
| `get_qr_code` | Get a link's QR image — optional brand colour, centre logo, PNG/SVG |
| `check_url_health` | Check 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
```bash
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](https://github.com/ysalitrynskyi/opn.onl) project.
What people ask about opn-mcp
What is ysalitrynskyi/opn-mcp?
+
ysalitrynskyi/opn-mcp is mcp servers for the Claude AI ecosystem. MCP server for opn.onl — shorten links, read analytics & manage links from AI assistants. Works with the hosted service or your self-hosted instance. It has 0 GitHub stars and was last updated today.
How do I install opn-mcp?
+
You can install opn-mcp by cloning the repository (https://github.com/ysalitrynskyi/opn-mcp) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is ysalitrynskyi/opn-mcp safe to use?
+
ysalitrynskyi/opn-mcp has not been audited yet by our security agent. Review the original repository on GitHub before using it in production.
Who maintains ysalitrynskyi/opn-mcp?
+
ysalitrynskyi/opn-mcp is maintained by ysalitrynskyi. The last recorded GitHub activity is from today, with 0 open issues.
Are there alternatives to opn-mcp?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy opn-mcp to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/ysalitrynskyi-opn-mcp)<a href="https://claudewave.com/repo/ysalitrynskyi-opn-mcp"><img src="https://claudewave.com/api/badge/ysalitrynskyi-opn-mcp" alt="Featured on ClaudeWave: ysalitrynskyi/opn-mcp" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
The fastest path to AI-powered full stack observability, even for lean teams.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。