Skip to main content
Glama
WeRead MCP Server

WeRead MCP Server

by aixiasang
README.md
# WeRead MCP Server

MCP server for [WeRead](https://weread.qq.com) with SQLite caching.

- Sync bookshelf, highlights, thoughts from WeRead API
- Local SQLite cache with TTL-based refresh
- 14 tools: bookshelf, book info, highlights, search, export, etc.


## Quick Start

### 1. Get Cookie

1. Open https://weread.qq.com and login
2. F12 → Application → Cookies → weread.qq.com
3. Copy cookie string

**Required cookie fields:**

| Field | Description | Example |
|-------|-------------|---------|
| `wr_vid` | User ID | `12345678` |
| `wr_skey` | Session key, expires in ~2h | `AbcdEfg` |
| `wr_rt` | Auth token | `web@xxx...` |

Full cookie format: `wr_vid=xxx; wr_skey=xxx; wr_rt=xxx; ...`

### 2. Configure MCP

```json
{
  "mcpServers": {
    "weread": {
      "command": "weread-mcp",
      "env": {
        "WEREAD_COOKIE": "wr_vid=xxx; wr_skey=xxx; wr_rt=xxx; ...",
        "WEREAD_DATA_DIR": "~/.weread",
        "WEREAD_CACHE_TTL": "300"
      }
    }
  }
}
```

**Environment variables:**

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `WEREAD_COOKIE` | Yes | - | Cookie string from browser |
| `WEREAD_DATA_DIR` | No | `~/.weread` | Cache directory path |
| `WEREAD_CACHE_TTL` | No | `300` | Cache TTL in seconds |

## Tools

| Tool | Description |
|------|-------------|
| `get_bookshelf` | List all books |
| `get_book_info` | Book details |
| `get_book_chapters` | Table of contents |
| `get_book_bookmarks` | Highlights |
| `get_book_reviews` | Thoughts |
| `get_book_notes` | Export as Markdown |
| `get_reading_progress` | Progress % |
| `get_finished_books` | Completed books |
| `get_notebooks` | Books with notes |
| `search_books` | Search by title/author |
| `search_notes` | Search highlights |
| `sync_shelf` | Force sync |
| `sync_all_bookmarks` | Sync all highlights |
| `get_cache_stats` | Cache info |

All tools support `force` param to bypass cache.

## Disclaimer

⚠️ **For educational and personal use only.**

- Comply with Tencent ToS and WeRead User Agreement
- Do not use for commercial purposes
- Do not share your cookie
- Authors not responsible for misuse

## License

MIT

TDQS

B3/5.0

Scored across 14 tools

Disambiguation4/5

Most tools target clearly distinct concepts (progress, bookshelf, chapters, cache stats), and descriptions differentiate cache-backed search from live API sync. The boundary is fuzzier among get_notebooks / get_book_bookmarks / get_book_reviews / get_book_notes, which all deal with highlights and thoughts and could be confused by an agent. Overall mostly distinct with a small cluster of overlapping read tools.

Naming Consistency5/5

Every tool is snake_case and follows a verb_noun convention: get_* for reads, search_* for cache queries, sync_* for write-to-cache operations. Resource nouns are used consistently (book_info, book_chapters, book_bookmarks, book_reviews, book_notes).

Tool Count4/5

14 tools sit comfortably in the well-scoped range and the surface is cohesive around a reading app. There is mild redundancy (get_bookshelf vs sync_shelf, get_notebooks overlapping the per-book notes tools), but nothing excessive.

Completeness4/5

The read-side lifecycle is well covered: shelf, book metadata, chapters, progress, finished books, highlights, thoughts, notes export, plus cache search/sync/stats. The main gaps are write operations (e.g. creating or editing highlights/thoughts) and filtering/pagination options on the note retrieval tools, both of which limit advanced workflows.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues