关于 Blog Automation
Blog Automation MCP 服务让 MCP 客户端通过 Blog Automation 规划选题、生成文章并发布或安排 WordPress 内容。它还提供文章状态、站点、模板和令牌余额查询,并支持按权限范围限制操作。
主要功能
- 01查看与创建文章选题
- 02生成文章并查询生成任务
- 03查看文章内容、状态与 SEO 信息
- 04发布文章或安排发布时间
- 05查看站点、模板和令牌余额
适用场景
- 01从选题构思到生成文章草稿
- 02检查文章状态并获取 SEO 字段
- 03安排 WordPress 文章发布
- 04确认 API 令牌余额和站点信息
MCP 相关
服务通过工具将请求转发至 Blog Automation Customer API,支持 stdio 和 Streamable HTTP。MCP 客户端可使用 API 密钥或 OAuth 连接,并按 API 密钥配置的 scope 访问功能。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://mcp.blog-automation.com/mcpclaude mcp add --transport http shsoftwaresolutioncom-blog-automation https://mcp.blog-automation.com/mcp{"mcpServers":{"shsoftwaresolutioncom-blog-automation":{"type":"http","url":"https://mcp.blog-automation.com/mcp"}}}在 Cursor 中打开{"servers":{"shsoftwaresolutioncom-blog-automation":{"type":"http","url":"https://mcp.blog-automation.com/mcp"}}}在 VS Code 中打开{"mcpServers":{"shsoftwaresolutioncom-blog-automation":{"type":"http","url":"https://mcp.blog-automation.com/mcp"}}}{"mcpServers":{"shsoftwaresolutioncom-blog-automation":{"serverUrl":"https://mcp.blog-automation.com/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
https://mcp.blog-automation.com/mcp需要授权工具
详细介绍
博客自动化 MCP 服务
用于 Blog Automation(https://blog-automation.com)的[模型上下文协议](https://modelcontextprotocol.io)服务:从 Claude、ChatGPT、Cursor 或任何 MCP 客户端规划创意、借助 AI 撰写文章、在 WordPress 上发布或安排发布,并查看令牌余额。
它是 Customer API https://app.blog-automation.com/api/v1/ext 的轻量封装(应用仓库 blogposter-app、server/routes/ext.js、
docs/API.md)。Node 22、@modelcontextprotocol/sdk 1.32、zod 4。包名 @blogautomation/mcp-server,命令 blog-automation-mcp。
工具
| 工具 | API 调用 | 说明 |
|---|---|---|
list_ideas | GET /ideas | 状态、siteId、limit、cursor——只读 |
create_idea | POST /ideas | 标题(+ keyword、notes、audience、priority 1–3、language、siteId);Idempotency-Key |
write_article | POST /articles/generate { …, async: true } → 202 { job },然后每 3 秒调用一次 GET /jobs/{id} | 会消耗令牌;等待约 50 秒,然后返回 jobId(→ job_status);答案不含 HTML;Idempotency-Key |
job_status | GET /jobs/{id} | running / done(文章)/ failed(错误) |
list_articles | GET /articles | 按状态列出,支持 siteId、q、limit、cursor(不含 HTML) |
get_article | GET /articles/{id} | 包含 HTML 和 SEO 字段 |
article_status | GET /articles/{id}/status | 状态、安排时间、WordPress 链接、上次错误、任务 |
publish_article | POST /articles/{id}/publish 或传入 at 时调用 POST /articles/{id}/schedule | at = ISO 时间或 "next"(下一个空闲时段 =“添加到日历”) |
token_balance | GET /tokens | 余额、批次、价格 |
list_sites | GET /sites | WordPress 站点(siteId 对应的 ID) |
list_templates | GET /templates | 内置的 b:… 模板和自定义模板 |
错误会作为易读的工具结果返回,并附带 isError: true:401(密钥无效/已撤销)、402(令牌不足:所需数量 / 余额)、
403 insufficient_scope(缺少的权限范围)/ plan_required(哪些套餐支持 API)、404、429(重试等待秒数来自 Retry-After)。
API 密钥
Blog Automation → Entwickler / API → “API-Key erstellen”(Starter 和 Pro 套餐)。权限范围:
articles:read、articles:write、ai:generate(write_article)、articles:publish(publish_article)、ideas:read、ideas:write、
templates:read、sites:read、account:read(token_balance)。不需要助手执行的操作可以不授予相应权限——例如,不授予
articles:publish 时,它可以撰写草稿,但无法发布。
使用
stdio(本地;密钥来自 BA_API_KEY):
npx -y @blogautomation/mcp-server # once published; from this repo: node mcp/src/cli.js
Claude Desktop(claude_desktop_config.json)/ Cursor(~/.cursor/mcp.json)——使用相同的配置块:
{ "mcpServers": { "blog-automation": { "command": "npx", "args": ["-y", "@blogautomation/mcp-server"], "env": { "BA_API_KEY": "ba_live_…" } } } }
Claude Code:claude mcp add blog-automation --env BA_API_KEY=ba_live_… -- npx -y @blogautomation/mcp-server
Streamable HTTP(远程客户端——ChatGPT 连接器 / 开发者模式、Claude「自定义连接器」、通过 URL 接入的 Cursor):
blog-automation-mcp --http --port 8787 --host 127.0.0.1 --origin https://chatgpt.com,https://claude.ai
- 端点
POST /mcp(无状态,返回 JSON),健康检查GET /healthz。对/mcp执行 GET/DELETE → 405(无会话)。 - 每个请求都必须发送
Authorization: Bearer ba_live_…;密钥仅用于该请求的 API 调用——不会存储,也不会记录日志。 缺失或格式错误 → 401,附带WWW-Authenticate: Bearer。 - 仅接受带有
Origin标头且来源为--origin/BA_MCP_ORIGINS的请求(防范 DNS 重绑定);未设置该选项时, 浏览器请求会被拒绝,服务端到服务端的调用(不带 Origin)则可正常使用。 - 默认绑定到 127.0.0.1;公开使用时,请将其置于反向代理(TLS)之后,例如
https://mcp.blog-automation.com/mcp。 - **OAuth(自 1.1.0 起):**仅支持 OAuth 的客户端——ChatGPT 应用 / 开发者模式、Claude 自定义连接器、MCP Inspector——只需获取
URL
https://mcp.blog-automation.com/mcp。401 响应会指向/.well-known/oauth-protected-resource(RFC 9728),其中将https://app.blog-automation.com指定为授权服务器(动态客户端注册、PKCE S256)。用户登录 Blog Automation, 查看请求的权限并点击「Erlauben」;访问令牌是有效期为 1 小时的 API 密钥,会自动刷新,可在 Entwickler / API 中撤销。环境变量:BA_MCP_RESOURCE(公开的 /mcp URL)、BA_OAUTH_ISSUER(应用基础 URL)。
ChatGPT 应用
ChatGPT → Settings → Apps & Connectors → Advanced → Developer mode →「Create」→ 名称填写「Blog Automation」,MCP 服务 URL
填写 https://mcp.blog-automation.com/mcp,身份验证选择 OAuth → 登录 → 允许。所有工具都带有 readOnlyHint / destructiveHint
注释,因此 ChatGPT 会在写入(令牌)或发布前询问。要在 ChatGPT 应用目录中上架:SUBMISSION.md。
BA_API_BASE 可用于覆盖 API 地址(例如 https://pre.blog-automation.com/api/v1/ext)。
开发
cd mcp && npm install && npm test # node:test – 7 tests, fake API (no network, no key)
测试:tools/list(名称、注释、架构)、每个工具的请求格式、Idempotency-Key、异步任务轮询(已完成 / 仍在运行 / 失败)、发布与定时发布、错误映射(401/402/403/404/429)、HTTP 传输(healthz、401、Origin 403、405、tools/list,以及使用 请求密钥进行调用)。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。