wechat-writer-mcp

v0.1.1
io.github.datoushiwo/wechat-writer-mcp Checked 1 day ago Published 3 months ago

面向技术博主的 AI 内容加工流水线 MCP —— 从原始素材到公众号草稿箱

Values you need

VariableWhat it is
WECHAT_APP_IDrequired 微信公众号 AppID(mp.weixin.qq.com → 开发 → 基本配置)
WECHAT_APP_SECRETrequired secret 微信公众号 AppSecret(mp.weixin.qq.com → 开发 → 基本配置)
WECHAT_COVERS_DIRoptional 封面图片目录,默认 ~/Pictures/wechat-covers
WECHAT_DEFAULT_AUTHORoptional 草稿默认作者名
WECHAT_API_TIMEOUToptional 微信 API 超时毫秒数,默认 15000

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add wechat-writer-mcp -e 'WECHAT_APP_ID=<WECHAT_APP_ID>' -e 'WECHAT_APP_SECRET=<WECHAT_APP_SECRET>' -- npx -y wechat-writer-mcp@0.1.1
Add to claude_desktop_config.json
{
  "mcpServers": {
    "wechat-writer-mcp": {
      "args": [
        "-y",
        "wechat-writer-mcp@0.1.1"
      ],
      "command": "npx",
      "env": {
        "WECHAT_APP_ID": "<WECHAT_APP_ID>",
        "WECHAT_APP_SECRET": "<WECHAT_APP_SECRET>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "wechat-writer-mcp": {
      "args": [
        "-y",
        "wechat-writer-mcp@0.1.1"
      ],
      "command": "npx",
      "env": {
        "WECHAT_APP_ID": "<WECHAT_APP_ID>",
        "WECHAT_APP_SECRET": "<WECHAT_APP_SECRET>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "WECHAT_APP_ID",
      "id": "wechat-app-id",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "WECHAT_APP_SECRET",
      "id": "wechat-app-secret",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "wechat-writer-mcp": {
      "args": [
        "-y",
        "wechat-writer-mcp@0.1.1"
      ],
      "command": "npx",
      "env": {
        "WECHAT_APP_ID": "${input:wechat-app-id}",
        "WECHAT_APP_SECRET": "${input:wechat-app-secret}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.wechat-writer-mcp]
command = "npx"
args = ["-y", "wechat-writer-mcp@0.1.1"]
env = { "WECHAT_APP_ID" = "<WECHAT_APP_ID>", "WECHAT_APP_SECRET" = "<WECHAT_APP_SECRET>" }

For AI agents

  1. Ask the user for: WECHAT_APP_ID, WECHAT_APP_SECRET. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: import_source, transform_for_wechat, estimate_originality, save_to_wechat_draft.
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json