Skip to main content
Glama
luyanhexay

zhihu-scraper-mcp

by luyanhexay

知乎 Scraper MCP Server

一个 MCP Server,为 MCP 客户端提供知乎全文正文、完整评论树、分类型搜索的读取能力。

它是对 zhihu-toolkit CLIzhihu 命令)的薄封装:每个工具都调用 CLI 的 --json 接口,把结果裁剪成精简结构再返回,避免头像/HTML/冗余时间戳等字段撑爆模型上下文。

它专注三块能力:回答/文章全文完整评论树按类型的精确搜索——适合需要精确列表、抓正文、抓评论的场景。

能力概览

工具

作用

search_questions

按关键词搜索问题(标题/描述/回答数/浏览量/关注数/URL)

search_articles

按关键词搜索文章(专栏)

search_users

按关键词搜索用户

search_topics

按关键词搜索话题

get_fulltext

传入 URL,返回回答/文章的完整正文(Markdown);问题 URL 返回其下全部回答的合并全文

get_comments

返回任意内容下的完整评论树(含嵌套子评论、点赞、作者、时间)

Related MCP server: zhihu MCP Server

环境要求

  • Python 3.12+

  • uv

  • 一份知乎登录态(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

凭据与隐私

  • 认证信息由 zhihu CLI 存放在 ~/.zhihu-cli/不在本仓库内

  • 本仓库不包含任何 Cookie;.gitignore 额外拦截 cookies.json 等文件以防误提交。

  • 分发本仓库不会泄露你的知乎账号。使用者需自行导入自己的登录态。

已知问题

  • 单篇回答的 HTML 端点常被知乎风控(__zse_ck)拦截。get_fulltext 会自动回退到"从问题 API 中挑出对应回答"的路径,因此请尽量传/question/<id>/answer/<id> 的完整回答 URL

  • 搜索关键词要精简(≤3 词),过长易返回空。

  • 触发风控时先在浏览器完成验证,再重新 zhihu auth paste 刷新登录态。

致谢

License

MIT

Install Server
F
license - not found
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • F
    license
    Not graded
    quality
    D
    maintenance
    A 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
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to directly operate Zhihu, including login, publishing articles and videos, searching content, getting recommendations, and commenting.
    5
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to search, read, and analyze Zhihu content including questions, answers, comments, and user activities through the MCP protocol.
    3
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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