Content
# WeChat Reading MCP Server
A tool that provides MCP (Model Context Protocol) services for WeChat Reading, supporting the provision of books, notes, and highlights data from WeChat Reading to large language model clients that support MCP, such as Claude Desktop.
## Features
- Retrieve bookshelf information from WeChat Reading
- Search for books in the bookshelf
- Get notes and highlights for books
- Retrieve popular book reviews
- Support organizing notes and highlights by chapter
- Seamless integration with LLM clients that support the MCP protocol
## Main Tools
1. **get_bookshelf** - Retrieve all books on the user's bookshelf
- Returns basic information about the books, including title, author, translator, and category, etc.
2. **search_books** - Search for books on the user's bookshelf by keywords
- Supports fuzzy matching and exact matching
- Optional to include detailed information
- Maximum result count can be set
3. **get_book_notes_and_highlights** - Retrieve all highlights and notes for a specified book
- Supports organizing results by chapter
- Supports filtering highlight styles
- Returns structured data for easier understanding by LLM
4. **get_book_best_reviews** - Retrieve popular book reviews for a specified book
- Supports setting the number of reviews to return
- Supports pagination
- Includes ratings, likes, and reviewer information
## Installation and Usage
### Prerequisites
- Node.js version 16.x or higher
- WeChat Reading account and valid Cookie
### Installation Guide
See: [Weread MCP Server User Guide](https://chenge.ink/article/post20250505)
### Integration with Claude Desktop
There are multiple ways to integrate with Claude Desktop:
#### Method 1: Use via npx (Simplest, Recommended)
1. Open Claude Desktop
2. Go to Settings -> MCP Configuration
3. Add a tool using the following JSON configuration:
```json
{
"mcpServers": {
"mcp-server-weread": {
"command": "npx",
"args": ["-y", "mcp-server-weread"],
"env": {
// Method 1: Use Cookie Cloud (Recommended)
"CC_URL": "https://cc.chenge.ink", // URL of Cookie Cloud
"CC_ID": "Your ID", // ID of Cookie Cloud
"CC_PASSWORD": "Your Password" // Password of Cookie Cloud
// Or Method 2: Provide Cookie directly
// "WEREAD_COOKIE": "Your WeChat Reading Cookie"
}
}
}
}
```
#### Method 2: Use after Global Installation
1. Install the package globally:
```bash
npm install -g mcp-server-weread
```
2. Use in Claude configuration:
```json
{
"mcpServers": {
"mcp-server-weread": {
"command": "mcp-server-weread",
"env": {
// Configure environment variables as above
}
}
}
}
```
> Note: Providing environment variables directly in Claude configuration is more convenient, eliminating the need to set up a .env file, and is recommended.
## CookieCloud Configuration Instructions
To address the issue of frequent Cookie expiration and the need to re-obtain and update environment variables, this project supports the [CookieCloud](https://github.com/easychen/CookieCloud) service to automatically synchronize and update Cookies. CookieCloud is an open-source cross-browser Cookie synchronization tool that supports self-hosted servers.
### Configuration Steps:
Install the browser extension
Edge Store: [CookieCloud for Edge](https://microsoftedge.microsoft.com/addons/detail/cookiecloud/bffenpfpjikaeocaihdonmgnjjdpjkeo)
Chrome Store: [CookieCloud for Chrome](https://chromewebstore.google.com/detail/cookiecloud/ffjiejobkoibkjlhjnlgmcnnigeelbdl)
### Configure CookieCloud Extension
Server Address: Use the default server https://cc.chenge.ink or enter your self-hosted server address
Click "Auto-generate Password"
Fill in "weread" in the domain keyword for synchronization
Click "Save", then click "Manual Sync" to ensure the configuration takes effect
[Optional] If you need the extension to auto-refresh, you can fill in https://weread.qq.com in the keep-alive section, and the extension will automatically refresh the Cookie
Configure CookieCloud variables in MCP JSON:
CC_URL=Your CookieCloud server address (or use my default server address https://cc.chenge.ink)
CC_ID=Your CookieCloud user UUID
CC_PASSWORD=Your CookieCloud password
Note: After configuring CookieCloud, the system will prioritize obtaining Cookies from CookieCloud, and will only use the value of the WEREAD_COOKIE environment variable if it fails to obtain it.
## Cookie Retrieval Method
The Cookie for WeChat Reading can be obtained through the following steps:
1. Log in to the [WeChat Reading Web Version](https://weread.qq.com/) using Chrome browser
2. Press F12 to open Developer Tools, switch to the Network tab
3. Refresh the page, find the request for weread.qq.com in the request list
4. In the Headers, find the Cookie field and copy its complete content
5. Add the copied content to the WEREAD_COOKIE variable in the MCP JSON or .env file
## Usage Examples
Here are some examples of conversations with the LLM:
**Get Bookshelf Information**
```
User: Help me check my WeChat Reading bookshelf
LLM: I will retrieve your WeChat Reading bookshelf information.
[LLM calls get_bookshelf tool]
I found 208 books on your WeChat Reading bookshelf. Here are some of the books:
1. "The Hidden Self" - David Eagleman
2. "Thinking, Fast and Slow" - Daniel Kahneman
3. "Sapiens: A Brief History of Humankind" - Yuval Noah Harari
...
```
**Search for Specific Books**
```
User: Help me find books about psychology
LLM: I will search for books related to psychology on your bookshelf.
[LLM calls search_books tool with parameter keyword="心理学"]
I found 3 books related to psychology on your bookshelf:
1. "Thinking, Fast and Slow" - Daniel Kahneman (Progress: 75%)
2. "The Crowd: A Study of the Popular Mind" - Gustave Le Bon (Progress: 50%)
3. "Psychology and Life" - Richard Gerrig (Progress: 30%)
Which book would you like to know more about?
```
**Get Notes and Highlights**
```
User: Help me organize the notes for "Thinking, Fast and Slow"
LLM: I will retrieve the notes and highlights for "Thinking, Fast and Slow".
[LLM calls search_books tool to find book ID]
[LLM calls get_book_notes_and_highlights tool]
Here are your notes and highlights in "Thinking, Fast and Slow" (organized by chapter):
Chapter 1: System 1 and System 2
- Highlight: "The operation of System 1 is unconscious and fast, requiring little mental effort, and is completely under autonomous control."
- Your note: "System 1 is responsible for intuition and quick judgments, while System 2 is responsible for slow, rational thinking."
Chapter 3: Anchoring Effect
- Highlight: "The anchoring effect refers to the tendency to be overly influenced by irrelevant numbers encountered beforehand when making numerical estimates in uncertain situations."
...
```
**Get Popular Book Reviews**
```
User: What are the popular reviews for the book "Principles"?
LLM: I will look up the popular reviews for "Principles".
[LLM calls search_books tool to find book ID]
[LLM calls get_book_best_reviews tool]
Here are the popular reviews for "Principles":
1. Reviewer "Thinker" (Rating: 5 stars):
"This is a book about how to think. Dalio summarizes his years of experience into actionable principles that help us make better decisions. I particularly like his view on 'pain + reflection = progress', which is very practical."
👍 182 | 💬 23
2. Reviewer "Investment Learner" (Rating: 4 stars):
"The essence of the founder of Bridgewater, worth reading repeatedly. The section on work principles is especially helpful for managers; I recommend reading life principles first, then work principles."
👍 94 | 💬 12
...
```
## License
MIT
## Contribution
Contributions are welcome! Please submit Pull Requests or Issues to improve this project.
You Might Also Like
OpenWebUI
Open WebUI is an extensible web interface for customizable applications.

NextChat
NextChat is a light and fast AI assistant supporting Claude, DeepSeek, GPT4...

cherry-studio
Cherry Studio is a multilingual project for creative collaboration.

LibreChat
LibreChat is an open-source chat platform for seamless communication.

Continue
Continue is an open-source project for seamless server management.

repomix
Repomix packages your codebase into AI-friendly formats for easy use.