mcp-server-weread

微信读书MCP

GitHub Stars

457

User Rating

Not Rated

Favorites

0

Views

9

Forks

49

Issues

10

Installation
Difficulty
Intermediate
Estimated Time
10-20 minutes
Requirements
Node.js 16.x以上
WeChat Readingアカウントと有効なCookie

Installation

Installation

Prerequisites

Please specify required software and versions:
Node.js: 16.x or higher
WeChat Reading account and valid Cookie

Installation Steps

1. Global Installation

bash
npm install -g mcp-server-weread

2. Configure Claude Desktop

Edit claude_desktop_config.json to add the MCP server:
json
{
  "mcpServers": {
    "mcp-server-weread": {
      "command": "mcp-server-weread",
      "env": {
        "WEREAD_COOKIE": "your-wechat-reading-cookie"
      }
    }
  }
}

3. Start Server

bash
npx mcp-server-weread

Troubleshooting

Common Issues

Issue: Server won't start Solution: Check Node.js version and reinstall dependencies. Issue: Not recognized by Claude Desktop Solution: Verify configuration file path and syntax.

Configuration

Configuration

Claude Desktop Setup

Edit ~/.config/claude-desktop/claude_desktop_config.json (macOS/Linux) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
json
{
  "mcpServers": {
    "mcp-server-weread": {
      "command": "npx",
      "args": ["-y", "mcp-server-weread"],
      "env": {
        "WEREAD_COOKIE": "your-wechat-reading-cookie"
      }
    }
  }
}

Environment Variables

Set the following environment variables as needed:
bash
export WEREAD_COOKIE="your-wechat-reading-cookie"

Security Settings

Store Cookie in a secure configuration file
Set appropriate file access permissions

Configuration Example

json
{
  "mcpServers": {
    "mcp-server-weread": {
      "command": "npx",
      "args": ["-y", "mcp-server-weread"],
      "env": {
        "WEREAD_COOKIE": "your-wechat-reading-cookie"
      }
    }
  }
}

Examples

Examples

Basic Usage

Here are basic usage examples for the MCP server:

Using with Claude Desktop

1Verify MCP Server Startup
Open Claude Desktop and confirm that the configuration has been loaded correctly.
2Execute Basic Commands

   Available tools from this MCP server:
   - get_bookshelf: Fetch bookshelf information
   - search_books: Search for books
   - get_book_notes_and_highlights: Retrieve notes and highlights
   - get_book_best_reviews: Obtain popular book reviews
   

Programmatic Usage

javascript
// JavaScript example (Node.js)
const { MCPClient } = require('@modelcontextprotocol/client');

const client = new MCPClient();
await client.connect();

// Execute tool
const result = await client.callTool('get_bookshelf', {});

console.log(result);

Advanced Examples

Automation Script

bash
#!/bin/bash

Batch processing example

for file in *.txt; do mcp-tool process "$file" done

API Integration

python

Python example

import requests import json def call_mcp_tool(tool_name, params): response = requests.post( 'http://localhost:3000/mcp/call', json={ 'tool': tool_name, 'parameters': params } ) return response.json()

Usage example

result = call_mcp_tool('get_book_best_reviews', { 'book_id': 'example-book-id' })

Use Cases

Retrieve bookshelf information from WeChat Reading to manage reading history.
Search for specific books to find titles of interest.
Organize notes and highlights taken during reading for easier future reference.
Obtain popular book reviews to consider other readers' opinions.

Additional Resources

Author Information
苍何

越努力,越幸运!

向上生长WuHan,China

83

Followers

34

Repositories

1

Gists

0

Total Contributions

Related MCPs
mcp-server logo

Giving Claude ability to run code with E2B via MCP (Model Context Protocol)

JavaScript
anki-mcp-server logo

An MCP server for Anki

JavaScript
mcp-prompt-server logo

这是一个基于Model Context Protocol (MCP)的服务器,用于根据用户任务需求提供预设的prompt模板,帮助Cline/Cursor/Windsurf...更高效地执行各种任务。服务器将预设的prompt作为工具(tools)返回,以便在Cursor和Windsurf等编辑器中更好地使用。

JavaScript