ThinkingMachine Typesetter
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
思考机器排版 / ThinkingMachine Typesetter
为中文公众号定稿生成封面、引语、手机预览和可复制正文。包含浏览器编辑器、MCP 服务,以及可安装到 AI 工具中的排版 Skill。
在线排版台 · 在线 MCP 接入说明 · 自行部署 · 修改模板
能做什么
先检查稿件,再逐步选择封面、开头引语、重点和文末介绍卡。
网页导入 Word、Markdown、TXT,保留原文与已有格式。
有配图时置于黑底并做下缘渐隐;无图时生成随机点线背景。
使用猴尊宋体和 Anton 制作封面,正文按品牌规范排版。
生成手机预览、公众号内联 HTML、封面 PNG,以及原文校验报告。
通过 MCP 让 AI 工具读取规范、检查稿件、上传图片、生成和修订版本。
网页排版和服务端渲染均不调用大模型,不需要 OpenAI 或 Anthropic API 密钥。通过 AI 工具选重点、对话引导时,使用该工具自己的模型能力。网页普通编辑在浏览器内完成;远程 MCP 调用会将提交的稿件和图片发送到你连接的排版服务。
Related MCP server: wechat-writer-mcp
本地运行
需要 Node.js 22.13+,建议使用 Node.js 24。首次安装需要网络。
git clone https://github.com/Panghugo/thinkingmachine-typesetter.git
cd thinkingmachine-typesetter
npm ci
npm run dev打开终端显示的本地地址,默认 http://127.0.0.1:5173。首次会建立本地模拟的 R2 存储;本地开发无需 Cloudflare 账号,不连接线上用户数据。
网页也可单独运行:执行 node scripts/sync-public.mjs 后,用任意静态 HTTP 服务提供 public/,访问 editor.html。静态模式可以编辑、预览和复制正文;连接密钥创建和远程 MCP 需要 Worker 服务。
验证
npm test
npm run buildbuild 是 Cloudflare Worker 的本地打包演练,不会发布。保持开发服务运行,在另一个终端执行完整协议与生成检查:
npm run test:service该检查会在指定服务创建测试密钥、图片和示例排版,结束时撤销测试密钥;默认只访问本地 5173。通过 TM_TEST_ORIGIN 可指定你拥有且获准测试的服务。请勿对他人的服务运行写入测试。
发布前还可运行 npm run check:publish,检查仓库文件是否含有已知类型的凭据、个人路径或运行数据。微信编辑器的实际粘贴、图片上传和深浅模式仍需人工回读。
在 AI 工具里使用
MCP 地址是 https://你的域名/api/mcp,使用 Streamable HTTP。在连接页创建自己的连接密钥,通过 X-TM-Key 或 Authorization: Bearer 传递;这是排版服务凭证,不是模型 API 密钥。
工具按以下顺序使用:
工具 | 用途 |
| 读取规范与逐步引导流程 |
| 检查提取后的正文、图片缺项和引语候选,不保存稿件 |
| 上传用于正文或封面的原图 |
| 生成封面、预览、内联 HTML 和报告 |
| 保留原稿与旧版,生成新的排版版本 |
调用方先检查原文件是否可读、是否完整提取。检查工具不能直接读取调用方的本地路径;生成时将已确认的文章标题放在 Markdown 的首个 # 标题 中。用户已给出的选择直接沿用;用户要求“直接按默认排版”时,完成检查后生成。
客户端配置:连接说明
不使用远程服务的 Python Skill:skills/thinkingmachine-typesetter
远程 Skill 默认指向公开演示服务。部署自己的版本后,将 Skill 和连接说明中的地址替换成自己的域名;网页连接页自动使用当前域名。
项目结构
public/ 浏览器编辑器、连接页、品牌图片和网页字体
src/worker.js 独立 Cloudflare Worker 入口
lib/thinkingmachine/ MCP、检查、鉴权、封面与文件生成
shared/ 浏览器和服务端共用的检查、正文排版逻辑
skills/ 远程 Skill 与可离线渲染的 Python Skill
scripts/ 检查、资源同步与字形生成
examples/ 合成示例稿与排版计划
docs/ 部署、修改与使用限制这是从在线版本整理出的独立源码入口,不包含原站的项目身份、部署凭据、用户稿件、上传图片、生成文件或参考聊天截图。修改本仓库不会自动部署到在线演示站。
修改与贡献
可以 Fork 后按自己的需要修改,也可以提交 Pull Request。保持原文、顺序与限定不变;调整样式时核对复制正文及手机换行。具体文件位置与字体更换方法见 修改模板,提交前检查见 CONTRIBUTING.md。
代码采用 MIT License。字体保留各自的 OFL 许可,品牌 Logo 和人物介绍卡另见 品牌素材说明,不纳入 MIT 授权。第三方组件见 THIRD_PARTY_NOTICES.md。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Get content approved & published faster: draft, send approval links and publish from your AI chat.
Manage your blog ideas, article schedule, writing runs and draft approvals from your AI app.
Brand strategy and content-calendar context for agents, with human-confirmed approval gates.
Read-only canon of design and copy rules for AI agents to audit generated UI, served as resources.
Related MCP Servers
- AlicenseAqualityFmaintenanceEnables AI agents to publish articles to WeChat Official Account (微信公众号). Supports image upload, draft creation, and publishing via standardized MCP protocol.51ISC
- AlicenseAqualityDmaintenanceEnables AI to import, format, check originality, and save articles as drafts to WeChat Official Account draft box, without auto-publishing.444 npmMIT
- AlicenseAqualityDmaintenanceEnables publishing HTML articles and image messages to WeChat Official Account drafts via LLM tool calls, with automatic image upload and URL replacement.51MIT
- AlicenseAqualityCmaintenanceEnables AI tools to preview and publish Markdown articles to WeChat Official Accounts, automatically converting content into WeChat-optimized HTML and handling cover images. Also lets users query publish status and read/like/comment statistics through natural language.51MIT