readeck-mcp
Enables AI agents to push generated HTML into a Readeck library with automatic LLM-based auto-labeling and to retrieve and read documents back, turning the library into a read/write knowledge base.
README
Readeck MCP
An MCP server that turns a Readeck library into a read/write knowledge base for AI agents: agents can push the HTML they generate straight into Readeck (auto-tagged by an LLM) and later retrieve and read those documents back. Built with FastMCP — the same code runs as a local stdio server or a remote HTTP server behind a reverse proxy.
Unlike existing Readeck MCPs (which are read-only reading assistants), this one ingests agent-generated HTML and auto-labels it with an LLM from a fixed taxonomy.
Tools
| Tool | Purpose |
|---|---|
readeck_save(html, title, labels?, url?, auto_label?) |
Save raw HTML as a readable bookmark; auto-labels when no labels are given. |
readeck_read(query, only_own?, max_results?, max_chars?) |
Retrieval: find the best-matching document(s) and return their full readable text. |
readeck_search(query, limit?) |
Search the library (metadata only). |
readeck_list_labels() |
List existing labels with counts. |
readeck_save uses Readeck's JSON create API with the raw-HTML html field
(base64/data-URI do not work). It sends a browser User-Agent so a WAF (e.g.
Cloudflare error 1010) doesn't block it, and polls briefly to return the new
bookmark id, word_count and reading_url.
Auto-labeling
When you call readeck_save without labels, an LLM classifies the document.
It's injection-resistant by design: the model may only pick from a fixed
taxonomy (LABEL_TAXONOMY), and the result is intersected with that list
server-side, so out-of-vocabulary labels are impossible. An origin label
(ORIGIN_LABEL, default propio) is always added by code, never the LLM.
Provider-agnostic (OpenAI-compatible or Anthropic). Works with free tiers such
as Groq — for reasoning models like gpt-oss set a generous LLM_MAX_TOKENS
and the server sends reasoning_effort: low automatically.
Guardrails
- Fail-closed HTTP auth: over HTTP transport every tool call requires
Authorization: Bearer $MCP_AUTH_TOKEN(constant-time compare). - Input validation: HTML size cap, non-HTML rejection, URL-scheme allowlist, label sanitization + cap.
- Token-bucket rate limiting per process.
- LLM calls retry on 429/5xx with backoff and degrade gracefully (labeling is best-effort; a failure never blocks the save).
Configuration (environment)
| Variable | Default | Notes |
|---|---|---|
READECK_URL |
http://localhost:8000 |
Readeck base URL. |
READECK_TOKEN |
— | Required. Readeck → Settings → API tokens. |
READECK_MCP_TRANSPORT |
stdio |
stdio or http. |
READECK_MCP_HOST / READECK_MCP_PORT |
0.0.0.0 / 8787 |
http mode only. |
MCP_AUTH_TOKEN |
— | Required in http mode (fail-closed bearer). |
AUTO_LABEL |
true |
Enable LLM auto-labeling. |
ORIGIN_LABEL |
propio |
Always-added origin label. |
LABEL_TAXONOMY |
see config.py |
Comma-separated closed vocabulary. |
MAX_AUTO_LABELS |
3 |
Max LLM topics per doc. |
LLM_PROVIDER |
anthropic |
anthropic or openai (OpenAI-compatible). |
LLM_BASE_URL |
https://api.anthropic.com |
Include the version prefix for openai (e.g. .../v1). |
LLM_MODEL |
claude-haiku-4-5 |
Any chat model on the chosen provider. |
LLM_API_KEY |
— | Key for the LLM provider. |
LLM_MAX_TOKENS / LLM_TEXT_CHARS |
2000 / 3000 |
Output budget / input text sent. |
Local (stdio)
READECK_TOKEN=... uv run --script server.py --selftest # smoke test
Register with an MCP client (mcpServers), e.g.:
{
"mcpServers": {
"readeck": {
"command": "uv",
"args": ["run", "--script", "/path/to/readeck-mcp/server.py"],
"env": { "READECK_URL": "https://readeck.example.com", "READECK_TOKEN": "..." }
}
}
}
Remote (HTTP / Docker)
Run with READECK_MCP_TRANSPORT=http (see Dockerfile). Put it behind your
reverse proxy / tunnel at e.g. https://mcp-readeck.example.com. When
co-located with Readeck, set READECK_URL=http://readeck:8000 to skip the public
round-trip. Point clients at the endpoint:
{
"mcpServers": {
"readeck": {
"type": "http",
"url": "https://mcp-readeck.example.com/mcp",
"headers": { "Authorization": "Bearer <MCP_AUTH_TOKEN>" }
}
}
}
Note: use the endpoint path without a trailing slash (
/mcp, not/mcp/) — some proxies turn the trailing-slash redirect into a 307 that breaks streamable-HTTP clients.
Always set a strong MCP_AUTH_TOKEN before exposing the endpoint — the token
grants write access to your library.
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 模型以安全和受控的方式获取实时的网络信息。