文颜 MCP Server – an MCP server that formats Markdown with Wenyan themes and publishes the result to WeChat Official Account drafts, including automatic image upload.
https://github.com/caol64/wenyan-mcpIf you publish technical content to WeChat Official Accounts, you know the drill: write in Markdown, manually convert to WeChat's format, upload images one by one, fiddle with styling until it looks professional. It's a productivity killer.
Wenyan MCP Server eliminates this entire workflow. Write your content in Markdown, let AI handle the formatting and publishing pipeline, and get back to what matters - creating content.
WeChat's publishing interface wasn't built for developers. You're stuck copying content between tools, manually uploading images, and wrestling with inconsistent formatting. Meanwhile, your AI models can't directly interface with WeChat's API.
Wenyan bridges this gap by providing an MCP server that connects your AI workflow directly to WeChat Official Account publishing. Your AI can now format content professionally and publish it without you touching WeChat's interface.
AI-Powered Formatting: Uses the same theme system as the popular Wenyan formatting tool. Your Markdown gets transformed into professionally styled WeChat articles with consistent typography, code highlighting, and visual hierarchy.
Automatic Image Pipeline: Handles both local images and web URLs. Point to your image directory, and the server uploads everything to WeChat automatically. No more dragging and dropping files one by one.
Frontmatter-Driven Publishing: Configure titles, covers, and metadata right in your Markdown frontmatter. The server reads these settings and applies them during publication.
MCP Integration: Your AI models can directly invoke formatting and publishing operations. Ask Claude or ChatGPT to "format this article and publish it to WeChat" - it just works.
Technical Blog Automation: Write tutorials in Markdown with your usual workflow. Your AI assistant formats them with syntax highlighting, proper spacing, and professional styling, then publishes directly to your WeChat account.
Content Series Management: Publishing a multi-part technical series? The AI can maintain consistent formatting across all articles, handle cross-references, and manage the publishing schedule.
Image-Heavy Documentation: Screenshots, diagrams, code examples - the server handles the entire image upload pipeline while preserving your content structure.
Collaborative Writing: Team members write in Markdown, AI handles the publishing pipeline. No more bottlenecks waiting for someone to manually format and publish content.
The server supports both local and Docker deployment. For local development:
git clone https://github.com/caol64/wenyan-mcp.git
cd wenyan-mcp
npm install && npx tsc -b && npm run copy-assets
Add to your MCP configuration:
{
"mcpServers": {
"wenyan-mcp": {
"name": "WeChat Publisher",
"command": "node",
"args": ["path/to/wenyan-mcp/dist/index.js"],
"env": {
"WECHAT_APP_ID": "your_app_id",
"WECHAT_APP_SECRET": "your_app_secret"
}
}
}
}
For production deployment, the Docker setup handles image mounting and environment isolation cleanly.
Your Markdown files need minimal frontmatter:
---
title: Your Article Title
cover: /path/to/cover-image.jpg
---
# Your Content Here
Regular Markdown with images, code blocks, whatever you need.
The server handles the rest - theme application, image uploads, WeChat API calls, draft creation.
You're already writing in Markdown. You're already using AI for content workflows. This server connects those two realities to WeChat's publishing platform without forcing you to change your existing process.
Instead of context-switching between your editor, image tools, and WeChat's interface, your entire publishing pipeline runs through your AI assistant. Write, review, publish - done.
The 422 GitHub stars and active community suggest this approach resonates with developers who've experienced the WeChat publishing pain firsthand. You get professional formatting, automated image handling, and direct AI integration in one tool.