zhihu-scraper-mcp
Provides tools for searching questions, articles, users, and topics on Zhihu, and for retrieving full-text content and comment trees for answers and articles.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@zhihu-scraper-mcpsearch questions about machine learning"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Zhihu Scraper MCP Server
An MCP Server that provides MCP clients with the ability to read full Zhihu article text, complete comment trees, and categorized search.
It is a thin wrapper around the zhihu-toolkit CLI (the zhihu command): each tool calls the CLI's --json interface and returns the results in a streamlined structure, avoiding fields such as avatars, HTML, and redundant timestamps that could bloat the model context.
It focuses on three capabilities: full answer/article text, complete comment trees, and categorized precise search — suitable for scenarios requiring precise lists, full text extraction, and comment retrieval.
Capability Overview
Tool | Purpose |
| Search questions by keyword (title/description/answer count/view count/follower count/URL) |
| Search articles by keyword (columns) |
| Search users by keyword |
| Search topics by keyword |
| Pass in a URL, return the full text of the answer/article (Markdown); for question URLs, return the merged full text of all answers |
| Return the complete comment tree for any content (including nested comments, likes, authors, timestamps) |
Related MCP server: zhihu MCP Server
Environment Requirements
Python
3.12+A Zhihu login session (Cookie), imported via
zhihu auth paste; this Server does not manage or store credentials.
Quick Start
See INSTALL.md (for Claude Code / Agent self-installation). For detailed tool parameters and usage recommendations, see USAGE.md.
One-liner version:
git clone https://github.com/luyanhexay/zhihu-scraper-mcp.git
cd zhihu-scraper-mcp
uv sync --locked
.venv/bin/zhihu auth paste # 粘贴浏览器 DevTools 复制的 cURL,Ctrl+D 结束Then register it in Claude Code (replace <ABS> with the absolute path to this repository):
claude mcp add zhihu-scraper -- <ABS>/.venv/bin/zhihu-scraper-mcpCredentials and Privacy
Authentication information is stored by the
zhihuCLI in~/.zhihu-cli/, not in this repository.This repository contains no cookies;
.gitignoreadditionally blocks files such ascookies.jsonto prevent accidental submission.Distributing this repository will not leak your Zhihu account. Users must import their own login session.
Known Issues
The HTML endpoint for a single answer is often blocked by Zhihu's risk control (
__zse_ck).get_fulltextautomatically falls back to the "pick the corresponding answer from the question API" path, so please try to pass the full answer URL containing/question/<id>/answer/<id>.Search keywords should be concise (≤3 words); overly long queries tend to return empty results.
When risk control is triggered, first complete verification in the browser, then re-run
zhihu auth pasteto refresh the login session.
Acknowledgments
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA simple HTTP API server that allows users to publish articles, create answers, manage columns, and upload images on Zhihu (a Chinese Q&A platform) through straightforward REST API endpoints.8
- FlicenseBqualityDmaintenanceEnables scraping Zhihu webpages, getting hot questions, and publishing answers using Puppeteer with QR code login authentication.64
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to directly operate Zhihu, including login, publishing articles and videos, searching content, getting recommendations, and commenting.5
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search, read, and analyze Zhihu content including questions, answers, comments, and user activities through the MCP protocol.3MIT
Related MCP Connectors
Search and fetch Wikidata entities, execute SPARQL queries, and resolve external identifiers.
Search Stack Exchange questions, fetch Q&A threads as markdown, look up tag FAQs and user profiles.
Search PubMed/Europe PMC, fetch articles and full text (PMC/EPMC/Unpaywall), citations, MeSH terms.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/luyanhexay/zhihu-scraper-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server