zhihu-scraper-mcp
知乎 Scraper MCP Server
MCP クライアントに知乎の本文全文、完全なコメントツリー、タイプ別検索の読み取り機能を提供する MCP Server です。
これは zhihu-toolkit CLI(zhihu コマンド)の薄いラッパーです。各ツールは CLI の --json インターフェースを呼び出し、結果を簡潔な構造にトリミングしてから返すため、アバター/HTML/冗長なタイムスタンプなどのフィールドでモデルのコンテキストが圧迫されるのを防ぎます。
3つの機能に特化しています:回答/記事の全文、完全なコメントツリー、タイプ別の正確な検索——正確なリストが必要で、本文やコメントを取得したいシーンに適しています。
機能概要
ツール | 役割 |
| キーワードで質問を検索(タイトル/説明/回答数/閲覧数/フォロー数/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