
Linkwarden
io.github.ni-c由 GitHub 账号 ni-c 发布v0.4.0更新于 Oct 24, 2026
MCP server for Linkwarden, the self-hosted bookmark manager with page preservation
概览
Linkwarden 书签管理器的 MCP 服务器,让助手搜索和整理书签,并读取已保存页面的全文。
- 可以做什么
- 搜索和列出书签,支持标签、收藏集、时间等筛选条件,并获取单个书签的标签、收藏集和已保存格式。读取已保存页面的文章全文,长文会分段提供。列出和查看收藏集、标签、仪表板、RSS 订阅、当前账号,以及管理员可见的保存队列统计。新增书签、修改标题描述标签收藏集、置顶书签。创建、改名、移动或发布收藏集,创建、改名、合并或删除标签,管理 RSS 订阅。删除书签、批量更新或删除、重新保存页面、删除保存副本,破坏性操作会要求人工确认。
- 适用场景
- 当你使用自建的 Linkwarden 书签服务,想让助手搜索、整理书签,或直接读取已保存页面的全文来摘要和引用时适用。只想只读时可开启只读模式。
- 运行要求
- 需在本机运行 Node.js 22 以上(或使用容器镜像),并连接到一个运行中的 Linkwarden 实例。需设置 LINKWARDEN_URL(不含 /api/v1)和 LINKWARDEN_TOKEN(在设置中的访问令牌页面创建)。建议使用 https。
安装
在 SourceWeft 中
- 打开 控制台中的 Linkwarden,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
linkwarden-mcp
[CI]
[OpenSSF Scorecard]
[Socket Badge]
[Glama score]
[npm version]
[container image]
[HTTP via mcp-hub]
[docs]
[sponsor]
A Model Context Protocol (MCP) server for Linkwarden, the self-hosted bookmark manager that keeps a permanent copy of every page it saves.
Lets MCP clients like Claude Code, Claude Desktop or Codex search a bookmark collection, organise it into collections and tags, and read the preserved article text of a saved page, so a link that has been archived can be summarised or quoted without fetching the live site again.
Twenty-eight tools is the ceiling, not the floor: LINKWARDEN_ALLOW_TOOLS=essential
registers a curated eight instead, and a model picks the right tool far more reliably
from eight than from twenty-eight — see
choosing which tools load.
Note: Linkwarden's published API reference is incomplete. This server was written against the routes in
apps/web/pages/api/v1/**and the request schemas inpackages/lib/schemaValidation.tsof linkwarden/linkwarden, verified against v2.16.0 on 2026-08-17. Those two files are the source of truth for every tool here.
What makes it different
Reads what Linkwarden preserved. Linkwarden keeps a permanent copy of every
page it saves. get_link_content serves that article text, so a saved link can be
summarised or quoted without fetching the live site again — and long articles are
sliced, not dumped.
Organises without clobbering. Linkwarden's update routes replace whole records. This server reads the current state and merges, so changing a title never silently strips a link's tags or a collection's collaborators.
Output is an allowlist. Linkwarden returns whole Prisma rows; every field in a result here is named explicitly. Article text stays out of list results, collection members' names and e-mail addresses are dropped, and a column added by a future release cannot land in the model's context unannounced.
Requirements
- Node.js ≥ 24
- A running Linkwarden instance
- An access token, created under Settings → Access Tokens
Linkwarden has no per-token scopes: a token carries the full permissions of the account that created it. Create a dedicated account with access only to the collections this server should see rather than handing it an admin token.
Configuration
Use
https://. Over plain http the token travels unencrypted; the server prints a warning unless the host is local. For a self-signed certificate prefer a proper internal CA overLINKWARDEN_INSECURE_TLS.
The token is removed from the process environment once it has been read, so it is not
visible to child processes or in /proc/<pid>/environ.
Without credentials the server still starts and lists its tools, so registries and inspectors can introspect it; every call then fails with setup instructions instead of reaching the API.
Choosing which tools load
LINKWARDEN_ALLOW_TOOLS and LINKWARDEN_DENY_TOOLS take comma-separated tool names;
a trailing * matches a whole family. essential is a curated preset of eight —
save, find and read — marked as such in the
tool reference.
An entry that matches no tool aborts startup and names it, so a typo cannot silently
hide a tool — an absent tool is not something anyone traces back to an environment
variable. A filtered tool is never registered, so it is absent from tools/list and
unknown to tools/call alike, exactly like a write tool under LINKWARDEN_READ_ONLY.
If you run several of these servers at once, mcp-hub is the
other answer — its /hub endpoint replaces every server's tools with six meta-tools.
Installation
Claude Code
Claude Desktop
Codex
From source
Docker
Through mcp-hub
A client that cannot spawn a local process — ChatGPT connectors, Claude on the web,
Cursor, LibreChat — reaches linkwarden-mcp through mcp-hub: one
container serves many stdio MCP servers over Streamable HTTP, with an OAuth 2.1 login
behind a single password and long-lived tokens for the clients that cannot do OAuth. Its
/hub endpoint puts every server behind six meta-tools, so one connector reaches all of
them without N×tool schemas in the model's context, and it speaks both protocol revisions
— a question this server asks travels through it to the person at the far end.
Its /config/mcp.json uses Claude Code's format, so the entry is the one you already
have:
allowTools and denyTools there are the hub's own per-server filter, which is not
the same thing as *_ALLOW_TOOLS in env — the difference, and the mistake it invites,
are in the client guide.
Tools
Every tool declares an outputSchema and answers with structuredContent
alongside the text block, so a client can use the result without parsing prose.
Seven tools that answered with a sentence — "Link 42 deleted." — now answer
with the fields as well, and the sentence stays in the text block.
The ten reading tools carry untrusted: true and source: "linkwarden" as
fields. Bookmark titles, descriptions and above all the preserved article text
are written by whoever controls the target site; this server has always said so
in notes, which is prose a client can read but not check, and the field is
what makes it checkable. The write tools are without it: they report an id this
server was given and a count it made.
An over-budget result still drops list entries, and an oversized untrusted envelope still loses characters from its largest field. Where neither leaves anything to give it is now an error rather than an envelope carrying the oversized document as a string: that envelope is valid JSON and not a valid answer, since the SDK checks a result against the schema its tool declares.
Reading
Writing
Not registered at all when LINKWARDEN_READ_ONLY=true. Tools marked 👤 ask a
person through MCP elicitation — a dialog the model cannot answer on its behalf —
and fall back to a two-call confirm_token where the client cannot show one. See
Asking a person.
Not exposed, on purpose
- Access-token management (
/tokens). A tool that can mint API credentials is a privilege-escalation surface, and a bookmark server has no business holding one. - User administration (
/users, account deletion). Out of scope. - Backup export and import (
/migration). The export dumps the whole instance into the model's context; the import can destroy it. - Highlights. Creating one needs exact character offsets into the preserved document, which a model cannot produce meaningfully, and Linkwarden offers no route to list existing highlights.
- Archive uploads and the signed
preservedURLs, which needNEXT_PUBLIC_USER_CONTENT_DOMAINto be configured. - The deprecated
GET /linkslisting route —search_linksusesGET /searchinstead, which is what Linkwarden itself recommends.
Safety
- Destructive tools ask a person. Where the client supports MCP elicitation they
raise a real dialog that the model cannot answer on its behalf. Where it does not,
the first call returns a short-lived token bound to the exact target and only a
second call carrying it performs the operation — which proves the call was made
twice with the same arguments and nothing more, and the text says so. An approval
issued for one link, tag set or change cannot be replayed for another.
ELICITATION=falsetakes that fallback deliberately; it never removes the guard. - Losing something is not only deletion. Publishing a collection, changing a link's URL — which deletes every preserved copy of the old page — and renaming a tag, which follows every link that carries it, are all asked about.
- Confirmation prompts never quote content from Linkwarden. Titles, URLs, descriptions and collection names come from saved pages and from other users of the instance; only counts and ids appear in the text a model reads.
- Bookmarked URLs are checked before Linkwarden fetches them.
create_link,update_linkandcreate_rss_subscriptionhand a URL to a server that opens it in a headless browser — andget_link_contentreads the result back, which makes an unchecked URL a way to read from inside Linkwarden's network. Loopback and link-local addresses, including the cloud metadata endpoints and their hostnames, are refused; addresses are compared numerically, so an IPv4-mapped literal such as[::ffff:169.254.169.254]is caught too, and a hostname is resolved before it is accepted. Private LAN addresses stay allowed — bookmarking the router's interface or an intranet page is a normal thing to do with a self-hosted bookmark manager, which also means a container beside Linkwarden is reachable; SECURITY.md says what the check does and does not cover, including the entries inside an RSS feed. - Returned content is marked as untrusted data, in particular the preserved article text, which is written by whoever controls the target site.
- Partial updates never clear fields. Linkwarden's update routes replace the whole record, so this server reads the current state and merges — otherwise an update would silently strip a link's tags or a collection's collaborators.
- A 200 is not trusted on its own. Several Linkwarden routes report failures with HTTP 200 and an error sentence in the body, and a route without a handler for the method used answers 200 with nothing at all. Both are reported as errors rather than as a successful write.
- Error bodies are truncated, HTML error pages are dropped entirely, redirects are never followed (so the bearer token cannot be replayed to another host), and every request carries a timeout.
LINKWARDEN_READ_ONLY=truedoes not register the write tools at all.- Residual risk: within the permissions of the token you configure, a model that is asked to do something destructive and is confirmed by a user can still do it. Scope the account, and keep host-level permission prompts on.
Documentation
The full guide, tool reference and security notes live at
linkwarden-mcp.ni-c.de (source in docs/).
Development
docs/reference/tools.md is generated; CI fails if the committed copy no longer
matches the code. The documentation site lives in docs/ with its own
package.json and lockfile — VitePress must not end up in the root install, which runs
in the Docker build and across the whole test matrix.
See CONTRIBUTING.md.
Releasing
Everything is driven by a tag; there is no manual publish step.
-
Move the
[Unreleased]section of CHANGELOG.md to the new version and date it. The release workflow extracts that section withawk, so the## [x.y.z]heading shape matters. -
Bump
versioninpackage.json. -
npm run lint && npm run build && npm run test:coverage. -
Commit, then a signed annotated tag:
release.yml then verifies the tag matches package.json, publishes to npm over
Trusted Publishing (OIDC — no npm token exists to leak) with provenance, syncs the
version into both server.json package entries, publishes to the MCP registry, and
cuts the GitHub release from the changelog section. ci.yml pushes the multi-arch
container image to GHCR in parallel.
If the registry step fails, fix it on main and run the mcp-registry.yml workflow by
hand. Re-running the failed job is not an option: it checks out the immutable tag, so a
fix on main could never reach it.
Contributing
Issues, discussions and pull requests are welcome — see CONTRIBUTING.md. For vulnerabilities please use private reporting rather than a public issue; the policy is in SECURITY.md.
License
MIT © Willi Thiel
来源:README.md,提交 e90f5b4
工具
0版本历史
1- v0.4.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分