linkwarden-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@linkwarden-mcp search my bookmarks for that article on Python async patterns"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
linkwarden-mcp
A lightweight, security-hardened Model Context Protocol (MCP) server for self-hosted Linkwarden, supporting both Streamable HTTP (for Docker / reverse-proxy / multi-client deployments) and stdio transports.
Features
Focused 6-tool surface: search/list bookmarks, read metadata and preserved readability text, create bookmarks, update metadata/collection/tags, and list collections or tags — no destructive delete tools exposed.
Dual transport: runs over
stdiofor local clients or stateless Streamable HTTP (--http,/mcp+/health) for containerized self-hosting.Handles Linkwarden v2.17+ API quirks cleanly:
Uses
/api/v1/searchfor both full-text search and cursor-based browsing (avoiding deprecated/api/v1/links).Fixes Meilisearch relevance-offset vs. Prisma
id descpage overlap with opaque cursors (q:<upstream>:<skip>) and automatically advances past empty filtered pages.Enforces exact client-side AND intersection for
tag_id+pinned_only(working around upstreamORfiltering).Resolves
collection.ownerIdonupdate_link, preservesicon/color/nullableurl(for uploaded PDFs/images), and omitspinnedByto avoid triggering Linkwarden's shared-collection pin-only no-op branch.Paginates
/api/v1/tagsacross allnextCursorpages (no 50-tag truncation).Falls back to Linkwarden's indexed
textContentwhen/api/v1/archives/{id}?format=3returns404, while surfacing non-404upstream errors as explicit warnings.
Hardened for self-hosting:
Constant-time Bearer token auth (
hmac.compare_digest, minimum 24-character token) on/mcp.Fail-closed DNS rebinding protection (
MCP_ALLOWED_HOSTSrequired on non-loopback binds).5 MiB upstream response size cap for low-memory containers (runs comfortably under 256 MiB RAM, non-root, read-only rootfs,
cap_drop: [ALL]).Strict
http(s)URL scheme, field length, and tag count validation.Untrusted web-data framing in MCP instructions and preserved content responses.
Related MCP server: Linkwarden MCP
Tools
Tool | Description |
| Search bookmarks by query or list recent bookmarks with |
| Fetch bookmark details and optional preserved readability text ( |
| Save a new |
| Update an existing bookmark's |
| List all collections ( |
| List all tags across all pages ( |
Quick Start
First, create a Linkwarden Access Token in Linkwarden → Settings → Access Tokens.
1. Local stdio mode
git clone https://github.com/dohwi/linkwarden-mcp.git
cd linkwarden-mcp
pip install .
LINKWARDEN_URL=http://localhost:3000 \
LINKWARDEN_API_TOKEN=your-linkwarden-token \
linkwarden-mcp2. Streamable HTTP mode (CLI)
cp .env.example .env
# Edit .env with your LINKWARDEN_URL, LINKWARDEN_API_TOKEN, MCP_AUTH_TOKEN (>=24 chars), and MCP_ALLOWED_HOSTS
linkwarden-mcp --http --host 127.0.0.1 --port 8000Health check (no auth): GET http://127.0.0.1:8000/health → {"status":"ok"}
MCP endpoint (Bearer auth): POST http://127.0.0.1:8000/mcp
3. Docker Compose (recommended for self-hosting)
cp .env.example .env
cp compose.example.yaml compose.yaml
# Edit .env and compose.yaml for your Linkwarden container/URL and reverse proxy host
docker compose up -d --buildIf exposing behind Nginx / Caddy / Traefik, disable response buffering for /mcp and include the external hostname in MCP_ALLOWED_HOSTS.
MCP Client Configuration
Streamable HTTP (Claude Code, Cursor, generic MCP clients)
{
"mcpServers": {
"linkwarden": {
"type": "http",
"url": "https://mcp.example.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_MCP_AUTH_TOKEN"
}
}
}
}Stdio
{
"mcpServers": {
"linkwarden": {
"command": "linkwarden-mcp",
"env": {
"LINKWARDEN_URL": "https://bookmarks.example.com",
"LINKWARDEN_API_TOKEN": "YOUR_LINKWARDEN_ACCESS_TOKEN"
}
}
}
}Environment Variables
Variable | Required | Default | Description |
| Yes | — | Linkwarden Access Token ( |
| No |
| Linkwarden API base URL. |
| No |
| Public Linkwarden URL used to construct |
| No |
| Upstream HTTP timeout in seconds. |
| HTTP mode | — | Bearer token required by clients on |
| Non-loopback HTTP | loopback only | Comma-separated Host header allowlist (e.g. |
| No |
| Default bind host when |
| No |
| Default listen port when |
Development & Tests
pip install -e ".[dev]"
pytest -vLicense
Available Tools
6 toolscreate_linkC
Create a new bookmark in Linkwarden.
Inputs: url (required), name, tags, description, +1 more. Returns: result
get_linkB
Fetch metadata and optional preserved readability text for a Linkwarden bookmark.
Inputs: link_id (required), offset, max_chars, include_content. Returns: result
list_collectionsA
List all Linkwarden collections (ID, name, description, parent ID, and link count).
Inputs: no named parameters. Returns: result
list_tagsA
List all Linkwarden tags (ID, name, and link count).
Inputs: no named parameters. Returns: result
search_linksA
Search Linkwarden bookmarks or list recent bookmarks with filters and pagination.
Inputs: limit, query, cursor, tag_id, +2 more. Returns: result
update_linkB
Update an existing Linkwarden bookmark's title, description, collection, or tags.
Inputs: link_id (required), name, tags, description, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct role: search/list links, get one link, create a link, update a link, and list tags or collections. There is no meaningful overlap between search_links and get_link because one supports discovery/listing and the other retrieves detailed metadata for a specific bookmark.
All tool names follow the same snake_case verb_noun convention: search_links, list_tags, get_link, create_link, update_link, list_collections. The pattern is predictable and readable across the entire set.
Six tools are well-scoped for a focused Linkwarden bookmark integration. Each tool covers a distinct operation, and the set is neither thin nor bloated.
The bookmark surface supports search/list, get, create, and update, but lacks deletion and any mutation operations for tags or collections. These are notable gaps for full lifecycle coverage, though basic bookmark creation and retrieval workflows remain usable.
Maintenance
Related MCP Connectors
Official Bookmax MCP server: search and save bookmarks, read notes and docs from AI assistants.
Search, label, and manage your X (Twitter) bookmarks from any MCP client via Tweetsmash
Look up, read, and compare Wayback Machine captures using an unofficial open-source MCP server.
Linked markdown notes as memory for AI apps: search, read, save and link notes over MCP.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server for Linkwarden bookmarks providing read-first search and preserved content access with opt-in write, delete, and collection-delete tools, plus heuristic triage workflows.128 PyPI1MIT
- FlicenseNot gradedqualityDmaintenanceThis MCP server connects to a Linkwarden instance, enabling semantic search, filtering, and management of bookmarks through natural language.-
- AlicenseAqualityBmaintenanceEnables MCP clients to search, organize, and read preserved article text from a Linkwarden bookmark manager, supporting both read and write operations with safety confirmations.2885 npm1MIT
- AlicenseBqualityBmaintenanceEnables MCP clients to search, list, save, update, and delete bookmarks, collections, tags, and highlights through a stdio JSON-RPC server backed by the free REST API.6MIT