zhihu_mcp_server
MCP server from chemany/zhihu_mcp_server
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:
- Clone or download the repository containing zhihu_mcp_server
- 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
- Install dependencies:
- pip install -r requirements.txt
- Start the server:
- python zhihu_http_api_server.py
- 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
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP