Skip to main content
Glama
luyanhexay

zhihu-scraper-mcp

by luyanhexay

知乎 Scraper MCP Server

MCP クライアントに知乎の本文全文、完全なコメントツリー、タイプ別検索の読み取り機能を提供する MCP Server です。

これは zhihu-toolkit CLIzhihu コマンド)の薄いラッパーです。各ツールは CLI の --json インターフェースを呼び出し、結果を簡潔な構造にトリミングしてから返すため、アバター/HTML/冗長なタイムスタンプなどのフィールドでモデルのコンテキストが圧迫されるのを防ぎます。

3つの機能に特化しています:回答/記事の全文完全なコメントツリータイプ別の正確な検索——正確なリストが必要で、本文やコメントを取得したいシーンに適しています。

機能概要

ツール

役割

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 は一切含まれません。.gitignorecookies.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