LinkBit

io.github.yutotanakastarv1.0.3更新于 Oct 2, 2026

Shorten URLs, bulk create, QR, and click analytics for LinkBit.

概览

AI 生成的概览

让助手创建和管理 LinkBit 短链接、生成二维码并读取点击分析数据。

功能
封装 LinkBit REST API,让助手可以缩短单个或多个网址,并可选设置 slug、备注和 UTM 参数。它可以列出链接、更新或停用链接、永久删除链接,并生成 PNG 或 SVG 二维码,包括打印版本。它还能返回单条链接的国家、设备、来源和每日统计,以及账户级别的分析概览。
适用场景
适合在聊天或智能体工作流中完成链接创建和活动跟踪,例如为营销网址添加 UTM 参数并缩短、查看某条链接的点击量,或生成用于印刷的二维码。它更偏向营销和内容场景,而非通用开发任务。
运行要求
通过 npx 从 npm 包 linkbit-mcp 以 stdio 方式在本地运行,需要 Node.js 18 或更高版本。需要 LinkBit 账户,并通过 API_KEY 环境变量提供 API 密钥;APP_URL 设置 API 地址,默认指向 LinkBit 站点。需要能访问 LinkBit API 的网络。
安装前请注意
API_KEY 是 LinkBit 密钥,应保存在环境变量中,不要外泄。多个工具会修改或删除数据:update_link 会修改链接,disable_link 会停止跳转,delete_link 是永久删除;disable_link 和 delete_link 都被标记为破坏性操作。链接和分析数据会发送到 LinkBit 服务。

安装

在 SourceWeft 中

  1. 打开 控制台中的 LinkBit,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

linkbit-mcp

MCP server for LinkBit: shorten links, bulk create, QR codes, and click analytics from Claude, ChatGPT, Cursor, and n8n.

Public docs: linkbit.live/docs · linkbit.live/mcp

Setup

  1. Sign in at linkbit.live and create an API key (slk_...) on the API Keys page.
  2. Node.js 18+ is required (fetch).
APP_URL=https://linkbit.liveAPI_KEY=slk_your_key

Auth against the REST API uses either Authorization: Bearer slk_... or x-api-key: slk_.... This server sends Bearer.

Install

bash
npx -y linkbit-mcp

Claude Code:

bash
claude mcp add linkbit -e API_KEY=slk_your_key -e APP_URL=https://linkbit.live -- npx -y linkbit-mcp

Claude Desktop / Cursor (mcp.json):

json
{  "mcpServers": {    "linkbit": {      "command": "npx",      "args": ["-y", "linkbit-mcp"],      "env": {        "APP_URL": "https://linkbit.live",        "API_KEY": "slk_your_key"      }    }  }}

Example prompts

  • Shorten https://example.com/campaign as slug spring and utm_source newsletter
  • List my links and show clicks for the first id since 2026-01-01
  • Disable link <id> then generate a print PNG QR

Tools

ToolParametersNotes
shorten_urldestination (required), slug, note, utm_source, utm_medium, utm_campaign, utm_term, utm_contentExisting utm_* on the URL are not overwritten; #fragment is kept
shorten_urlsurls[] with the same fieldsBulk create
list_links—Newest first
update_linkid, optional destination/slug/note/UTM/disabledPATCH
disable_linkid, optional disabled (default true)Stops redirects. destructiveHint: true
delete_linkidPermanent. destructiveHint: true
get_qrid, format png|svg, color, logo, printPNG as an image block when possible
get_link_statsid, optional from, to (YYYY-MM-DD)Countries, devices, referrers, daily
get_analytics—Account overview

Errors

Tool failures (missing key, 401, invalid URL, daily limit, unsafe destination) are returned as tools/call with isError: true so the model can explain them. Protocol errors (unknown method, bad JSON) stay JSON-RPC errors.

  • 401 — API key missing or wrong (slk_...). Create a key under API Keys.
  • 400 — invalid URL, slug taken, daily create limit, blocked or unsafe destination.
  • 404 — unknown link id.
  • Process fails at start if Node is older than 18 (fetch is required).

n8n, Make, and custom agents can also call /api/v1 with the same headers.

Local development (ShortLinks monorepo)

Until npm publish, Cursor can run the copy in this folder:

  1. Copy mcp/cursor.mcp.json.example to .cursor/mcp.json (gitignored) or ~/.cursor/mcp.json.
  2. Paste the slk_… key into env.API_KEY.
  3. For this repo before publish, use "command": "node" and "args": ["mcp/src/index.js"].

来源:README.md,提交 d78ba38

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v1.0.3最新Oct 2, 2026