linkding-mcp
An MCP server for Linkding bookmarks and web archival, enabling Claude to search, add, tag, archive, and delete bookmarks including archival snapshots.
README
linkding-mcp
An MCP server for Linkding bookmarks and web archival, designed to work as a claude.ai / Claude Desktop custom connector — so Claude can search, add, tag, archive, and delete your bookmarks (and inspect their archival snapshots) from the web or desktop app.
Talks to Linkding's REST API with a personal API token. Targets Linkding v1.31+ (token auth, limit/offset pagination, assets API for HTML snapshots). Built with FastMCP; authentication uses GitHub OAuth via FastMCP's OAuth proxy, restricted to an allowlist of GitHub usernames.
Tools
| Tool | Description |
|---|---|
list_bookmarks |
Search/list, newest first; Linkding query syntax (#tag, !unread, …) |
get_bookmark |
Full detail for one bookmark, including notes and archive URL |
check_url |
Is a URL already bookmarked? Returns scraped page metadata too |
add_bookmark |
Bookmark a URL — title/description/notes/tags; upserts by URL |
edit_bookmark |
Change url / title / description / notes / tags / unread / shared |
archive_bookmark / unarchive_bookmark |
Move to/from the archive (reversible) |
delete_bookmark |
Permanent delete; requires confirm=true |
list_tags |
Show all tags |
list_snapshots |
Archival snapshots: local HTML assets + Internet Archive URL |
Bookmarks are matched by numeric id, exact URL, or title/URL substring; ambiguous matches return candidates so the model can retry with an id. Adding a URL that is already bookmarked updates the existing bookmark (Linkding upserts by URL); omitted title/description are scraped from the page.
Setup
1. Linkding API token
In Linkding: Settings → Integrations → REST API. Copy the token into
LINKDING_API_TOKEN (or a secret file via LINKDING_API_TOKEN_FILE).
2. GitHub OAuth app (connector authentication)
- https://github.com/settings/developers → OAuth Apps → New OAuth App.
- Authorization callback URL:
https://linkding-mcp.example.com/auth/callback(yourMCP_BASE_URL+/auth/callback). - Register, generate a client secret, and set
GITHUB_CLIENT_ID/GITHUB_CLIENT_SECRET/ALLOWED_GITHUB_USERS.
Leaving the client ID/secret unset runs the server unauthenticated — local testing only.
3. Configuration reference
| Variable | Required | Description |
|---|---|---|
LINKDING_URL |
yes | Linkding base URL, e.g. https://links.example.com |
LINKDING_API_TOKEN |
yes | API token (or LINKDING_API_TOKEN_FILE) |
TZ |
no | Timezone for date display |
MCP_BASE_URL |
with auth | Public URL of this server |
GITHUB_CLIENT_ID / GITHUB_CLIENT_SECRET |
with auth | OAuth app credentials (or _FILE) |
ALLOWED_GITHUB_USERS |
with auth | Comma-separated GitHub logins allowed in |
CONSENT_MODE |
no | external (default), true, remember, false — see below |
ALLOWED_CLIENT_REDIRECT_URIS |
no | Redirect-URI patterns clients may register (default: claude.ai callback + localhost) |
HOST / PORT / MCP_PATH |
no | Bind address (0.0.0.0), port (8000), path (/mcp) |
FASTMCP_HOME |
no | OAuth client-registration storage (/data in Docker) |
4. Run it
See compose.example.yml. Expose it publicly at
MCP_BASE_URL through your reverse proxy; optionally restrict ingress to Anthropic's
egress range (160.79.104.0/21). Persist /data or connected clients must
re-authorize after every restart.
5. Verify, then connect Claude
npx @modelcontextprotocol/inspector # → https://linkding-mcp.example.com/mcp
Then claude.ai (or Claude Desktop) → Settings → Connectors → Add custom connector with the same URL. You'll land on GitHub's authorize page; approve, and the tools appear. Ask Claude: "what did I bookmark about docker?"
Why CONSENT_MODE=external is the default
FastMCP's built-in consent page (as of 3.4.4) regenerates its CSRF token on every GET
of the consent URL. Browsers and claude.ai routinely prefetch that URL, invalidating
the token the visible page holds, so submitting the form fails with "Invalid or
expired consent token". external skips that page and delegates consent to GitHub's
own authorization screen. The client redirect-URI allowlist (claude.ai + localhost by
default) prevents the classic risk of a consent-less flow — an arbitrary
dynamically-registered client silently capturing an authorization code.
Failure modes
- 401 from Linkding → the API token is wrong or was revoked; copy it again from Settings → Integrations → REST API.
- GitHub login succeeds but tools are denied → your login isn't in
ALLOWED_GITHUB_USERS(check logs fordenied authenticated GitHub user). - Connector breaks after a redeploy →
/datawasn't persisted, or the GitHub client secret changed (registration storage is keyed to it). Re-add the connector. list_snapshotsshows no local snapshots → Linkding's HTML snapshots requireLD_ENABLE_SNAPSHOTS=Trueon the Linkding instance; the Internet Archive URL only appears when Linkding's web-archive integration is enabled.
Development
uv sync
uv run pytest
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。