Wenyan MCP Server
Enables the registration and application of custom CSS themes to visually style and format articles for consistent branding across platforms.
Supports processing and converting Markdown content into platform-specific rich text, with support for frontmatter metadata such as titles, authors, and cover images.
Allows publishing Markdown articles directly to WeChat Official Account draft boxes, including automatic image uploads to the media library and draft management.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Wenyan MCP ServerPublish my draft to WeChat using the OrangeHeart theme"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Wenyan MCP Server
Introduction
Wenyan is a multi-platform Markdown formatting and publishing tool that supports one-click conversion and publishing to:
WeChat Official Accounts
Zhihu
Toutiao
And other content platforms (continuously expanding)
Wenyan's goal is: Let writers focus on content, not formatting and platform adaptation.
Related MCP server: WeChat Official Account MCP
Different Versions of Wenyan
Wenyan currently offers various forms to cover different usage scenarios:
macOS App Store Version - MAC Desktop Application
Cross-platform Desktop Version - Windows/Linux
CLI Version - Command Line / CI Automated Publishing
👉 MCP Version - This Project
What is Wenyan MCP Server?
Simply put, it bridges the gap between "AI writing" and "WeChat Official Account publishing."
Based on the MCP protocol, AI clients like Claude Desktop can now directly call Wenyan's formatting engine. After finishing an article, there is no need to copy and paste back and forth in third-party editors; just let the AI format it for you and push it into your WeChat draft box.
Core Features:
Bypass Formatting Tools: AI-generated Markdown is directly converted to WeChat rich text and uploaded, eliminating intermediate steps.
Conversational Formatting: Simply type to tell the AI "switch to an orange style theme," and the style is applied automatically.
Complete Closed-loop Without Leaving the Window: Handle everything from "brainstorming topics -> writing articles -> adjusting formatting -> saving drafts" in the same chat window.
Practical Demonstrations:
Let AI help you manage your WeChat Official Account layout and publishing
Moraya MCP Use Case: Full WeChat Official Account Management
Features
One-click publishing of Markdown to WeChat Official Account draft box
Automatic upload of local images and covers
Support for remote Server publishing (bypassing IP whitelist restrictions)
Built-in multiple exquisite formatting themes
Support for custom themes
Provides standard MCP Tool interface
Supports automatic AI invocation:
Render Markdown
Theme management
Publish drafts
Quick Start
Installation
npm install -g @wenyan-md/mcpClaude Desktop Configuration (claude_desktop_config.json)::
{
"mcpServers": {
"wenyan-mcp": {
"command": "wenyan-mcp",
"env": {
"WECHAT_APP_ID": "your_app_id",
"WECHAT_APP_SECRET": "your_app_secret"
}
}
}
}Basic Usage
List Themes
Tell the AI:
What WeChat Official Account themes can you currently use?
AI response:
目前我支持的公众号主题包括以下这些,每个主题都有独特的风格和配色,适用于不同的内容调性:
1. **Default(默认)**
简洁经典的排版,适合长文阅读,通用性强。
2. **OrangeHeart(橙心)**
暖橙色调,优雅而富有活力,适合情感、生活类内容。
...Register Theme
Tell the AI:
Help me register this css (https://wenyan.yuzhi.tech/manhua.css) as a new WeChat Official Account theme, named: xiuluochang
AI response:
好的,已成功将 CSS 样式表注册为新的公众号主题,主题名称为:**xiuluochang**。
您现在可以在公众号后台选择该主题进行应用,样式将按照 `https://wenyan.yuzhi.tech/manhua.css` 的定义进行渲染。
如有需要进一步自定义或更换主题,随时告诉我!Delete Theme
Tell the AI:
Delete the WeChat Official Account theme named "xiuluochang"
AI response:
公众号主题 “xiuluochang” 已成功删除。Publish Article
Tell the AI:
Use the phycat theme to publish this article to the WeChat Official Account:
./tests/publish.md
AI response:
文章已成功发布至微信公众号草稿箱!🎉
- **主题**:phycat
- **媒体ID**:xxx
您可登录微信公众号后台,在「草稿箱」中查看并编辑文章,确认无误后即可一键发布。如需进一步排版优化、添加封面或设置摘要,我也可以协助您完成!
是否需要我帮您生成一篇发布文案或封面建议? 😊Concepts
Environment Variable Configuration
[!IMPORTANT]
Please ensure the following environment variables are configured when starting MCP, otherwise the upload interface will fail.
WECHAT_APP_IDWECHAT_APP_SECRET
WeChat Official Account IP Whitelist
[!IMPORTANT]
Please ensure the IP of the machine running Wenyan has been added to the IP whitelist in the WeChat Official Account backend, otherwise the upload interface will fail.
Configuration documentation: https://yuzhi.tech/docs/wenyan/upload
Article Format
To upload articles correctly, each Markdown file needs to contain a frontmatter section at the top:
---
title: 在本地跑一个大语言模型(2) - 给模型提供外部知识库
cover: /Users/xxx/image.jpg
author: xxx
source_url: http://
---Field Description:
Field | Required | Description |
title | ✅ | Article title |
cover | ❌ | Cover image (local path or web URL) |
author | ❌ | Author |
source_url | ❌ | Original link |
type | ❌ | Article type, set to |
image_list | ❌ | List of image paths (for Little Green Book, max 20) |
need_open_comment | ❌ | Whether to open comments |
only_fans_can_comment | ❌ | Whether only fans can comment |
Notes:
If no cover is specified, the first image in the body will be automatically used as the cover
Cover supports local paths and web URLs
typeandimage_listare used for image message publishing
In-article Images and Article Cover
Before publishing an article to the Official Account, Wenyan will automatically process all images in the article according to WeChat's requirements and upload them to the Official Account material library. Currently, Wenyan supports the following images well:
Local hard drive absolute path (e.g.,
/Users/xxx/image.jpg)Network path (e.g.,
https://example.com/image.jpg)Relative path of the current article (e.g.,
./assets/image.png)
Publishing Image Messages (Little Green Book)
The difference between publishing image messages and article messages is that you need to specify an image list in the frontmatter. Two methods are supported:
Method 1: Use type: image (Recommended)
Set type: image in the frontmatter, and the CLI will automatically extract all images from the body:
---
title: 人勤春来早,读书正当时
type: image
---


Method 2: Manually specify image_list
List image paths directly in the frontmatter:
---
title: 人勤春来早,读书正当时
image_list:
- ./1.jpeg
- ./2.jpeg
- ./3.jpeg
- ./4.jpeg
- ./5.jpeg
---image_list supports up to 20 images, with the first one being the cover.
Server Mode
Compared to the purely local Stdio Mode, wenyan-mcp also provides Client–Server Mode. Both modes have identical operating effects, and you can choose the most suitable method based on your operating environment and network conditions.
In local mode, MCP directly calls the WeChat Official Account API to complete image uploads and draft publishing.
flowchart LR
MCP[Wenyan MCP] --> Wechat[公众号 API]In remote client mode, MCP acts as a client, sending publishing requests to the Wenyan Server deployed on a cloud server, and the Server completes the WeChat Official Account API calls.
flowchart LR
MCP[Wenyan MCP] --> Server[Wenyan Server] --> Wechat[公众号 API]Suitable for:
Users without a fixed local IP who need to frequently add IP whitelists
Users who need team collaboration
Supporting CI/CD automated publishing
Supporting AI Agent automated publishing
Claude Desktop Configuration::
{
"mcpServers": {
"wenyan-mcp": {
"command": "wenyan-mcp",
"args": ["--server", "https://api.example.com", "--api-key", "your-api-key"]
}
}
}Multi-Account Publishing (Advanced)
[!IMPORTANT]
You must use
servermode to use the multi-account publishing feature.
Steps:
First, deploy the
serverConfigure multiple WeChat credentials on the
serverside, refer to the documentationLet the
MCP clientconnect to theserver
Tell the AI:
Use the phycat theme to publish this article to the WeChat Official Account (your_app_id):
./tests/publish.md
Docker Deployment
Suitable for users who do not want to install a Node.js environment.
docker pull caol64/wenyan-mcp:latestClaude Desktop Configuration::
{
"mcpServers": {
"wenyan-mcp": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-v", "/your/host/file/path:/mnt/host-downloads",
"-e", "WECHAT_APP_ID=your_app_id",
"-e", "WECHAT_APP_SECRET=your_app_secret",
"-e", "HOST_FILE_PATH=/your/host/file/path",
"caol64/wenyan-mcp"
]
}
}
}Special Notes for Docker Configuration:
Mount Directory (
-v): You must mount the host's file/image directory to/mnt/host-downloadsinside the container.Environment Variable (
HOST_FILE_PATH): Must be consistent with the file/image directory path mounted on the host.Principle: The local images referenced in your Markdown file/article should be placed in this directory, and Docker will automatically map them so the container can read and upload them.
How to Debug
It is recommended to use the official Inspector for debugging:
npx @modelcontextprotocol/inspector <command>Successful startup will show a prompt similar to:
🔗 Open inspector with token pre-filled:
http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=761c05058aa4f84ad02280e62d7a7e52ec0430d00c4c7a61492cca59f9eac299
(Auto-open is disabled when authentication is enabled)Visit the link above to open the debugging page.

Fill in the startup command correctly
Add environment variables
Click Connect
Select Tools -> List Tools
Select the interface to debug
Fill in the parameters and click Run Tool
View full parameters
Sponsorship
If you find Wenyan helpful, you can buy my cat some canned food ❤️
License
Apache License Version 2.0
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI tools to automatically publish articles to WeChat Official Accounts, supporting Markdown-to-HTML conversion, image handling, and both preview and official publishing modes.254MIT
- Alicense-qualityCmaintenanceEnables AI applications to manage WeChat Official Accounts through standardized tools for authentication, media uploads, draft creation, article publishing, and permanent material management.18861MIT
- Flicense-qualityDmaintenanceEnables saving articles to WeChat Official Account drafts with support for rich text, automatic image upload, and Markdown rendering including Mermaid diagrams.1
- FlicenseAqualityFmaintenanceEnables AI agents to publish articles to WeChat Official Account (微信公众号). Supports image upload, draft creation, and publishing via standardized MCP protocol.51
Related MCP Connectors
Connect any AI agent to 11+ social platforms: schedule, publish & track posts via hosted MCP.
Publish Markdown or HTML to a shareable link from your AI assistant. OAuth, no API keys.
AI agent website builder. Create and publish link-in-bio sites via MCP or REST API.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/caol64/wenyan-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server