/ Directory / Playground / wenyan-mcp
● Community caol64 ⚡ Instant

wenyan-mcp

by caol64 · caol64/wenyan-mcp

Write in Markdown, publish to WeChat 公众号 drafts — wenyan-mcp handles the formatting WeChat's editor mangles.

文颜 MCP converts Markdown to WeChat-compatible formatted HTML and uploads to your 公众号 draft folder. Supports custom CSS themes. Requires a registered WeChat Official Account and IP whitelisting — once set up, publishing is one prompt.

Why use it

Key features

Live Demo

What it looks like in practice

wenyan.replay ▶ ready
0/0

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "wenyan": {
      "command": "npx",
      "args": [
        "-y",
        "wenyan-mcp"
      ],
      "_inferred": true
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "wenyan": {
      "command": "npx",
      "args": [
        "-y",
        "wenyan-mcp"
      ],
      "_inferred": true
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "wenyan": {
      "command": "npx",
      "args": [
        "-y",
        "wenyan-mcp"
      ],
      "_inferred": true
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "wenyan": {
      "command": "npx",
      "args": [
        "-y",
        "wenyan-mcp"
      ],
      "_inferred": true
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "wenyan",
      "command": "npx",
      "args": [
        "-y",
        "wenyan-mcp"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "wenyan": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "wenyan-mcp"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add wenyan -- npx -y wenyan-mcp

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use wenyan-mcp

How to publish a Markdown article to WeChat 公众号 with wenyan-mcp

👤 Chinese tech/finance/creative bloggers on 微信公众号 ⏱ ~15 min intermediate

When to use: You draft in Obsidian/Typora/Claude and hate the WeChat web editor's formatting quirks.

Prerequisites
  • WeChat Official Account (订阅号 or 服务号) — mp.weixin.qq.com — requires identity verification
  • AppID + AppSecret — 公众号后台 → 开发 → 基本配置
  • Server IP whitelisted — Same page → IP白名单; add your current IP
Flow
  1. Pick a theme
    Use wenyan-mcp to list available themes. Show me the first 3.✓ Copied
    → Theme names with preview description
  2. Publish to drafts
    Take this Markdown article [paste] and publish it to 公众号 drafts using the 'orange-heart' theme. Title: '今天聊聊 MCP'.✓ Copied
    → Draft ID returned; article visible in 草稿箱
  3. Review in WeChat and send
    (in 公众号 后台) Open the draft, preview on mobile, schedule or publish✓ Copied
    → Article live on 公众号

Outcome: Zero copy-paste, on-brand formatting, full control before the send button.

Pitfalls
  • IP not whitelisted — every call returns 40164 — Add the current machine's public IP in 公众号后台; if your IP changes often, use a static egress proxy
  • Images break because they point to external URLs — Use ![alt](local-path.png) — wenyan-mcp uploads them to WeChat's material library automatically
Combine with: filesystem

Maintain consistent brand styling across WeChat posts with wenyan

👤 Content teams, corporate marketers ⏱ ~10 min intermediate

When to use: Multiple authors contribute and output style drifts across posts.

Flow
  1. Register a company theme
    Register a new wenyan-mcp theme called 'acme-corp' from this CSS: [paste]. Confirm it's saved.✓ Copied
    → Theme shows in list_themes
  2. Force all posts to use it
    From now on, when I ask you to publish a WeChat article, always use the 'acme-corp' theme unless I say otherwise.✓ Copied
    → Applied on subsequent publishes

Outcome: Every author publishes visually consistent articles with zero CSS knowledge.

Combinations

Pair with other MCPs for X10 leverage

wenyan + filesystem

Publish an article that lives as a .md file on disk, with local image paths

Read ./posts/2026-04-agent-week.md and publish it to WeChat drafts using the 'acme-corp' theme.✓ Copied
wenyan + firecrawl

Scrape a public tech post and republish a localized summary

Summarize the latest Anthropic blog post into 800 words of Chinese, then publish to WeChat drafts.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
list_themes Pick a style before publishing 0
register_theme name: str, css: str Add a new brand style 0
delete_theme name: str Retire an old style 0
publish markdown: str, title: str, theme?: str, author?: str, digest?: str, cover?: str The payoff tool — pushes to drafts WeChat API calls (free within quota)

Cost & Limits

What this costs to run

API quota
WeChat publish API: 100 drafts/day per account; material upload: 500/day
Tokens per call
Varies with article length; typical 2000-token post is fine
Monetary
Free — WeChat API is free with a verified account
Tip
Batch images into one article upload; each image counts against daily material quota

Security

Permissions, secrets, blast radius

Credential storage: WECHAT_APP_ID, WECHAT_APP_SECRET in env vars — never commit
Data egress: All API calls to api.weixin.qq.com

Troubleshooting

Common errors and fixes

40164 invalid IP

Add the machine's current public IP to 公众号 IP whitelist; the error returns the IP it saw

Verify: curl ifconfig.me to confirm your egress IP
40001 invalid credential / access_token

AppSecret wrong or access_token expired — wenyan caches it; restart the MCP to force refresh

Images not showing in the draft

Local paths must resolve; wenyan uploads them — if they're on a remote CDN, it downloads first

45009 api freq out of limit

You've hit daily material upload quota — wait until 0:00 Beijing time or reduce images

Alternatives

wenyan-mcp vs others

AlternativeWhen to use it insteadTradeoff
md2wx / Doocs md-editorYou want a web editor you copy-paste fromManual — no agent workflow
WeChat Official editorSimple posts, no brand CSSNotoriously fiddly with Markdown

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills

Continue exploring

Related tools and workflows

Choose another guide for your workflow, or explore a collection.

Explore more MCP guides

DigitalOcean MCP

Manage DigitalOcean infrastructure through service-specific hosted MCP endpoints or the vendor’s local server.

MCP

Explore more MCP guides

Prefect MCP

Inspect Prefect flows, runs, deployments, logs, work pools, and automations using its experimental MCP server.

MCP

Explore more MCP guides

Hugging Face MCP

Connect to Hugging Face Hub tools and selected Spaces through the official hosted MCP endpoint, with account-specific tool configuration.

MCP

Explore more MCP guides

Grafana MCP

Inspect Grafana dashboards, data sources, and observability workflows through MCP.

MCP

Browse all topic collections → · See 29 new official additions →