
Zhihu
io.github.KrisTHL181Published by GitHub account KrisTHL181v0.3.0Updated Oct 29, 2026
Zhihu CLI for AI agents: search, read, download, and publish from the terminal.
Overview
Unofficial Zhihu CLI exposed as an MCP server, letting an assistant search, read, download, publish and analyze Zhihu content from the terminal.
- What you can do
- Search and browse Zhihu questions, articles, users, topics, feeds, hot lists and Zhihu Daily
- Download articles, answers, questions, pins and videos as Markdown files
- Publish and edit answers and articles written in Markdown
- Interact socially: vote, thank, follow, block, comment, manage collections, send messages
- Export creations and activity as JSON, plus creator income analytics and NLP tools such as word frequency, word clouds and clustering
- When to use it
- Useful when you want an assistant to work with Zhihu content without a browser: researching topics, archiving posts as Markdown, drafting and publishing answers, or analyzing your own creator data and downloaded library.
- Requirements
- Runs locally over stdio as a Python package (zhihu-mcp, part of zhihu-toolkit); Python 3.10 or newer. A Zhihu account session is needed, obtained by pasting a cURL from browser DevTools, QR-code login, or importing a local browser session. Optional extras enable NLP, creator analytics, LLM and browser-import features.
Installation
In SourceWeft
- Open Zhihu in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
🧢 zhihu-cli
The terminal is your new Zhihu HQ.
A feature-complete, automation-ready Zhihu CLI & Developer Toolkit.
zhihu-cli turns your terminal into a full-featured Zhihu client. Authenticate once, then browse, search, download, publish, and analyze — without ever opening a browser.
⚠️ This is an unofficial CLI for Zhihu. Use at your own risk. Not affiliated with Zhihu Inc.
👉 Looking for the DSH plugin? → dsh-plugin/
🚀 Quick Start
Requirement: Python 3.10 or newer. Check your version with
python --versionbefore installing.
1. Authenticate
2. Verify
✨ What You Can Do
📖 Read & Browse
Browse Zhihu's feeds, hot lists, questions, articles, pins, and comments — all rendered in your terminal with a Rich-powered pager. Explore the real-time trending list with excerpts, scroll through your personalized recommend feed, or dive into a question and its full answer thread without clicking a single link. Zhihu Daily (知乎日报) has its own group: zhihu daily latest, zhihu daily before <date>, and zhihu daily story <id> --save.
💾 Download for Offline
Save any Zhihu content (articles, answers, questions, pins, videos) as clean Markdown with YAML frontmatter. Download individual pieces or batch-process from a manifest. Everything lands in ~/.zhihu-cli/downloads/, organized by type, ready for your note-taking system or offline reading.
🔍 Search
Search questions, articles, users, and topics across Zhihu. Fine-tune result depth and quantity — all from the command line.
✍️ Publish & Edit
Write answers and articles in Markdown, publish them to Zhihu with one command. Need to update? Modify existing answers and articles from your local files. Markdown-to-HTML conversion happens automatically via Zhihu's own rendering pipeline.
💬 Interact
Vote, thank, follow, block, and comment — full social interaction without the browser. Manage collections: create, populate, and organize them. Send and receive direct messages, and stream real-time notifications and chat via MQTT.
🕸️ Scrape & Export
Batch-export your creations, activity history, answers, and articles as structured JSON. Use the universal converter to merge and normalize across formats for your own data pipeline.
📊 Analyze
Creator analytics — pull your Zhihu income data and visualize it: monthly summaries, trend charts (with EMA), advanced indicators (Bollinger Bands, MACD), derivative analysis (velocity/acceleration/jerk), weekday breakdowns, and per-content daily metrics. Charts are saved as PNGs.
NLP tools — run word frequency analysis, generate word clouds, and perform K-means clustering on your downloaded content. All operate across your full Markdown library.
🔐 Multi-Account
Save multiple profiles from different accounts, switch between them with a single command. Each profile keeps its own auth credentials and cookies.
🏗️ Architecture
🧪 Extras
Optional Dependencies
Shell Completions
Click ships completion for each shell — add the matching line to your rc file:
From a repository clone, python autocomp.py detects your shell and prints the right line.
🤝 Contributing
PRs welcome! The codebase is structured for extensibility:
- New command? Add a file to
commands/with aregister_<name>(group)function, import it inmain.py. - New handler? Add a file to
content/handlers/— follow the existing patterns. - New extension? Create
extensions/<name>/with an__init__.pyexposingregister_cli(group).
Run the formatter before submitting:
📜 License
MIT
Made with ❤️ and way too many terminal sessions.
Report a bug · Fork this repository · Star ⭐ this repo!
Source: README.md at commit d57cc08
Tools
0Version history
1- v0.3.0LatestOct 29, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts