Skip to main content
Glama
luyanhexay

zhihu-scraper-mcp

by luyanhexay

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

Search questions by keyword (title/description/answer count/view count/follower count/URL)

search_articles

Search articles by keyword (columns)

search_users

Search users by keyword

search_topics

Search topics by keyword

get_fulltext

Pass in a URL, return the full text of the answer/article (Markdown); for question URLs, return the merged full text of all answers

get_comments

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+

  • uv

  • 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-mcp

Credentials and Privacy

  • Authentication information is stored by the zhihu CLI in ~/.zhihu-cli/, not in this repository.

  • This repository contains no cookies; .gitignore additionally blocks files such as cookies.json to 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_fulltext automatically 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 paste to refresh the login session.

Acknowledgments

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