✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

UBOS Asset Marketplace: Zhihu Auto-Publishing with MCP Server

In the rapidly evolving landscape of AI-driven content creation, UBOS introduces a groundbreaking asset within its marketplace: the Zhihu Auto-Publishing MCP (Model Context Protocol) Server. This innovative tool is designed to streamline the process of generating and publishing articles on Zhihu, a prominent Chinese question-and-answer platform, by leveraging the power of large language models (LLMs).

What is the Zhihu Auto-Publishing MCP Server?

The Zhihu Auto-Publishing MCP Server is a specialized application that facilitates the automated creation and posting of articles on Zhihu. It operates as a bridge between LLMs and the Zhihu platform, enabling users to generate content using AI and then automatically publish it. Built upon the MCP standard, this server ensures seamless communication between AI models and the publishing platform, automating a process that would otherwise be time-consuming and resource-intensive.

At its core, the MCP Server uses Selenium and ChromeDriver to automate interactions with the Zhihu website. Selenium is a powerful tool for automating web browsers, allowing the server to programmatically navigate Zhihu, log in, and post articles. ChromeDriver is a specific driver for Google Chrome, enabling Selenium to control Chrome and execute these tasks.

Use Cases

The Zhihu Auto-Publishing MCP Server offers a range of compelling use cases for content creators, marketers, and businesses:

  • Automated Content Generation: Generate articles on Zhihu with AI, freeing up human content writers to focus on more complex tasks.
  • Content Marketing Automation: Automate the process of populating Zhihu with engaging content, driving traffic and building brand awareness.
  • Lead Generation: Use AI-generated articles to attract potential leads and customers to your business.
  • Research and Development: Automate the process of gathering data from Zhihu for research purposes.
  • Automated Knowledge Sharing: Allows for streamlined sharing of expert knowledge across a wider audience on the Zhihu platform, fostering community engagement and informational exchange.
  • Cross-Platform Content Strategy: By integrating with other platforms through UBOS, users can repurpose and adapt content generated for Zhihu across various social media and blog sites.

Key Features

The Zhihu Auto-Publishing MCP Server boasts a comprehensive set of features designed to enhance content creation and automation:

  • Automated Article Posting: The server automates the entire process of posting articles on Zhihu, from logging in to submitting the content.
  • Integration with Large Language Models: Seamlessly integrates with various LLMs, allowing you to generate high-quality content using AI.
  • Selenium and ChromeDriver Integration: Utilizes Selenium and ChromeDriver for robust and reliable web automation.
  • Cookie Management: Securely stores and manages your Zhihu login cookies, ensuring seamless access to your account.
  • Customizable Settings: Allows you to customize various settings, such as the posting schedule and content format.
  • Error Handling: Implements robust error handling mechanisms to ensure reliable operation.
  • Headless Browser Mode: Support for running in headless mode, allowing you to automate tasks without a visible browser window. This can be disabled for debugging purposes.
  • MCP Compliance: Adheres to the Model Context Protocol (MCP), facilitating easy integration with other AI tools and platforms.
  • Encoding Support: Supports UTF-8 encoding, preventing garbled text issues when used with Spring AI or other Java-based applications.
  • Simplified Setup: Provides straightforward setup instructions and scripts to ensure a smooth installation process.

Installation and Configuration

Setting up the Zhihu Auto-Publishing MCP Server involves several key steps:

  1. Clone the Code:

    Begin by cloning the code repository from GitHub:

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

  2. Environment Configuration:

    • Prerequisites: It is recommended to run the server in a Windows environment and ensure that your Python version is 3.10 or higher.

    • Method 1: Using requirements.txt Install the necessary Python packages using pip:

      bash pip install -r requirements.txt

      This will install the required versions of selenium, requests, mcp, and webdriver-manager. Next, install ChromeDriver. This project depends on Google Chrome. Determine your Chrome browser version (e.g., 134.0.6998.166) and install the corresponding ChromeDriver:

      bash npx @puppeteer/browsers install chromedriver@YOUR_CHROME_VERSION

      Replace YOUR_CHROME_VERSION with your actual Chrome version.

    • Method 2: Using setup_environment.py Alternatively, you can run the setup_environment.py script:

      bash python setup_environment.py

      If this method fails, it may indicate an incorrect ChromeDriver version, and you should revert to Method 1.

  3. Save Personal Cookies:

    Run the cookie-saving script:

    bash python -m zh_mcp_server.login

    This will automatically open a Google Chrome browser. Enter your mobile phone account and click “Get Verification Code.” Enter the received verification code into the terminal where you ran the script.

  4. Configure MCP Service in MCP Client:

    In your MCP client (e.g., Cherry Studio), configure the MCP service as follows:

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

    If using the MCP service with code (e.g., Spring AI-based Java code), add the encoding format to avoid garbled characters:

    “zh_mcp_server”: { “command”: “D:anacondapython.exe”, “args”: [ “-m”, “zh_mcp_server”, “–encoding=utf-8” ], “env”: { “PYTHONIOENCODING”: “utf-8” } }

Debugging

To debug the process of large language models calling the MCP service or to visualize browser operations, disable headless browser mode by setting headless=False in server.py:

python poster = ZhuHuPoster(path, headless=True) ## Set to False for debugging

Integration with UBOS

The Zhihu Auto-Publishing MCP Server seamlessly integrates with the UBOS platform, enabling users to leverage the full range of UBOS’s AI agent development capabilities. UBOS provides a comprehensive suite of tools for orchestrating AI agents, connecting them with enterprise data, building custom AI agents with your LLM model, and creating multi-agent systems.

  • Centralized Management: Manage and monitor your Zhihu automation tasks from a central UBOS dashboard.
  • Data Integration: Connect the MCP Server with your enterprise data sources, allowing AI agents to generate content based on real-time information.
  • Custom AI Agent Development: Build custom AI agents specifically tailored for Zhihu content creation.
  • Multi-Agent System Orchestration: Orchestrate multiple AI agents to create a comprehensive content strategy for Zhihu.

Benefits of Using UBOS

Using the Zhihu Auto-Publishing MCP Server in conjunction with the UBOS platform offers several key benefits:

  • Increased Efficiency: Automate the entire Zhihu content creation process, freeing up valuable time and resources.
  • Improved Content Quality: Leverage the power of AI to generate high-quality, engaging content.
  • Enhanced Scalability: Scale your Zhihu content strategy without the need for additional human resources.
  • Reduced Costs: Reduce the cost of content creation by automating repetitive tasks.
  • Better Insights: Gain valuable insights into your Zhihu content performance through UBOS’s analytics dashboards.

Conclusion

The Zhihu Auto-Publishing MCP Server is a powerful tool for automating content creation and publishing on Zhihu. By integrating with large language models and the UBOS platform, it enables users to streamline their content strategy, improve content quality, and reduce costs. Whether you are a content creator, marketer, or business, the Zhihu Auto-Publishing MCP Server can help you unlock the full potential of Zhihu as a content marketing platform.

By leveraging the capabilities of UBOS, this MCP server becomes an integral part of a broader AI-driven ecosystem, allowing businesses to fully automate content creation, marketing, and knowledge dissemination on one of China’s leading knowledge-sharing platforms.

Featured Templates

View More
Customer service
Service ERP
126 1188
AI Engineering
Python Bug Fixer
119 1433
Customer service
AI-Powered Product List Manager
153 868
AI Agents
AI Video Generator
252 2007 5.0

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.