Wechat-Read -in-Rust
一个用rust写的微信公众号抓取MCP,实现了浏览器抓取的反爬绕过机制
claude mcp add --transport stdio zlatanwic-wechat-read-mcp-in-rust ./weixin-mcp-rs \ --env CHROME="path to Chrome/Chromium executable or leave unset if Chrome is in PATH"
How to use
Wechat-Read MCP in Rust provides an MCP service that renders a WeChat article using a headless Chrome session (via Chrome DevTools Protocol), then extracts structured metadata such as title, author, publish time, and the article content. It is designed to be invoked by an AI client over the MCP protocol through stdio JSON-RPC. The Rust binary is distributed as a single executable, so deployment does not require Python or a virtual environment. To use it, run the produced binary and connect your MCP client by sending initialization and subsequent read requests; the server will respond with a JSON payload containing the article data or an error field if something goes wrong. The MCP tool exposed by this server is read_weixin_article, which accepts a WeChat article URL and returns a structured object containing title, author, publish_time, and content.
How to install
Prerequisites:\n- Rust toolchain installed (Rustup)\n - Command: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n- Chrome or Chromium installed for headless browsing\n\n1) Clone the repository or download the prebuilt binary for your platform.\n2) Build from source (recommended for development):\n bash\n cargo build\n \n To produce an optimized release build:\n bash\n cargo build --release\n \n3) Ensure the resulting binary (target/release/weixin-mcp-rs or target/debug/weixin-mcp-rs) is executable.\n4) Run the binary directly to start the MCP server and then connect an MCP client via stdio JSON-RPC.\n5) (Optional) If you plan to use as a service, wrap the binary in a systemd/upstart script or similar init system for automatic startup.\n\nNotes:\n- If Chrome/Chromium is not found, set the CHROME environment variable to the path of the Chrome executable.\n- The first compile of chromiumoxide may be slow; incremental builds are faster on subsequent builds.
Additional notes
Tips and common issues:\n- Environment variable CHROME can be used to point to a specific Chromium/Chrome binary if it is not on the system PATH.\n- The MCP client should send proper initialization and subsequent JSON-RPC requests over stdin/stdout as per MCP protocol.\n- If you encounter empty article content, verify that the URL begins with https://mp.weixin.qq.com/s/ and that the page loads in a real browser; some WeChat pages may require additional navigation or anti-bot considerations.\n- For production deployments, consider building a release binary and packaging it with the required Chrome/Chromium dependencies.\n- Logging is configured to output to stderr to avoid polluting stdout; check logs for troubleshooting.\n- The read_weixin_article tool requires network access to fetch the article content through the headless browser.\n- If you encounter timeouts, ensure the URL is accessible and that the page loads within the browser context.
Related MCP Servers
ida -rs
Headless IDA Pro MCP Server
rust -schema
A type-safe implementation of the official Model Context Protocol (MCP) schema in Rust.
turbovault
MCP server that transforms your Obsidian vault into an intelligent knowledge system
mcp-loxone
An opinionated Model Context Protocol (MCP) server for controlling Loxone home automation systems.
MCP-Development-with-Rust
This comprehensive learning resource provides two complete tutorials for mastering Model Context Protocol (MCP) development with Rust. From beginner-friendly introductions to production-ready enterprise applications, these tutorials guide you through every aspect of building robust MCP servers.
backlog -rust
MCP server for Backlog, project management service.