Skip to main content
Glama

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.

Demo

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 in packages/lib/schemaValidation.ts of 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.

Related MCP server: raindrop-mcp

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

Variable

Required

Description

LINKWARDEN_URL

yes

Base URL, e.g. https://links.example.net (without /api/v1)

LINKWARDEN_TOKEN

yes

Access token from Settings → Access Tokens

LINKWARDEN_READ_ONLY

no

true registers only the read tools

LINKWARDEN_ALLOW_TOOLS

no

Comma-separated tool names, list_* prefixes, or essential for a curated preset

LINKWARDEN_DENY_TOOLS

no

Same syntax; removed from whatever LINKWARDEN_ALLOW_TOOLS left

ELICITATION

no

false replaces the approval dialog with the two-call token. Not prefixed

LINKWARDEN_INSECURE_TLS

no

true accepts self-signed certificates (scoped to this connection)

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 over LINKWARDEN_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.

LINKWARDEN_ALLOW_TOOLS=essential
LINKWARDEN_ALLOW_TOOLS=search_links,get_link_content,create_link
LINKWARDEN_DENY_TOOLS=bulk_*

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 mcp add linkwarden -e LINKWARDEN_URL=https://links.example.net -e LINKWARDEN_TOKEN=… -- npx -y linkwarden-mcp

Claude Desktop

{
  "mcpServers": {
    "linkwarden": {
      "command": "npx",
      "args": ["-y", "linkwarden-mcp"],
      "env": {
        "LINKWARDEN_URL": "https://links.example.net",
        "LINKWARDEN_TOKEN": "…"
      }
    }
  }
}

Codex

[mcp_servers.linkwarden]
command = "npx"
args = ["-y", "linkwarden-mcp"]
env = { LINKWARDEN_URL = "https://links.example.net", LINKWARDEN_TOKEN = "…" }

From source

npm install && npm run build
LINKWARDEN_URL=https://links.example.net LINKWARDEN_TOKEN=… node dist/index.js

Docker

docker build -t linkwarden-mcp .
docker run --rm -i \
  -e LINKWARDEN_URL=https://links.example.net \
  -e LINKWARDEN_TOKEN=… \
  linkwarden-mcp

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:

{
  "mcpServers": {
    "linkwarden": {
      "command": "npx",
      "args": ["-y", "linkwarden-mcp"],
      "env": {
        "LINKWARDEN_URL": "https://links.example.net",
        "LINKWARDEN_TOKEN": "…",
        "LINKWARDEN_ALLOW_TOOLS": "essential"
      },
      "denyTools": ["bulk_*"]
    }
  }
}

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

Tool

Description

search_links

Search or list bookmarks. Supports Linkwarden's field filters (tag:, collection:, before:, ! …).

get_link

One bookmark with its tags, collection and which preserved formats exist.

get_link_content

The preserved article text of a saved page, sliced for long articles.

list_collections

All collections with link counts; nesting via parentId.

get_collection

One collection with its per-member permissions.

list_tags

Tags with link counts and their per-tag archival settings.

get_tag

One tag.

get_dashboard

Recently added plus pinned links, as Linkwarden's dashboard shows them.

list_rss_subscriptions

The RSS feeds this account subscribes to.

get_current_user

Which account the token belongs to, and its archival defaults. Good connectivity check.

get_worker_stats

Preservation and search-index queue. Administrator account only — everyone else gets HTTP 403.

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.

Tool

Description

create_link

Save a bookmark, optionally with tags and a collection (created on demand).

update_link

Change title, description, tags or collection. 👤 only when the URL changes.

set_link_pinned

Pin or unpin a link for this account.

delete_link 👤

Delete a bookmark and its preserved copies.

bulk_update_links 👤

Apply one tag list and/or collection to many links.

bulk_delete_links 👤

Delete many bookmarks at once.

represerve_link 👤

Drop the existing archives and preserve the page again.

delete_link_preservations 👤

Drop the archives of several links, keeping the bookmarks.

create_collection

Create a collection, optionally nested.

update_collection

Rename, re-parent or publish a collection. 👤 only when publishing.

delete_collection 👤

Delete a collection — cascades to its links and sub-collections.

create_tags

Create tags or change their archival settings (upsert by name).

rename_tag 👤

Rename a tag — every link that carries it follows.

delete_tags 👤

Delete tags; the links keep existing.

merge_tags 👤

Fold several tags into one new tag.

create_rss_subscription

Subscribe to an RSS/Atom feed.

delete_rss_subscription 👤

Stop polling a feed.

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 preserved URLs, which need NEXT_PUBLIC_USER_CONTENT_DOMAIN to be configured.

  • The deprecated GET /links listing route — search_links uses GET /search instead, 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=false takes 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_link and create_rss_subscription hand a URL to a server that opens it in a headless browser — and get_link_content reads 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=true does 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

npm install
npm run build
npm test
npm run test:coverage
npm run lint
npm run format
npm run docs:tools     # regenerate docs/reference/tools.md from the registered tools

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.

  1. Move the [Unreleased] section of CHANGELOG.md to the new version and date it. The release workflow extracts that section with awk, so the ## [x.y.z] heading shape matters.

  2. Bump version in package.json.

  3. npm run lint && npm run build && npm run test:coverage.

  4. Commit, then a signed annotated tag:

    git tag -s v0.1.1 -m "v0.1.1"
    git push origin main v0.1.1

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

Available Tools

28 tools
create_collectionCreate a collectionA

Creates a collection. Pass parent_id to nest it under an existing collection. New collections are private; use update_collection to publish one.

Inputs: name (required), color, parent_id, description.

create_rss_subscriptionSubscribe to an RSS feedA

Subscribes to an RSS or Atom feed. Linkwarden polls it and files every new entry as a link in the given collection, preserving the pages according to the account defaults.

Linkwarden fetches the feed once immediately, so an unreachable feed fails right away. Because that fetch happens on the Linkwarden server, a URL addressing its own loopback or the link-local range is refused here before the request is made. That check covers the feed URL only — Linkwarden creates and preserves a link for every entry the feed contains, and on versions before 2.14 it does not check those addresses at all. Do not subscribe to a feed you do not trust. Subscription names must be unique per account, and instances cap the number of subscriptions (20 by default).

Inputs: url (required), name (required), collection_id, collection_name.

create_tagsCreate tags or change their archival settingsA
Idempotent

Creates tags, or updates the ones that already exist — the underlying route is an upsert keyed on the tag name. This is also the only way to set the per-tag archival overrides, which decide how links carrying the tag get preserved.

Note that tags are usually created implicitly by create_link and update_link; use this tool when the archival settings matter, or to create a tag before any link uses it.

Inputs: names (required), ai_tag, archive_as_pdf, archive_as_monolith, +3 more.

delete_collectionDelete a collectionA
Destructive

Deletes a collection. This cascades: every link inside it, every preserved copy of those pages, and every sub-collection below it are deleted too. Two-step: the first call reports how many links would be lost and returns a confirmation token.

Inputs: collection_id (required), confirm_token.

delete_rss_subscriptionDelete an RSS subscriptionA
Destructive

Stops polling a feed. Links that were already created from it stay where they are — only the subscription goes away.

Inputs: rss_subscription_id (required), confirm_token.

delete_tagsDelete tagsA
Destructive

Deletes one or more tags. The links keep existing, they just lose the tag. Two-step: the first call returns a confirmation token bound to exactly this set of ids.

Inputs: tag_ids (required), confirm_token.

get_collectionGet a collectionA
Read-only

Fetches one collection with its link count and the per-member create/update/delete permissions. Use search_links with collection_id to get the links inside it.

Inputs: collection_id (required).

get_current_userGet the authenticated accountA
Read-only

Reports which Linkwarden account the configured token belongs to and that account's archival defaults — which formats new links get preserved in, and whether duplicate URLs are rejected. Useful as a connectivity check and before creating links, because the defaults decide what get_link_content will later have to read.

Inputs: no named parameters.

get_dashboardGet the dashboard linksA
Read-only

Returns the links Linkwarden shows on its dashboard: the most recently added ones together with everything the account has pinned, deduplicated. A quick "what is going on here" overview — use search_links for anything targeted.

Inputs: no named parameters.

get_tagGet a tagA
Read-only

Fetches one tag with its archival settings. Use search_links with tag_id to get the links carrying it.

Inputs: tag_id (required).

get_worker_statsGet preservation queue statisticsA
Read-only

Reports how many links are waiting to be preserved, how many succeeded and how many failed, plus the search-index backlog. Use it to find out whether a page requested through represerve_link has been archived yet.

Requires the instance administrator account (the id in NEXT_PUBLIC_ADMIN, 1 by default); every other account gets HTTP 403 here. The counts cover the whole instance, not just this account.

Inputs: no named parameters.

list_collectionsList collectionsA
Read-only

Lists every collection the authenticated account owns or is a member of, with its link count. The list is flat: nesting is expressed through parentId, where null means the collection sits at the top level. Linkwarden does not page this route, so all collections come back at once.

Inputs: no named parameters.

list_rss_subscriptionsList RSS subscriptionsA
Read-only

Lists the RSS feeds this account subscribes to. Linkwarden polls them and files new entries as links in the configured collection.

Inputs: no named parameters.

list_tagsList tagsA
Read-only

Lists the tags of the authenticated account with the number of links each one is attached to. Tags cut across collections. The per-tag archival settings are included: null there means "inherit the account default", which is not the same as false.

Inputs: sort, cursor, search.

merge_tagsMerge tags into oneA
Destructive

Folds several tags into a single new one: every link that carried any of the source tags gets the new tag, and the source tags are deleted.

Two things to know before calling this. The new tag is created from scratch, so the name must not already be in use by this account — merging into an existing name fails. And the per-tag archival settings of the source tags are not carried over; set them again with create_tags afterwards if they mattered.

Inputs: tag_ids (required), new_name (required), confirm_token.

rename_tagRename a tagA
Idempotent

Renames a tag; every link carrying it keeps it. Tag names are unique per account, so renaming a tag to a name that already exists fails — use merge_tags to fold two tags into one instead.

Inputs: name (required), tag_id (required).

update_collectionUpdate a collectionA
Idempotent

Changes a collection. Fields that are not given stay as they are: the tool reads the collection first and merges, because the underlying route rebuilds the member list from the request body and would otherwise remove every collaborator.

Only the owner of a collection may update it. To move a collection to the top level pass parent_id=0 — Linkwarden needs an explicit marker for that and ignores null.

Setting is_public=true needs a confirmation token: it makes the collection and every link in it readable by anyone who has the URL, without logging in.

Inputs: collection_id (required), name, color, is_public, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 28 tools

    Disambiguation5/5

    Every tool targets a distinct resource/action combination: reads are list/get, mutations are create/update/delete, bulk operations carry a bulk_ prefix, and preservation/RSS/pinning have dedicated verbs. Near-neighbor tools like delete_link vs delete_link_preservations are clearly separated by their nouns and descriptions.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun pattern, with list/get for reads, create/update/delete for writes, bulk_ for multi-item operations, and set_/represerve_/merge_ for special actions. The singular/plural distinction between single-item and bulk tools reinforces the pattern rather than breaking it.

    Tool Count3/5

    28 tools is on the heavy side and exceeds the typical comfortable range, though the set covers several distinct subdomains: links, preservation, collections, tags, RSS, and account/worker status. No tool is pure filler, but the count feels more like a full API wrapper than a tightly scoped MCP server.

    Completeness5/5

    The tool surface provides full lifecycle coverage for links, collections, and tags, plus bulk operations, preservation controls, RSS subscription management, and background-worker monitoring. There are no obvious dead ends: search_links covers listing, get_link_content reads archived text, and represerve_link/delete_link_preservations handle preservation lifecycle.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Enables managing bookmarks via the Linkwarden API with token-frugal tools for listing collections and links, adding/moving/deleting links, and creating collections.
      7
      -
    • A
      license
      B
      quality
      D
      maintenance
      Enables management of Raindrop.io bookmarks, collections, tags, and highlights via MCP tools, with support for search, bulk editing, and library auditing.
      17
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP 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 PyPI
      1
      MIT