How to Configure WeChat Article Reading in Agent Reach: Complete Setup Workflow
To configure WeChat article reading in Agent Reach, install the Exa MCP search backend via mcporter, set up the Camoufox browser and miku_ai extraction libraries, and clone the wechat-article-for-ai helper repository.
Agent Reach provides a dedicated WeChat channel that enables searching and reading public WeChat Official Account articles. This workflow integrates the Exa search API for content retrieval and Camoufox for headless browser automation when needed. Following the complete setup ensures full access to both search and read capabilities for WeChat content.
Run the Automated Installer
Agent Reach provides a single command that executes the complete configuration workflow. Running agent-reach install --channels=wechat triggers three internal routines defined in agent_reach/cli.py:
Configure the Exa MCP Backend
The installer first ensures the Exa MCP (Model Context Protocol) search service is configured. In agent_reach/cli.py, the _install_mcporter() function (lines 1212-1254) checks for the mcporter binary and runs:
mcporter config add exa https://mcp.exa.ai/mcp
This establishes the free Exa search endpoint as the primary backend for WeChat article discovery and full-text extraction.
Install WeChat Python Packages
Next, the _install_wechat_deps() function (lines 992-1022) automatically detects and installs required packages:
- camoufox: GeoIP-enabled headless browser for JavaScript rendering
- miku_ai: Article text extraction engine
- markdownify, beautifulsoup4, httpx: HTML parsing and HTTP utilities
The installer builds the appropriate pip install command and verifies successful imports before proceeding.
Clone the Helper Repository
Finally, the installer clones the wechat-article-for-ai repository into ~/.agent-reach/tools/wechat-article-for-ai (lines 842-860). This external CLI tool contains the low-level logic for navigating WeChat's public article infrastructure and extracting clean text content.
Verify the Installation
Once installation completes, run the diagnostic command to verify all components are properly integrated:
agent-reach doctor
This executes WeChatChannel.check() in agent_reach/channels/wechat.py (lines 38-63), which returns one of two states:
- "ok": Both Exa and Camoufox are present, enabling full search and read capabilities
- "warn": Only one component is available, indicating limited functionality
The check ensures that the MCP server configuration, Python dependencies, and helper tool are all accessible before attempting operations.
Read and Search WeChat Articles
With the channel reporting "ok" status, you can process WeChat content through either the Python API or CLI interface.
Using the Python Library
Import the core AgentReach class and invoke the read method with any public WeChat article URL:
from agent_reach.core import AgentReach
ar = AgentReach()
article = ar.read("https://mp.weixin.qq.com/s?__biz=...")
print(article)
The WeChatChannel.read() implementation in agent_reach/channels/wechat.py prefers Exa for full-text extraction, automatically falling back to Camoufox when the MCP service cannot retrieve the content.
Using the Command Line Interface
For quick operations or shell scripting, use the CLI commands:
# Fetch a specific article
agent-reach read https://mp.weixin.qq.com/s?__biz=...
# Search for articles by keyword
agent-reach search wechat "machine learning conference"
The CLI routes requests through the central logic in agent_reach/core.py, which selects WeChatChannel when detecting WeChat URL patterns via the can_handle method.
Summary
- Install the Exa backend: The
_install_mcporter()function inagent_reach/cli.pyconfigures the MCP search service athttps://mcp.exa.ai/mcp - Install Python dependencies:
_install_wechat_deps()handles camoufox, miku_ai, and supporting libraries automatically - Clone the helper tool: The installer pulls wechat-article-for-ai to
~/.agent-reach/tools/for low-level article fetching - Verify with doctor: Execute
agent-reach doctorto triggerWeChatChannel.check()and confirm "ok" status - Start reading: Use
agent-reach read <url>or the PythonAgentReach().read()method to extract article content
Frequently Asked Questions
What is the purpose of the Exa MCP service in WeChat article reading?
The Exa MCP (Model Context Protocol) service provides the primary search and content extraction backend for WeChat articles. According to the source code in agent_reach/cli.py, the _install_mcporter() function configures Exa to handle both article discovery and full-text retrieval. When Exa is unavailable, the system falls back to Camoufox for direct browser rendering.
Why does the installation require both Exa and Camoufox?
Exa serves as the preferred method for content extraction due to its specialized search capabilities and MCP integration, while Camoufox acts as a fallback for articles that require JavaScript rendering or when Exa cannot access specific content. The WeChatChannel.check() method in agent_reach/channels/wechat.py verifies both components are present to report "ok" status, ensuring robust access to WeChat's public article ecosystem.
Where does Agent Reach store the WeChat helper tool?
Agent Reach clones the wechat-article-for-ai repository into ~/.agent-reach/tools/wechat-article-for-ai during the installation process. This path is hardcoded in agent_reach/cli.py lines 842-860 within the installation routine. The helper contains the low-level CLI logic for fetching articles that the main Agent Reach channel interfaces with.
How do I troubleshoot a "warn" status from the WeChat channel?
A "warn" status from agent-reach doctor indicates that only one of the two required components (Exa or Camoufox) is properly installed. Check the output logs from the installation commands to see which dependency failed. You can manually verify Exa configuration by checking mcporter settings, or reinstall specific components by running agent-reach install --channels=wechat again to trigger the _install_wechat_deps() and _install_mcporter() routines.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →