Linkwarden MCP

io.github.flumpiey由 GitHub 账号 flumpiey 发布v0.1.6更新于 Oct 28, 2026

Read-first Linkwarden bookmarks MCP with opt-in write, delete, and collection tools.

已验证STDIO仅桌面效率与工作流知识与记忆

概览

AI 生成的概览

面向自建 Linkwarden 书签库的只读优先 MCP 服务器,让助手搜索、阅读并整理链接、收藏集和标签,写入与删除工具需显式开启。

可以做什么
  • 搜索、读取和查看链接,包括保存的网页正文与完整元数据
  • 列出收藏集和标签及其链接数量,并给出库总览:总量、空收藏集、未使用标签
  • 整理与清理:找出未分类或重复链接、推荐收藏集与标签、比较收藏集重叠、检查结构问题
  • 开启写入范围后,可保存、移动、重新打标签链接,排队归档,并创建收藏集
  • 仅在设置对应删除范围时,才可删除链接、标签、收藏集或合并标签
适用场景
适合把书签存放在 Linkwarden 实例中,并希望助手回答关于书签的问题或帮忙清理未整理收件箱的人。默认只读,也适合先只做查询、之后再决定是否开启写入的谨慎用户。
运行要求
本机需有 Python 运行环境与 uv/uvx(Python 3.10 及以上),以及可访问的 Linkwarden 实例。需设置 LINKWARDEN_API_URL 为实例基础地址,LINKWARDEN_API_KEY 为在 Linkwarden 设置中创建的访问令牌。可选的 LINKWARDEN_MCP_WRITE_SCOPES 与 LINKWARDEN_MCP_DELETE_SCOPES 决定注册哪些写入/删除工具。仅支持 stdio 传输。
安装前请注意
LINKWARDEN_API_KEY 是能访问书签库的 Bearer 令牌,不要写入会提交的配置文件,生产环境建议使用密钥管理器。开启写入或删除范围会暴露修改或删除数据的工具,包括破坏性的标签合并与收藏集删除;批量操作默认 dry_run=true,确认方案后再设为 false。删除范围不会由写入范围自动推导。一个进程只对应一个实例地址。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[Linkwarden]

linkwarden-mcp

MCP server for self-hosted Linkwarden: ask your AI about bookmarks, collections, and tags.

[License: MIT] [Python] [MCP] [CI] [PyPI]

What is Linkwarden?

Linkwarden is a self-hosted, open-source bookmark manager. You collect, organize, annotate, and preserve webpages in one place, with full-page archives so content stays readable after the original page disappears. It also supports collaboration and public sharing.

This project wires the Linkwarden HTTP API into the Model Context Protocol so Cursor, Claude, VS Code Copilot, and other MCP hosts can query your live library in natural language.

Useful Linkwarden links:

What this server does

Default is read-only. You get:

  • 18 read tools - discovery (list_resources), six core reads (search, get, preserved content, collections, tags, overview), and eleven triage/hygiene workflows
  • Task tools (opt-in) - intent-shaped writes such as save_link, smart_save_link, organise_links, create_collection, apply_triage_plan (register when matching write scopes are set)
  • Delete tools (opt-in) - delete_links, delete_tags, merge_tags, delete_collection (register only under delete scopes; never implied by write)
  • Hard denylist - tokens, session, auth, user admin (except GET /api/v1/users/me), migration, and whole-instance preservation stay blocked even when writes are on

Transport is stdio. No HTTP server. No global install required if you use uv / uvx.

Branding / icons

Four surfaces (keep them in sync when the mark changes):

  1. stdio hosts (Cursor, Claude Desktop via mcp.json): serverInfo.icons from server_icons() — embedded data URI from src/linkwarden_mcp/assets/icon.png, plus HTTPS fallback docs/icon-512.png (https://raw.githubusercontent.com/flumpiey/linkwarden-mcp/main/docs/icon-512.png). website_url is https://linkwarden.app/.
  2. Cursor plugin: .cursor-plugin/plugin.json logo → docs/linkwarden-icon.svg.
  3. Claude Desktop Extension: mcpb/icon.png (packed with npx @anthropic-ai/mcpb pack mcpb).
  4. Claude.ai remote connectors: Claude.ai ignores serverInfo.icons and uses the root-domain favicon of the connector URL. If you host a remote MCP later, serve docs/favicon.ico at the registrable domain root (e.g. https://acme.com/favicon.ico for https://mcp.acme.com/...).

server.json registry metadata also points its icons[0].src at the same raw docs/icon-512.png URL.

Requirements

  • Python ≥ 3.10 (pulled in automatically by uvx)
  • uv (provides uvx)
  • A reachable Linkwarden instance: LINKWARDEN_API_URL + LINKWARDEN_API_KEY

Access token

  1. Sign in to your Linkwarden instance (self-hosted or Cloud).
  2. Open Settings → Access Tokens (or go to /settings/access-tokens).
  3. Create a New Access Token, give it a name, and copy the value into LINKWARDEN_API_KEY.
  4. Set LINKWARDEN_API_URL to your instance base URL (usually without /api/v1; include /api/v1 only if your deployment requires it), e.g. https://links.example.com or local Docker http://127.0.0.1:3000.

linkwarden-mcp sends the token as Authorization: Bearer …. API overview: API Introduction.

Copy .env.example to .env for local runs — never commit .env. Prefer the Cursor plugin Configure UI for credentials, or a secret manager in production.

Quick start

Run the PyPI package with uvx:

bash
uvx linkwarden-mcp

Paste a client config below, set LINKWARDEN_API_URL / LINKWARDEN_API_KEY, restart the host, then ask: “Find my unread bookmarks about Python” or “What's in my Dev collection?”

From a git clone (dev): uvx --from git+https://github.com/flumpiey/linkwarden-mcp linkwarden-mcp or uv run --directory /path/to/linkwarden-mcp linkwarden-mcp.

Installation

Configs below pull linkwarden-mcp from PyPI. Leave write-scope env vars unset for read-only.

Cursor

Plugin (Configure UI for URL, key, and scopes): this repo is a Cursor plugin via .cursor-plugin/plugin.json + root mcp.json.

  1. Symlink or copy the clone to ~/.cursor/plugins/local/linkwarden-mcp (Windows: %USERPROFILE%\.cursor\plugins\local\linkwarden-mcp).
    • macOS / Linux: ln -s /path/to/linkwarden-mcp ~/.cursor/plugins/local/linkwarden-mcp
    • Windows: Cursor does not follow symlinks for local plugins. Use a junction or copy instead:
      bat
      mklink /J "%USERPROFILE%\.cursor\plugins\local\linkwarden-mcp" "E:\Development\linkwarden-mcp"
      or:
      bat
      robocopy "E:\Development\linkwarden-mcp" "%USERPROFILE%\.cursor\plugins\local\linkwarden-mcp" /E
  2. Reload the window.
  3. Open Plugins → Configure on linkwarden-mcp. Set Linkwarden API URL and Linkwarden API key. Leave Write scopes / Delete scopes empty for read-only, or paste a CSV such as links,collections.
  4. Confirm the linkwarden MCP server is enabled under Customize / MCP.

Marketplace listing is a separate submit at cursor.com/marketplace/publish.

Manual mcp.json: project .cursor/mcp.json or user-wide ~/.cursor/mcp.json. Root mcp.json is plugin wiring with ${…} placeholders only — never commit real secrets there.

From PyPI:

json
{  "mcpServers": {    "linkwarden": {      "type": "stdio",      "command": "uvx",      "args": ["linkwarden-mcp"],      "env": {        "LINKWARDEN_API_URL": "https://links.example.com",        "LINKWARDEN_API_KEY": "your-token"      }    }  }}

Local editable (dev):

json
{  "mcpServers": {    "linkwarden": {      "type": "stdio",      "command": "uv",      "args": ["run", "--directory", "/path/to/linkwarden-mcp", "linkwarden-mcp"],      "env": {        "LINKWARDEN_API_URL": "https://links.example.com",        "LINKWARDEN_API_KEY": "your-token"      }    }  }}

Optional scoped writes in the env block:

json
"LINKWARDEN_MCP_WRITE_SCOPES": "links,collections","LINKWARDEN_MCP_DELETE_SCOPES": "links"

Restart Cursor after saving. Confirm linkwarden under MCP settings.

Claude Desktop

Desktop Extension (.mcpb): download mcpb.mcpb from GitHub Releases. Use v0.1.5+ (needs uv on PATH). Launch is uv tool run --python 3.12 linkwarden-mcp. Do not put the PyPI package in mcpb/pyproject.toml dependencies — Claude Desktop syncs that file at install and can fail on system Python 3.13.

  1. Open Claude Desktop → Settings → Extensions.
  2. Open Advanced settings → Install Extension…
  3. Select mcpb.mcpb. Review permissions, enter Linkwarden API URL and Linkwarden API key, then click Install.
  4. Leave Write scopes and Delete scopes empty for read-only.
  5. Restart Claude Desktop if tools do not appear.

Build your own bundle from a clone:

bash
npx @anthropic-ai/mcpb pack mcpb

On Windows, double-click often does nothing and dragging the file into chat attaches it to the conversation instead of installing it. Use Install Extension… in Settings.

Manual claude_desktop_config.json fallback: edit the Claude Desktop config, then restart the app.

OSPath
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json
json
{  "mcpServers": {    "linkwarden": {      "command": "uvx",      "args": ["linkwarden-mcp"],      "env": {        "LINKWARDEN_API_URL": "https://links.example.com",        "LINKWARDEN_API_KEY": "your-token"      }    }  }}

Local clone:

json
{  "mcpServers": {    "linkwarden": {      "command": "uv",      "args": ["run", "--directory", "/path/to/linkwarden-mcp", "linkwarden-mcp"],      "env": {        "LINKWARDEN_API_URL": "https://links.example.com",        "LINKWARDEN_API_KEY": "your-token"      }    }  }}
Claude Code

Add via CLI:

bash
claude mcp add linkwarden --env LINKWARDEN_API_URL=https://links.example.com --env LINKWARDEN_API_KEY=your-token -- uvx linkwarden-mcp

Or edit ~/.claude.json / project MCP config:

json
{  "mcpServers": {    "linkwarden": {      "command": "uvx",      "args": ["linkwarden-mcp"],      "env": {        "LINKWARDEN_API_URL": "https://links.example.com",        "LINKWARDEN_API_KEY": "your-token"      }    }  }}
VS Code / GitHub Copilot

Create .vscode/mcp.json in the project root:

json
{  "servers": {    "linkwarden": {      "type": "stdio",      "command": "uvx",      "args": ["linkwarden-mcp"],      "env": {        "LINKWARDEN_API_URL": "https://links.example.com",        "LINKWARDEN_API_KEY": "your-token"      }    }  }}

Local editable:

json
{  "servers": {    "linkwarden": {      "type": "stdio",      "command": "uv",      "args": ["run", "--directory", "/path/to/linkwarden-mcp", "linkwarden-mcp"],      "env": {        "LINKWARDEN_API_URL": "https://links.example.com",        "LINKWARDEN_API_KEY": "your-token"      }    }  }}

Reload the window. Open Copilot Chat and confirm the linkwarden tools are available.

Windsurf

Edit ~/.codeium/windsurf/mcp_config.json (macOS/Linux) or the Windsurf MCP settings UI:

json
{  "mcpServers": {    "linkwarden": {      "command": "uvx",      "args": ["linkwarden-mcp"],      "env": {        "LINKWARDEN_API_URL": "https://links.example.com",        "LINKWARDEN_API_KEY": "your-token"      }    }  }}

Restart Windsurf after saving.

Zed

Add under context_servers in Zed settings.json (Agent Panel → settings also works):

json
{  "context_servers": {    "linkwarden": {      "command": "uvx",      "args": ["linkwarden-mcp"],      "env": {        "LINKWARDEN_API_URL": "https://links.example.com",        "LINKWARDEN_API_KEY": "your-token"      }    }  }}
Cline

Edit the Cline MCP settings file (cline_mcp_settings.json via the Cline MCP UI):

json
{  "mcpServers": {    "linkwarden": {      "command": "uvx",      "args": ["linkwarden-mcp"],      "env": {        "LINKWARDEN_API_URL": "https://links.example.com",        "LINKWARDEN_API_KEY": "your-token"      }    }  }}
Continue

In .continue/config.yaml:

yaml
mcpServers:  - name: linkwarden    command: uvx    args:      - linkwarden-mcp    env:      LINKWARDEN_API_URL: https://links.example.com      LINKWARDEN_API_KEY: your-token
Generic / any stdio MCP host

Any host that can spawn a stdio MCP server:

FieldValue
Commanduvx
Argslinkwarden-mcp
EnvLINKWARDEN_API_URL, LINKWARDEN_API_KEY (+ optional write scopes)
bash
uvx linkwarden-mcp

Dev from a clone: uv run --directory /path/to/linkwarden-mcp linkwarden-mcp.

npx only runs npm packages. This is a Python package; use uvx.

Environment

VariableRequiredNotes
LINKWARDEN_API_URLyesBase URL (include /api/v1 only if required; typical: https://links.example.com)
LINKWARDEN_API_KEYyesAccess token from Settings → Access Tokens; sent as Authorization: Bearer; never logged
LINKWARDEN_MCP_WRITE_SCOPESnoComma-separated domains for create/update. Empty = no writes.
LINKWARDEN_MCP_DELETE_SCOPESnoComma-separated domains for delete only. Never implied by WRITE_SCOPES.
LINKWARDEN_MAX_BULKnoMax records per bulk op (default 25)
TEST_LINKWARDEN_API_URLintegration onlyLive sandbox URL for pytest -m integration
TEST_LINKWARDEN_API_KEYintegration onlyLive sandbox token for pytest -m integration

Valid scopes: links, collections, tags, raw. No wildcards (*, all). raw expands effective scopes to all domain scopes (escape hatch).

Recommended (covers most bookmark workflows without every mutating tool):

json
"LINKWARDEN_MCP_WRITE_SCOPES": "links,collections","LINKWARDEN_MCP_DELETE_SCOPES": "links"

Default with no scopes: 18 tools. All three domain scopes in WRITE and DELETE: 31 tools.

Legacy LINKWARDEN_MCP_ALLOW_WRITES / ALLOW_WRITES / LINKWARDEN_MCP_WRITES hard-fail if set. Use the scoped vars instead.

MCP host env (.cursor/mcp.json or Cursor plugin Configure) must match process env / .env or scope behavior drifts.

See .env.example. Never commit .env. Prefer Cursor plugin Configure UI or a secret manager in production.

Write scopes and task tools

When a scope is listed in LINKWARDEN_MCP_WRITE_SCOPES, the server registers task tools for that domain. LINKWARDEN_MCP_DELETE_SCOPES enables delete/merge tools per domain. Call list_resources to inspect read_only, scope lists, and the live boundary string.

ToolScopesPurpose
save_linkWRITE linksSave a URL into a collection (by name)
smart_save_linkWRITE linksSave with optional heuristic collection/tags
organise_linksWRITE linksMove or retag multiple links
update_linkWRITE linksUpdate link fields (read-modify-write)
queue_archiveWRITE linksQueue preservation (async; not immediate)
apply_triage_planWRITE linksApply [{link_id, collection?, tags?}]; default dry_run=true
bulk_sort_by_rulesWRITE linksMatch domain_pattern rules then organise; default dry_run=true
create_collectionWRITE collectionsCreate a collection (optional parent)
auto_tag_by_domainWRITE links + tagsApply domain→tag rules; default dry_run=true
delete_linksDELETE linksDelete multiple links
delete_tagsDELETE tagsDelete tags by id or name
merge_tagsDELETE tagsMerge tags into a new name (destructive)
delete_collectionDELETE collectionsDelete a collection after user chooses delete/move/cancel for its links (elicitation or on_links)

Example with recommended scopes only:

json
"LINKWARDEN_MCP_WRITE_SCOPES": "links,collections","LINKWARDEN_MCP_DELETE_SCOPES": "links"

Denylist (always blocked): /api/v1/tokens, /api/v1/session, /api/v1/auth, /api/v1/users/** (except GET /api/v1/users/me), migration, and whole-instance preservation worker actions.

Tools

Read tools

Always registered (18 total).

ToolPurpose
list_resourcesDiscovery; reports read_only + live write/delete scopes
search_linksSearch by query, collection, tag, or pin status
get_linkFull metadata for one link
read_link_contentPreserved plain text (textContent or archive fallback)
list_collectionsCollections with link counts
list_tagsTags with link counts
get_library_overviewTotals, empty collections, unused tags
suggest_collection_for_urlHeuristic collection suggestions for a URL
suggest_tags_for_linkSuggest existing-library tags (never invents names)
find_unsorted_linksList unsorted links (default collection: Unorganized)
triage_linksPropose collection/tags for link ids (no writes)
find_duplicate_linksGroup links with the same normalized URL
recommend_collection_for_linksConsensus collection for a batch of links
suggest_links_for_collectionFind links elsewhere that likely belong
analyze_collection_overlapCompare two collections for shared domains/tags/URLs
suggest_collection_structureHygiene: empty, near-duplicate names, overcrowded
align_tags_with_similar_linksTags used on similar-domain links
get_sorting_dashboardOne-shot triage: unsorted, duplicates, empty, largest

Write tools

Registered only when matching scopes are set (see table above). Prefer smart_save_link / triage tools over raw field edits when you are sorting an inbox.

PatternRequiresNotes
Link create/update/organise/archiveWRITE linksIncludes workflow writers with dry_run defaults
Collection createWRITE collectionsOptional parent by name
Domain auto-tagWRITE links + tagsOnly existing tag names
Deletes / tag mergematching DELETE scopeDestructive; confirm ids first

Agent Skill

Companion skill: skills/linkwarden-bookmarks/SKILL.md.

The Cursor plugin discovers this skill from skills/. Without the plugin, copy or symlink that folder into your agent skills path. It tells the model to call list_resources first, verify after writes, and which workflow tools to prefer.

Development

bash
uv sync --extra devnpm install          # installs lefthook + commitlint; registers git hooksuv run linkwarden-mcp

Offline tests only (respx). No live Linkwarden required:

bash
uv run ruff check src testsuv run pytest

Git hooks (lefthook)

Hook / commandWhat it runs
pre-commitruff check + full pytest (mocked suite)
commit-msgcommitlint Conventional Commits
npm run pre-publishensure build/twine → ruff → pytest → sdist contents → python -m build → twine check → npx @anthropic-ai/mcpb pack mcpb

Commit messages must follow Conventional Commits, e.g. feat(api): add delete_links tool.

Run the local publish gate before tagging a release:

bash
npm run pre-publish

GitHub Actions matrix: Python 3.10 and 3.12.

Caveats

  • One process ↔ one LINKWARDEN_API_URL. Multi-instance routing is out of scope.
  • Multi-user / team disambiguation on a shared instance is unverified. Do not claim multi-tenant support until validated against a live shared library.
  • Collection/tag suggestions are heuristic and library-local; they do not invent new tag names.
  • Bulk mutating workflows default to dry_run=true; set dry_run=false only after you review the plan.
  • ChatGPT Apps need a hosted HTTP MCP endpoint. This package is stdio-only.

License

MIT. See LICENSE.

来源:README.md,提交 e389df4

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.6最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分