Zhihu Collections

v1.0.0Knowledge & Memorystable

将知乎收藏夹(公开和私密)批量导出为 Markdown 格式文件. 支持配置收藏夹列表并批量下载, 支持基于URL自动去重, 支持下载专栏和图片, 支持自定义保存路径, 支持调试和错误日志. **同时提供 MCP Server**,可被 AI Agent (如 Claude Code) 直接调用,为大模型提供保存知乎收藏夹的能力。

zhihu-collections-mcpmcpai-integration
Share:
135
Stars
0
Downloads
0
Weekly
0/5

What is Zhihu Collections?

Zhihu Collections is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 将知乎收藏夹(公开和私密)批量导出为 markdown 格式文件. 支持配置收藏夹列表并批量下载, 支持基于url自动去重, 支持下载专栏和图片, 支持自定义保存路径, 支持调试和错误日志. **同时提供 mcp server**,可被 ai agent (如 claude code) 直接调用,为大模型提供保存知乎收藏夹的能力。

将知乎收藏夹(公开和私密)批量导出为 Markdown 格式文件. 支持配置收藏夹列表并批量下载, 支持基于URL自动去重, 支持下载专栏和图片, 支持自定义保存路径, 支持调试和错误日志. **同时提供 MCP Server**,可被 AI Agent (如 Claude Code) 直接调用,为大模型提供保存知乎收藏夹的能力。

This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • 将知乎收藏夹(公开和私密)批量导出为 Markdown 格式文件. 支持配置收藏夹列表并批量下载, 支持基于URL自动去

Use Cases

Export Zhihu collections to Markdown format in bulk.
Access Chinese knowledge base through AI agent interface.
JasonJarvan

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx zhihu-collections-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Zhihu Collections

Zhihu Collections MCP is a Python-based MCP server and batch export tool that lets AI agents access and export Chinese knowledge content from Zhihu (知乎), China's leading Q&A and article platform. It supports bulk export of both public and private collections to Markdown files, URL-based deduplication, column and image downloads, and exposes four MCP tools that Claude or other AI agents can call to list, search, inspect, and export Zhihu collections. Researchers and knowledge workers use it to build offline Markdown archives of saved Chinese-language content for AI-assisted analysis.

Prerequisites

  • Python 3.8+ installed
  • pip install -r requirements.txt and pip install mcp for the MCP server mode
  • A Zhihu account; for private collections, cookies.json exported from your browser session
  • An MCP-compatible client such as Claude Desktop or Claude Code
1

Clone the repository

Clone the project from GitHub and navigate into the directory.

git clone https://github.com/JasonJarvan/Zhihu-Collections-MCP.git
cd Zhihu-Collections-MCP
2

Install Python dependencies

Install core dependencies plus the MCP library required for MCP server mode.

pip install -r requirements.txt
pip install mcp
3

Create and edit config.json

Copy the example config and edit it to add your collection URLs and optional output path.

cp config_examples.json config.json
4

Configure your Zhihu collection URLs

Edit config.json with your collection URLs and optional settings. For private collections, also create cookies.json with your browser session cookies.

{
  "zhihuUrls": [
    {"name": "Python Learning", "url": "https://www.zhihu.com/collection/123456789"}
  ],
  "outputPath": "/home/user/zhihu-exports"
}
5

Test the standalone export

Run the command-line tool to verify exports work before configuring the MCP server.

python main.py
6

Configure the MCP server in Claude Desktop or Claude Code

Add the MCP server block to your Claude configuration, pointing to mcp_server.py in the project directory.

{
  "mcpServers": {
    "zhihu-collections": {
      "command": "python",
      "args": ["mcp_server.py"],
      "cwd": "/path/to/Zhihu-Collections-MCP"
    }
  }
}

Zhihu Collections Examples

Client configuration

Claude Desktop config for the Zhihu Collections MCP server.

{
  "mcpServers": {
    "zhihu-collections": {
      "command": "python",
      "args": ["mcp_server.py"],
      "cwd": "/path/to/Zhihu-Collections-MCP"
    }
  }
}

Prompts to try

Example natural language prompts for the four MCP tools this server exposes.

- "List all my configured Zhihu collections"
- "Export the collection at https://www.zhihu.com/collection/123456789 to Markdown"
- "How many articles are in the collection at https://www.zhihu.com/collection/987654321?"
- "Search my collections for anything related to 'machine learning'"

Troubleshooting Zhihu Collections

Access denied or empty results for private collections

Private collections require authentication. Export your Zhihu session cookies from your browser (using a browser extension like EditThisCookie) and save them as cookies.json in the project root in the format [{"name": "...", "value": "..."}].

mcp module not found when starting mcp_server.py

Install the MCP Python library separately: pip install mcp. The requirements.txt may not include it. Confirm with 'python -c "import mcp"' before starting the server.

Export stalls or skips articles

Zhihu rate-limits unauthenticated requests. Ensure cookies.json is present and up to date (re-export from your browser). The tool uses URL-based deduplication, so previously downloaded articles are skipped — check your outputPath for existing files.

Frequently Asked Questions about Zhihu Collections

What is Zhihu Collections?

Zhihu Collections is a Model Context Protocol (MCP) server that 将知乎收藏夹(公开和私密)批量导出为 markdown 格式文件. 支持配置收藏夹列表并批量下载, 支持基于url自动去重, 支持下载专栏和图片, 支持自定义保存路径, 支持调试和错误日志. **同时提供 mcp server**,可被 ai agent (如 claude code) 直接调用,为大模型提供保存知乎收藏夹的能力。 It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Zhihu Collections?

Follow the installation instructions on the Zhihu Collections GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Zhihu Collections?

Zhihu Collections works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Zhihu Collections free to use?

Yes, Zhihu Collections is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Knowledge & Memory MCP Servers

Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "zhihu-collections-mcp": { "command": "npx", "args": ["-y", "zhihu-collections-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Zhihu Collections?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides