Requires Node.js 16.x or higher to run the MCP server, providing the runtime environment for the WeRead integration.
微信读书 MCP Server 是一个为微信读书提供 MCP(Model Context Protocol)服务的工具,支持将微信读书的书籍、笔记和划线数据提供给支持MCP的大语言模型客户端,如Cursor、Claude Desktop。
功能特点
- 从微信读书获取书架信息
- 搜索书架中的图书
- 获取图书的笔记和划线
- 获取图书的热门书评
- 支持按章节组织笔记和划线
- 与支持MCP协议的LLM客户端无缝集成
主要工具
- get_bookshelf - 获取用户书架上所有书籍
- 返回书籍基本信息,包括书名、作者、译者和分类等
- search_books - 通过关键词检索用户书架上的书籍
- 支持模糊匹配和精确匹配
- 可选是否包含详细信息
- 可设置最大结果数量
- get_book_notes_and_highlights - 获取指定书籍的所有划线和笔记
- 支持按章节组织结果
- 支持筛选划线样式
- 返回结构化的数据以便于LLM理解
- get_book_best_reviews - 获取指定书籍的热门书评
- 支持设置返回数量
- 支持分页浏览
- 包含评分、点赞数和评论者信息
安装与使用
先决条件
- Node.js 16.x 或更高版本
- 微信读书账号和有效的Cookie
安装教程
详见:
与Claude Desktop集成
有多种方式可以与Claude Desktop集成:
方式一:通过 npx 使用(最简单,推荐)
- 打开Claude Desktop
- 进入设置 -> MCP配置
- 添加工具,使用以下JSON配置:
方式二:全局安装后使用
- 全局安装包:
- 在Claude配置中使用:
提示:直接在Claude配置中提供环境变量的方式更加方便,无需设置.env文件,推荐使用。
CookieCloud 配置说明
为了解决 Cookie 频繁过期,需要重新获取并更新环境变量的问题。本项目支持 CookieCloud 服务来自动同步和更新 Cookie。CookieCloud 是一个开源的跨浏览器 Cookie 同步工具,支持自建服务器。
配置步骤:
安装浏览器插件 Edge商店:CookieCloud for Edge Chrome商店:CookieCloud for Chrome
配置 CookieCloud 插件
服务器地址:使用默认服务器 https://cc.chenge.ink 或填入自建服务器地址 点击 "自动生成密码" 同步域名关键词中填入 "weread" 点击"保存" ,然后点击 "手动同步"确保配置生效 [可选] 如果需要插件自动保活,可以在保活中填入 https://weread.qq.com,插件会自动刷新 Cookie
在MCP Json中配置CookieCloud变量: CC_URL=你的CookieCloud服务器地址 (或使用我的默认服务器地址 https://cc.chenge.ink ) CC_ID=你的CookieCloud用户UUID CC_PASSWORD=你的CookieCloud密码 注意:配置 CookieCloud 后,系统会优先使用 CookieCloud 获取 Cookie,获取失败才会使用 WEREAD_COOKIE 环境变量的值。
Cookie获取方法
微信读书的Cookie可以通过以下步骤获取:
- 使用Chrome浏览器登录微信读书网页版
- 按F12打开开发者工具,切换到Network标签页
- 刷新页面,在请求列表中找到weread.qq.com的请求
- 在Headers中找到Cookie字段,复制其完整内容
- 将复制的内容添加到MCP Json 或 .env文件的WEREAD_COOKIE变量中
使用示例
以下是一些与LLM对话的示例:
获取书架信息
搜索特定书籍
获取笔记和划线
获取热门书评
九、友情链接
- mcp-server-weread :🚀一个为微信读书提供MCP(Model Context Protocol)服务的工具,支持将微信读书的书籍、笔记和划线数据提供给支持MCP的大语言模型客户端,如Claude Desktop。
- CodeCanvas :📚本代码仓库是作者苍何多年从事一线互联网Java开发的学习历程技术汇总,旨在为大家提供一个清晰详细的学习教程,侧重点更倾向编写Java核心内容。💪🏻
- PmHub :🔥PmHub 是一套基于 SpringCloud & LLM 的微服务智能项目管理系统,这个项目旨在帮助小伙伴们快速掌握微服务/分布式项目的架构设计和开发流程,如果想在校招或者社招中拿到一个满意的 offer,PmHub 将是一个非常 nice 的选择。
十、鸣谢
此项目 fork 自 ChenyqThu 的mcp-server-weread项目,做了一些小修改,突然就🔥了,这里也请大家去作者GitHub原项目上star,另外ChenyqThu新的更新我也会做同步,项目也会保持使用教程的更新,感谢大家的喜欢。
十一、star 趋势图
十二、公众号
微信搜 苍何 或扫描下方二维码关注苍何的原创公众号,回复 AI 即可和 5000+ 好友一同探讨AI,一同学习MCP。
十三、许可证
MIT License (MIT) The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Copyright (c) 2025-2026 mcp-server-weread
You must be authenticated.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A lightweight bridge server that connects WeChat Reading (WeRead) data with Claude Desktop, allowing seamless access to reading notes and book collections through natural language interactions.
Related MCP Servers
- -securityAlicense-qualityAn email assistant server that connects Claude Desktop to notmuch email databases, allowing users to search emails, view threads, compose new messages, and reply to conversations with markdown formatting.Last updated -2PythonMozilla Public License 2.0
- -securityFlicense-qualityA simple server that integrates with Claude to allow querying and manipulating Notion pages and databases through natural language prompts.Last updated -275JavaScript
- -securityFlicense-qualityA server that enables interaction with PostgreSQL, MySQL, MariaDB, or SQLite databases through Claude Desktop using natural language queries.Last updated -Python
- -securityAlicense-qualityA server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.Last updated -7TypeScriptMIT License