MCP server for Linkwarden bookmarks: read-first search and preserved content, with opt-in write, delete, and collection-delete tools.
Project description
linkwarden-mcp
MCP server for self-hosted Linkwarden: ask your AI about bookmarks, collections, and tags.
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):
- stdio hosts (Cursor, Claude Desktop via
mcp.json):serverInfo.iconsfromserver_icons()— embedded data URI fromsrc/linkwarden_mcp/assets/icon.png, plus HTTPS fallbackdocs/icon-512.png(https://raw.githubusercontent.com/flumpiey/linkwarden-mcp/main/docs/icon-512.png).website_urlishttps://linkwarden.app/. - Cursor plugin:
.cursor-plugin/plugin.jsonlogo→docs/linkwarden-icon.svg. - Claude Desktop Extension:
mcpb/icon.png(packed withnpx @anthropic-ai/mcpb pack mcpb). - Claude.ai remote connectors: Claude.ai ignores
serverInfo.iconsand uses the root-domain favicon of the connector URL. If you host a remote MCP later, servedocs/favicon.icoat the registrable domain root (e.g.https://acme.com/favicon.icoforhttps://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
- Sign in to your Linkwarden instance (self-hosted or Cloud).
- Open Settings → Access Tokens (or go to
/settings/access-tokens). - Create a New Access Token, give it a name, and copy the value into
LINKWARDEN_API_KEY. - Set
LINKWARDEN_API_URLto your instance base URL (usually without/api/v1; include/api/v1only if your deployment requires it), e.g.https://links.example.comor local Dockerhttp://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:
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.
- 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:
mklink /J "%USERPROFILE%\.cursor\plugins\local\linkwarden-mcp" "E:\Development\linkwarden-mcp"
or:robocopy "E:\Development\linkwarden-mcp" "%USERPROFILE%\.cursor\plugins\local\linkwarden-mcp" /E
- macOS / Linux:
- Reload the window.
- 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 aslinks,collections. - Confirm the
linkwardenMCP 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:
{
"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):
{
"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:
"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, or build:
npx @anthropic-ai/mcpb pack mcpb
Install via Settings → Extensions → Advanced settings → Install Extension (do not drag into chat). Enter Linkwarden API URL and API key when prompted; leave write/delete scopes empty for read-only. Requires uv on PATH only — no separate Python install (uvx pulls Python automatically).
Manual claude_desktop_config.json fallback: edit the Claude Desktop config, then restart the app.
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
{
"mcpServers": {
"linkwarden": {
"command": "uvx",
"args": ["linkwarden-mcp"],
"env": {
"LINKWARDEN_API_URL": "https://links.example.com",
"LINKWARDEN_API_KEY": "your-token"
}
}
}
}
Local clone:
{
"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"
}
}
}
}
Windows troubleshooting
- Double-click often fails until
.mcpbis associated withClaude.exe. - Drag onto chat attaches the file; use the Extensions settings installer instead.
- If Install still no-ops on Claude Desktop 1.12603.1+, use
mcp.json/claude_desktop_config.jsonor update Claude.
Claude Code
Add via CLI:
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:
{
"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:
{
"servers": {
"linkwarden": {
"type": "stdio",
"command": "uvx",
"args": ["linkwarden-mcp"],
"env": {
"LINKWARDEN_API_URL": "https://links.example.com",
"LINKWARDEN_API_KEY": "your-token"
}
}
}
}
Local editable:
{
"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:
{
"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):
{
"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):
{
"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:
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:
| Field | Value |
|---|---|
| Command | uvx |
| Args | linkwarden-mcp |
| Env | LINKWARDEN_API_URL, LINKWARDEN_API_KEY (+ optional write scopes) |
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
| Variable | Required | Notes |
|---|---|---|
LINKWARDEN_API_URL |
yes | Base URL (include /api/v1 only if required; typical: https://links.example.com) |
LINKWARDEN_API_KEY |
yes | Access token from Settings → Access Tokens; sent as Authorization: Bearer; never logged |
LINKWARDEN_MCP_WRITE_SCOPES |
no | Comma-separated domains for create/update. Empty = no writes. |
LINKWARDEN_MCP_DELETE_SCOPES |
no | Comma-separated domains for delete only. Never implied by WRITE_SCOPES. |
LINKWARDEN_MAX_BULK |
no | Max records per bulk op (default 25) |
TEST_LINKWARDEN_API_URL |
integration only | Live sandbox URL for pytest -m integration |
TEST_LINKWARDEN_API_KEY |
integration only | Live 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):
"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.
| Tool | Scopes | Purpose |
|---|---|---|
save_link |
WRITE links |
Save a URL into a collection (by name) |
smart_save_link |
WRITE links |
Save with optional heuristic collection/tags |
organise_links |
WRITE links |
Move or retag multiple links |
update_link |
WRITE links |
Update link fields (read-modify-write) |
queue_archive |
WRITE links |
Queue preservation (async; not immediate) |
apply_triage_plan |
WRITE links |
Apply [{link_id, collection?, tags?}]; default dry_run=true |
bulk_sort_by_rules |
WRITE links |
Match domain_pattern rules then organise; default dry_run=true |
create_collection |
WRITE collections |
Create a collection (optional parent) |
auto_tag_by_domain |
WRITE links + tags |
Apply domain→tag rules; default dry_run=true |
delete_links |
DELETE links |
Delete multiple links |
delete_tags |
DELETE tags |
Delete tags by id or name |
merge_tags |
DELETE tags |
Merge tags into a new name (destructive) |
delete_collection |
DELETE collections |
Delete a collection and all its links |
Example with recommended scopes only:
"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).
| Tool | Purpose |
|---|---|
list_resources |
Discovery; reports read_only + live write/delete scopes |
search_links |
Search by query, collection, tag, or pin status |
get_link |
Full metadata for one link |
read_link_content |
Preserved plain text (textContent or archive fallback) |
list_collections |
Collections with link counts |
list_tags |
Tags with link counts |
get_library_overview |
Totals, empty collections, unused tags |
suggest_collection_for_url |
Heuristic collection suggestions for a URL |
suggest_tags_for_link |
Suggest existing-library tags (never invents names) |
find_unsorted_links |
List unsorted links (default collection: Unorganized) |
triage_links |
Propose collection/tags for link ids (no writes) |
find_duplicate_links |
Group links with the same normalized URL |
recommend_collection_for_links |
Consensus collection for a batch of links |
suggest_links_for_collection |
Find links elsewhere that likely belong |
analyze_collection_overlap |
Compare two collections for shared domains/tags/URLs |
suggest_collection_structure |
Hygiene: empty, near-duplicate names, overcrowded |
align_tags_with_similar_links |
Tags used on similar-domain links |
get_sorting_dashboard |
One-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.
| Pattern | Requires | Notes |
|---|---|---|
| Link create/update/organise/archive | WRITE links |
Includes workflow writers with dry_run defaults |
| Collection create | WRITE collections |
Optional parent by name |
| Domain auto-tag | WRITE links + tags |
Only existing tag names |
| Deletes / tag merge | matching DELETE scope | Destructive; 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
uv sync --extra dev
uv run linkwarden-mcp
Offline tests only (respx). No live Linkwarden required:
uv run ruff check src tests
uv run pytest
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; setdry_run=falseonly after you review the plan. - ChatGPT Apps need a hosted HTTP MCP endpoint. This package is stdio-only.
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file linkwarden_mcp-0.1.1.tar.gz.
File metadata
- Download URL: linkwarden_mcp-0.1.1.tar.gz
- Upload date:
- Size: 43.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b80142031648b174dc2af11cc414a2cff6c4f87d6785e97440d613c510e6a664
|
|
| MD5 |
8b1635c97e323e258f1f28b0ccbc75c1
|
|
| BLAKE2b-256 |
f27babd0288cddad238bf85c741cbe3f0428e208a24b572c1314ed5d582cc894
|
Provenance
The following attestation bundles were made for linkwarden_mcp-0.1.1.tar.gz:
Publisher:
publish.yml on flumpiey/linkwarden-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
linkwarden_mcp-0.1.1.tar.gz -
Subject digest:
b80142031648b174dc2af11cc414a2cff6c4f87d6785e97440d613c510e6a664 - Sigstore transparency entry: 2336972718
- Sigstore integration time:
-
Permalink:
flumpiey/linkwarden-mcp@d9ce5ef450934ac9ccb3208727b3c2fac7dd3a48 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/flumpiey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d9ce5ef450934ac9ccb3208727b3c2fac7dd3a48 -
Trigger Event:
release
-
Statement type:
File details
Details for the file linkwarden_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: linkwarden_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 41.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9c28c436b85d4bc604b475e9c707b5adf221a1c1e1ffce3c51f4d8172e0b45d
|
|
| MD5 |
3e35a9a2365b45c4af737584d47e3b88
|
|
| BLAKE2b-256 |
c485113f0bb0fb83be03c8283e06f0a59f2ca11cd09b799174779da7806db8c8
|
Provenance
The following attestation bundles were made for linkwarden_mcp-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on flumpiey/linkwarden-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
linkwarden_mcp-0.1.1-py3-none-any.whl -
Subject digest:
e9c28c436b85d4bc604b475e9c707b5adf221a1c1e1ffce3c51f4d8172e0b45d - Sigstore transparency entry: 2336972751
- Sigstore integration time:
-
Permalink:
flumpiey/linkwarden-mcp@d9ce5ef450934ac9ccb3208727b3c2fac7dd3a48 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/flumpiey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d9ce5ef450934ac9ccb3208727b3c2fac7dd3a48 -
Trigger Event:
release
-
Statement type: