
Opn Mcp
io.github.ysalitrynskyi由 GitHub 账号 ysalitrynskyi 发布v1.2.0更新于 Oct 24, 2026
MCP server for opn.onl: shorten links, analytics, branded QR codes, and link management.
概览
让助手在 opn.onl 或自建实例上缩短链接、读取点击分析、生成品牌二维码并管理链接。
- 可以做什么
- 这是 opn.onl(开源短链接服务)的 MCP 服务器。它提供创建短链接的工具(支持别名、标题、备注、定时、点击上限、密码、阅后即焚、文件夹和标签)、批量缩短、列出、更新、删除、克隆和置顶链接,以及检查别名是否可用。它还能读取单条链接和账户整体的分析数据(点击、独立访客、地域、设备、来源),返回可设品牌颜色和中心标志的二维码图片,并提供链接健康检查、UTM 构建、Open Graph 元数据预览以及标签和文件夹管理。
- 适用场景
- 适合让助手用自然语言创建和整理短链接、执行批量缩短活动,或查询链接与账户分析数据。也适合自建 opn.onl 实例、希望在 Claude Desktop 或 Cursor 等 MCP 客户端内管理链接的团队。
- 运行要求
- 以 stdio 方式在本地运行,通常通过 npx opn-mcp 启动,因此需要 Node.js。需要 opn.onl 的 API 密钥,放在 OPN_API_KEY 中,可在 Settings → API Keys 创建。默认连接托管 API;自建实例需将 OPN_BASE_URL 设为自有实例的 API 地址。需要能访问该 API 的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Opn Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
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):
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:
Configuration
Tools
Links
Analytics
QR & URL helpers
Tags & folders
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
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): - Publish to the MCP registry (as GitHub user
ysalitrynskyi):
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.
来源:README.md,提交 1c4baa0
工具
0版本历史
1- v1.2.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分