Get the FREE Ultimate OpenClaw Setup Guide →

zhihu_mcp_server

MCP server from chemany/zhihu_mcp_server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio chemany-zhihu_mcp_server python zhihu_http_api_server.py

How to use

This MCP server exposes a simple HTTP API to publish content to Zhihu. It intentionally avoids the full MCP protocol in favor of an intuitive REST interface, making it easier to integrate with other tools and automation. Core capabilities include creating Zhihu articles, posting answers, and managing columns, with support for image uploads and automatic login via Selenium. The server maintains session state so you can repeatedly publish content without re-authenticating on every request.

You can interact with the endpoints via standard HTTP requests. Health checks are available at the health endpoint, and you can create articles, answers, and columns by sending JSON payloads to the respective endpoints. The service is designed to handle image paths, which should point to accessible image files on the server side. Login automation is handled behind the scenes, but the first run typically requires manual login to establish a session, after which the session is persisted for subsequent requests.

How to install

Prerequisites:

  • Python 3.8+ installed on the host
  • Access to install Python packages (pip)
  • Chrome browser and matching ChromeDriver installed if Selenium login is used

Step-by-step installation:

  1. Clone or download the repository containing zhihu_mcp_server
  2. Create and activate a Python virtual environment (optional but recommended):
    • python -m venv venv
    • source venv/bin/activate # on Unix or macOS
    • venv\Scripts\activate # on Windows
  3. Install dependencies:
    • pip install -r requirements.txt
  4. Start the server:
    • python zhihu_http_api_server.py
  5. Verify the server is running by hitting the health endpoint:

Notes:

  • The default port for the Zhihu HTTP API server is 8005. You can adjust this in the code or environment if needed.
  • On first run, you may need to perform a manual login toZhihu to establish an authenticated session.

Additional notes

Tips and common issues:

  • ChromeDriver and Chrome: Ensure both are installed and compatible with your browser version since the server relies on Selenium for automated login.
  • First-run login: The server may require an initial manual login to Zhihu to seed the session. Once authenticated, the session should persist across restarts.
  • Image handling: Provide valid file paths for images in your requests; ensure the server process has read access to these files.
  • Endpoint structure: Endpoints are exposed under /zhihu-mcp-server/ and expect JSON payloads with fields demonstrated in the README (title, content, images, etc.).
  • Networking: If running behind a reverse proxy or in containers, ensure proper port exposure (default 8005) and path routing for /zhihu-mcp-server/* endpoints.

Related MCP Servers

Sponsor this space

Reach thousands of developers