zh_mcp_server

Provides a Python-based MCP server that enables automatic article generation and posting to Zhihu via an MCP client.
  • python

24

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "victorzwx-zh_mcp_server": {
      "command": "python",
      "args": [
        "-m",
        "zh_mcp_server"
      ],
      "env": {
        "PYTHONIOENCODING": "utf-8"
      }
    }
  }
}

This MCP server lets you generate Zhihu articles automatically using a large model and post them through an MCP client. It provides a Python-based service that you can run locally or integrate with client tools, enabling streamlined article creation workflows.

How to use

You run the MCP server locally and connect to it from an MCP client (for example, Cherry Studio). Start the server in stdio mode so your client can communicate through standard input/output, or point a client to a remote MCP server if you have a URL. Once the server is running, your client can request article generation, preview content, and publish to Zhihu as an automated workflow.

To run the server from your environment, use one of the provided startup options. You can start the server as a Python module, which keeps the process lightweight and easy to deploy in scripts or IDEs.

How to install

Prerequisites you need before installing:

  • Python 3.10 or newer
  • Windows environment recommended for ease of setup
  • A network with access to Python packages and web drivers

Step 1: Clone the project repository.

git https://github.com/Victorzwx/zh_mcp_server.git

Step 2: Install required Python packages. This includes Selenium, Requests, MCP framework, and a webdriver helper.

pip install -r requirements.txt

Step 3: Install the ChromeDriver that matches your Chrome browser version. You must query your local Chrome version and install the corresponding driver.

npx @puppeteer/browsers install chromedriver@134.0.6998.166

Step 4: Alternatively, run the environment setup script. If this method fails, try the first option again to ensure compatibility.

python setup_environment.py

Step 5: Save your login cookies. This step will launch a browser window for you to authenticate and provide a verification code back to the terminal.

python -m zh_mcp_server.__login__

Step 6: Configure the MCP client to use the server. You can point the client to run the server as a Python module.

"zh_mcp_server": {
  "command": "python",
  "args": [
    "-m",
    "zh_mcp_server"
  ]
}

Additional notes

If you are integrating with code that requires explicit encoding to avoid character issues, you can launch the server with encoding support as shown in the examples. For example, when using a Java-based client, you can pass encoding parameters to ensure UTF-8 handling.

If you want to debug the model calls or observe browser interactions, you can disable the headless browser mode in the debugging path by adjusting the headless flag in the server code.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational