文颜MCP Server
@caol64
文颜 MCP Server 是一个基于模型上下文协议(Model Context Protocol, MCP)的服务器组件,支持将 Markdown 格式的文章发布至微信公众号草稿箱,并使用与 文颜 相同的主题系统进行排版。
Overview
What is 文颜MCP Server?
文颜MCP Server is a Model Context Protocol (MCP) component that publishes Markdown articles to a WeChat Official Account draft box. It uses the same theme system as 文颜 to format content.
How to use 文颜MCP Server?
Ensure Node.js is installed, then clone the repository, run npm install and npm run build. In your MCP client configuration, add a server entry with the command pointing to dist/index.js and set the environment variables WECHAT_APP_ID and WECHAT_APP_SECRET.
Key features of 文颜MCP Server
- List and select supported article themes.
- Format Markdown content using built-in themes.
- Publish articles to WeChat Official Account draft box.
- Automatically upload local and network images.
Use cases of 文颜MCP Server
- Publish formatted Markdown articles directly to WeChat drafts.
- Apply consistent styling using predefined themes.
- Automate image uploads when publishing content.
FAQ from 文颜MCP Server
What are the prerequisites to run the server?
Node.js must be installed. The server is built with Node.js.
How is the server integrated with an MCP client?
Add a configuration entry in your MCP settings with the command pointing to dist/index.js and provide environment variables WECHAT_APP_ID and WECHAT_APP_SECRET.
Why are the WeChat app ID and app secret required?
They are needed to authenticate with the WeChat Official Account API to publish drafts.
What transport mechanism does the server use?
The server uses stdio as the transport type.
Is there any additional setup required in WeChat?
Yes, the server's IP must be added to the WeChat Official Account IP whitelist. Detailed configuration is available at the provided documentation link.