# md2wechat

A command-line tool built for AI agents that converts Markdown into WeChat official-account HTML, generating covers and article images, previewing results and creating drafts through discoverable JSON commands.

md2wechat is a command-line tool for creating and publishing WeChat official-account articles, aimed at being called by AI agents such as Claude Code, Codex, WorkBuddy, Kimi Work, Hermes Agent or OpenClaw through JSON-based command discovery. A user or agent writes an article in Markdown, and md2wechat converts it to WeChat-compatible HTML, generates a cover and inline article images, previews the result for validation, and pushes it to the WeChat draft box.

Its commands include inspecting an article for readiness before publishing, converting Markdown with support for a large set of advanced layout blocks, and discovery commands such as capabilities and doctor that let an agent check what the current installation supports. A separate paid API tier returns finished WeChat HTML directly with a larger set of professional themes and layout modules, while the free mode generates a prompt that an external LLM must still turn into HTML itself. It also supports preparing local drafts for other platforms, such as Zhihu, CSDN and Toutiao, for a host agent's already-logged-in browser to submit, and can manage multiple named WeChat accounts without exposing their secrets.

It is written in Go.

Website: https://md2wechat.cn
