Content
<div align="center">
<img alt="logo" src="https://media.githubusercontent.com/media/caol64/wenyan-mcp/main/data/wenyan-mcp.png" width="256" />
</div>
# Tool List
[](https://www.npmjs.com/package/@wenyan-md/mcp)
[](LICENSE)

[](https://hub.docker.com/r/caol64/wenyan-mcp)
[](https://github.com/caol64/wenyan-mcp)
## Introduction
**[Wenyan](https://wenyan.yuzhi.tech)** is a multi-platform Markdown editing and publishing tool that supports converting Markdown and publishing it to various content platforms with just one click:
- WeChat Official Account
- Zhihu
- Toutiao
- And other content platforms (continuously expanding)
Wenyan's goal is to **let writers focus on content, not formatting and platform adaptation**.
## Different Versions of Wenyan
Wenyan currently offers multiple versions, covering different usage scenarios:
- [macOS App Store Version](https://github.com/caol64/wenyan) - MAC Desktop Application
- [Cross-Platform Desktop Version](https://github.com/caol64/wenyan-pc) - Windows/Linux
- [CLI Version](https://github.com/caol64/wenyan-cli) - Command Line / CI Automated Publishing
- [MCP Version](https://github.com/caol64/wenyan-mcp) - This Project
## What is Wenyan MCP Server?
In simple terms, it bridges "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 writing an article, there's no need to copy and paste back and forth in a third-party editor. Instead, let AI help with formatting and directly put it into the WeChat draft box.
**Core Features:**
- **Bypass Formatting Tools**: AI-generated Markdown directly converted to WeChat rich text and uploaded, eliminating intermediate steps.
- **Conversational Formatting**: Directly type to AI, "Change to an orange style theme," and the style automatically takes effect.
- **Complete Loop within the Same Window**: Smoothly complete all operations from "topic selection" to "article writing" to "formatting adjustment" to "draft saving" within the same chat box.
**Practical Demo**:
* [Let AI Help You Manage Your WeChat Official Account's Formatting and Publishing](https://babyno.top/posts/2025/06/let-ai-help-you-manage-your-gzh-layout-and-publishing/)
* [Moraya MCP Usage Example: WeChat Official Account Full托管](https://github.com/zouwei/moraya/wiki/Moraya-MCP-%E4%BD%BF%E7%94%A8%E6%A1%88%E4%BE%8B%EF%BC%9A%E5%BE%AE%E4%BF%A1%E5%85%AC%E4%BC%97%E5%8F%B7%E5%85%A8%E6%89%98%E7%AE%A1)
## Features
- One-click Publish Markdown to WeChat Official Account Draft Box
- Automatic Upload of Local Images and Covers
- Support Remote Server Publishing (Bypass IP Whitelist Restrictions)
- Built-in Multiple Exquisite Formatting Themes
- Support Custom Themes
- Provide Standard MCP Tool Interface
- Support AI Automatic Call:
- Render Markdown
- Theme Management
- Publish Drafts
## Quick Start
**Installation**
```bash
npm install -g @wenyan-md/mcp
```
**Claude Desktop Configuration (claude_desktop_config.json):**
```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 AI:
> What themes can you currently use for WeChat Official Accounts?
AI Reply:
```
Currently, I support the following WeChat Official Account themes, each with a unique style and color scheme suitable for different content tones:
1. **Default**
A concise and classic layout, suitable for long-form reading, and has strong versatility.
2. **OrangeHeart**
A warm orange tone, elegant and vibrant, suitable for emotional and life-related content.
...
```
### Register Theme
Tell AI:
> Help me register this CSS (https://wenyan.yuzhi.tech/manhua.css) as a new WeChat Official Account theme, named: xiuluochang
AI Reply:
```
Done, successfully registered the CSS stylesheet as a new WeChat Official Account theme, named: **xiuluochang**.
You can now select and apply this theme in the WeChat Official Account backend, and the style will be rendered according to the definition at `https://wenyan.yuzhi.tech/manhua.css`.
If you need further customization or theme changes, let me know!
```
### Delete Theme
Tell AI:
> Delete the WeChat Official Account theme named "xiuluochang"
AI Reply:
```
The WeChat Official Account theme "xiuluochang" has been successfully deleted.
```
### Publish Article
Tell AI:
> Use the phycat theme to publish this article to WeChat Official Account: `./tests/publish.md`
AI Reply:
```
The article has been successfully published to the WeChat Official Account draft box! 🎉
- **Theme**: phycat
- **Media ID**: xxx
You can log in to the WeChat Official Account backend, view and edit the article in the "Draft Box," and publish it with one click after confirming it's correct. If you need further formatting optimization, add a cover, or set a summary, I can also assist you!
Would you like me to help generate a publishing post or cover suggestions? 😊
```
## Concepts
### Environment Variable Configuration
> [!IMPORTANT]
>
> Ensure the following environment variables are configured when MCP starts; otherwise, the upload interface will fail.
- `WECHAT_APP_ID`
- `WECHAT_APP_SECRET`
### WeChat Official Account IP Whitelist
> [!IMPORTANT]
>
> Ensure the IP of the machine running Wenyan is added to the WeChat Official Account backend's IP whitelist; otherwise, the upload interface will fail.
Configuration Documentation: [https://yuzhi.tech/docs/wenyan/upload](https://yuzhi.tech/docs/wenyan/upload)
### Article Format
To correctly upload articles, each Markdown file must include a `frontmatter` section at the top:
```md
---
title: Running a Large Language Model Locally (2) - Providing External Knowledge Base
cover: /Users/xxx/image.jpg
author: xxx
source_url: http://
---
```
Field Description:
| Field | Required | Description |
| ---------- | -- | ----------------- |
| title | ✅ | Article Title |
| cover | ❌ | Cover Image (Local Path or Network URL) |
| author | ❌ | Author |
| source_url | ❌ | Original Link |
| type | ❌ | Article Type, set to `image` for image messages (small green book) |
| image_list | ❌ | Image Path List (for small green book, up to 20 images) |
| need_open_comment | ❌ | Whether to open comments |
| only_fans_can_comment | ❌ | Whether only fans can comment |
Note:
* If the cover is not specified, the first image in the article will be used as the cover by default.
* The cover supports local paths and network URLs.
* `type` and `image_list` are used for publishing image messages.
**[Example Article](tests/publish.md)**
### Images within the Article and Article Covers
Before publishing the article to the WeChat Official Account, Wenyan will automatically handle all images within the article according to WeChat's requirements, uploading them to the WeChat material library. Currently, Wenyan supports the following images:
- Local hard drive absolute paths (e.g., `/Users/xxx/image.jpg`)
- Network paths (e.g., `https://example.com/image.jpg`)
- Relative paths within the article (e.g., `./assets/image.png`)
## Publishing Image Messages (Small Green Book)
Publishing image messages differs from publishing graphic messages in that the frontmatter needs to specify an image list. Two methods are supported:
### Method 1: Using type: image (Recommended)
Set `type: image` in the frontmatter, and the CLI will automatically extract all images from the article:
```md
---
title: Diligence Makes Spring Come Early, Reading is Just in Time
type: image
---



```
### Method 2: Manually Specify image_list
List image paths directly in the frontmatter:
```md
---
title: Diligence Makes Spring Come Early, Reading is Just in Time
image_list:
- ./1.jpeg
- ./2.jpeg
- ./3.jpeg
- ./4.jpeg
- ./5.jpeg
---
```
The `image_list` can have up to 20 images, with the first image serving as the cover.
## Server Mode
Compared to the pure local operation of **Local Mode (Stdio Mode)**, `wenyan-mcp` also provides **Client-Server Mode**. The two modes have the same operational effect, 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.
```mermaid
flowchart LR
MCP[Wenyan MCP] --> Wechat[WeChat Official Account API]
```
In Client-Server Mode, MCP acts as a client, sending publishing requests to the Wenyan Server deployed on a cloud server, which then calls the WeChat Official Account API.
```mermaid
flowchart LR
MCP[Wenyan MCP] --> Server[Wenyan Server] --> Wechat[WeChat Official Account API]
```
**Applicable Scenarios:**
* Users without a local fixed IP who need to frequently add IP whitelists
* Users requiring team collaboration
* Support for CI/CD automated publishing
* Support for AI Agent automated publishing
**[Server Mode Deployment](https://github.com/caol64/wenyan-cli/blob/main/docs/server.md)**
**Claude Desktop Configuration:**
```json
{
"mcpServers": {
"wenyan-mcp": {
"command": "wenyan-mcp",
"args": ["--server", "https://api.example.com", "--api-key", "your-api-key"]
}
}
}
```
## Multi-WeChat Official Account Publishing (Advanced)
> [!IMPORTANT]
>
> Multi-WeChat Official Account publishing can only be used in **Server Mode**.
Steps:
- Deploy the server
- Configure multiple WeChat credentials on the server, refer to [documentation](https://github.com/caol64/wenyan-cli)
- Let the MCP client connect to the server
Tell AI:
> Use the phycat theme to publish this article to WeChat Official Account (your_app_id): `./tests/publish.md`
## Docker Deployment
Suitable for users who do not want to install a Node.js environment.
```bash
docker pull caol64/wenyan-mcp:latest
```
* **Claude Desktop Configuration:**
```json
{
"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"
]
}
}
}
```
> **Docker Configuration Note:**
>
> * **Mounted Directory (`-v`)**: The host's file/image directory must be mounted to `/mnt/host-downloads` within the container.
> * **Environment Variable (`HOST_FILE_PATH`)**: Must be consistent with the mounted file/image directory path on the host.
> * **Principle**: Your Markdown files/images referenced within the article should be placed in this directory. Docker will automatically map them, allowing the container to read and upload.
## Debugging
It is recommended to use the official Inspector for debugging:
```bash
npx @modelcontextprotocol/inspector <command>
```
After a successful launch, a similar prompt will appear:
```bash
🔗 Open inspector with token pre-filled:
http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=761c05058aa4f84ad02280e62d7a7e52ec0430d00c4c7a61492cca59f9eac299
(Auto-open is disabled when authentication is enabled)
```
Visit the above link to open the debugging page.

1. Correctly fill in the startup command
2. Add environment variables
3. Click Connect
4. Select Tools -> List Tools
5. Select the interface to debug
6. Fill in parameters and click Run Tool
7. View complete parameters
## Sponsorship
If you find Wenyan helpful, you can buy some canned goods for my cat ❤️
[https://yuzhi.tech/sponsor](https://yuzhi.tech/sponsor)
## License
Apache License Version 2.0
Connection Info
You Might Also Like
markitdown
Python tool for converting files and office documents to Markdown.
OpenAI Whisper
OpenAI Whisper MCP Server - 基于本地 Whisper CLI 的离线语音识别与翻译,无需 API Key,支持...
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
claude-flow
Claude-Flow v2.7.0 is an enterprise AI orchestration platform.
ai-engineering-from-scratch
Learn it. Build it. Ship it for others. The most comprehensive open-source...
chatbox
User-friendly Desktop Client App for AI Models/LLMs (GPT, Claude, Gemini, Ollama...)