weread-shelf
Provides an embedded DuckDB database containing WeRead bookshelf data, enabling SQL analytics, cross-source joins with other databases, and export to various formats.
Allows querying and analyzing your WeChat Reading (WeRead) bookshelf data, including books, reading progress, and categories, using SQL via DuckDB.
Click on "Install 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., "@weread-shelfShow me books I haven't finished reading in the last 30 days."
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.
weread-shelf
微信读书 + DuckDB = 用 SQL 分析你的书架
CLI · SQL · MCP · Skill · 跨源 join 你的其他本地数据
为什么需要这个?
weread CLI 能查书、查笔记、查阅读时长 —— 但不能跨源 join。
你想知道"我最近 30 天加的 AI 书有哪些还没读?" weread 给不了 SQL 答案。
weread-shelf 把 weread 数据塞进 DuckDB,让你能:
-- 完读率按类别统计
SELECT category, COUNT(*), SUM(finishReading) AS read,
ROUND(SUM(finishReading)*100.0/COUNT(*),1) AS pct
FROM shelf
GROUP BY 1 ORDER BY pct DESC;
-- 跨源:join 你机器上其他 db
ATTACH '~/xiaozhi/data/devices.db' AS xz (TYPE SQLITE);
SELECT b.title, b.finishReading, xz.last_active
FROM shelf b
LEFT JOIN xz.devices xz ON xz.user_id = b.bookId;Related MCP server: MotherDuck DuckDB MCP Server
安装
pip install weread-shelf
# 或本地 clone
git clone https://github.com/flybear16/weread-shelf
cd weread-shelf && pip install -e .前置:
weread CLI 已装 (
npm i -g weread-agent-cli)DuckDB ≥ 1.3(CLI 自带)
4 种使用方式
1. CLI 模板查询(无需写 SQL)
weread-shelf analysis # 全量画像
weread-shelf finish-rate --category # 按类别完读率
weread-shelf recent --days 30 # 最近 30 天加的书
weread-shelf top-authors # 高产作者
weread-shelf categories # 类别饼图(ASCII)2. 直通 SQL
weread-shelf sql "SELECT * FROM shelf WHERE finishReading=0 LIMIT 5"
weread-shelf sql --file ./my-query.sql3. MCP Server(Agent 可调)
{
"mcpServers": {
"weread-shelf": {
"command": "weread-shelf-mcp",
"args": []
}
}
}4. Skill(Hermes / Claude Code / OpenClaw)
npx openskills add flybear16/weread-shelf命令速查
命令 | 作用 |
| 检查 weread CLI + DuckDB + auth |
| 拉取最新数据到本地 DuckDB |
| 全量画像 |
| 直通 SQL |
| Attach 一个外部 db |
| 导出 |
License
MIT © flybear16
Security
weread-shelf never sees, stores, or transmits your WeRead API key.
All authentication is delegated to the local
wereadCLIYour
wrk-...key lives in~/.weread-cli/config.json(managed byweread config set-key)weread-shelf only calls the public
wereadcommands (shelf list,doctor, etc.)No key material is required or read by this project
The local DuckDB cache at
~/.weread-shelf/cache.duckdbcontains only your book metadata (titles, authors, categories, finish status) — never your key
If you fork this project, you don't need to add a key. Each user runs weread config set-key themselves on their own machine.
Reporting vulnerabilities: open a GitHub issue with [security] prefix, or email flybear16@outlook.com.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityFmaintenanceAn MCP server enabling LLMs to access WeChat Reading bookshelf, notes, highlights, and reviews via tools like get_bookshelf, search_books, and get_book_notes_and_highlights.Last updated4144167
- Alicense-qualityDmaintenanceA local MCP server implementation that interacts with DuckDB and MotherDuck databases, providing SQL analytics capabilities to AI Assistants and IDEs.Last updatedMIT
- Alicense-qualityDmaintenanceA local MCP server enabling AI assistants to query and analyze data via DuckDB SQL engine, supporting local files, memory, S3, and MotherDuck.Last updated32Apache 2.0
- FlicenseCqualityDmaintenanceMCP server for reading local WeChat data, enabling AI assistants to query chat history, contacts, sessions, and more via MCP tools.Last updated205
Related MCP Connectors
Local-first RAG engine with MCP server for AI agent integration.
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/flybear16/weread-shelf'
If you have feedback or need assistance with the MCP directory API, please join our Discord server