zhihu-scraper-mcp
知乎 Scraper MCP Server
一个 MCP Server,为 MCP 客户端提供知乎全文正文、完整评论树、分类型搜索的读取能力。
它是对 zhihu-toolkit CLI(zhihu 命令)的薄封装:每个工具都调用 CLI 的 --json 接口,把结果裁剪成精简结构再返回,避免头像/HTML/冗余时间戳等字段撑爆模型上下文。
它专注三块能力:回答/文章全文、完整评论树、按类型的精确搜索——适合需要精确列表、抓正文、抓评论的场景。
能力概览
工具 | 作用 |
| 按关键词搜索问题(标题/描述/回答数/浏览量/关注数/URL) |
| 按关键词搜索文章(专栏) |
| 按关键词搜索用户 |
| 按关键词搜索话题 |
| 传入 URL,返回回答/文章的完整正文(Markdown);问题 URL 返回其下全部回答的合并全文 |
| 返回任意内容下的完整评论树(含嵌套子评论、点赞、作者、时间) |
Related MCP server: zhihu MCP Server
环境要求
Python
3.12+一份知乎登录态(Cookie),通过
zhihu auth paste导入;本 Server 不管理、不存储凭据。
快速开始
见 INSTALL.md(面向 Claude Code / Agent 自安装)。工具的详细参数与使用建议见 USAGE.md。
一句话版本:
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 结束然后在 Claude Code 中注册(把 <ABS> 换成本仓库绝对路径):
claude mcp add zhihu-scraper -- <ABS>/.venv/bin/zhihu-scraper-mcp凭据与隐私
认证信息由
zhihuCLI 存放在~/.zhihu-cli/,不在本仓库内。本仓库不包含任何 Cookie;
.gitignore额外拦截cookies.json等文件以防误提交。分发本仓库不会泄露你的知乎账号。使用者需自行导入自己的登录态。
已知问题
单篇回答的 HTML 端点常被知乎风控(
__zse_ck)拦截。get_fulltext会自动回退到"从问题 API 中挑出对应回答"的路径,因此请尽量传含/question/<id>/answer/<id>的完整回答 URL。搜索关键词要精简(≤3 词),过长易返回空。
触发风控时先在浏览器完成验证,再重新
zhihu auth paste刷新登录态。
致谢
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