博客发布服务是 Alsaheem 开发的 MCP 服务器:一个基于MCP协议的博客发布服务,支持将Markdown文章一键发布到dev.to和Hashnode平台。接入两步走:docker build -t alsaheem/blogging-mcp:latest .,再把下文配置粘进客户端 mcpServers 段重启即可。
它是干什么的
先把话说清楚:博客发布服务不是又一个大模型,而是一个标准的 MCP 服务器。装好之后,你的 AI 客户端多出一组新工具,模型可以按需调用。一个基于MCP协议的博客发布服务,支持将Markdown文章一键发布到dev.to和Hashnode平台
| 项目 | 数据 |
|---|---|
| 开发者 | Alsaheem |
| Star | 7 |
| 收藏 | 0 |
| 质量等级 | A |
| 平台分类 | 内容生成 |
| 部署标签 | 本地部署、博客发布、多平台同步 |
| 仓库 | blogging-mcp |
核心能力
- devtogetarticle — GET /api/articles/{id}
- devtolistmyarticles — scope: published | unpublished | all, pagination
- devtoupdatearticle — PUT partial update (max 4 tags)
- devtodeletearticle — DELETE /api/articles/{id}
- hashnodegetpost / hashnodegetdraft — read by id
- hashnodeupdatepost — update a published post (updatePost)
- hashnoderemovepost — delete a published post (removePost)
- verifycredentials — Checks dev.to key and Hashnode publication (no writes).
适合谁用
两类人最该装:一是靠 AI 出稿、出图、做内容流水线的内容团队;二是已经在用 MCP 生态、想按需拼装能力的折腾型用户。反过来,如果你只需要偶尔手动用它背后的服务,直接开网页就行,不必上 MCP。
完整安装配置步骤
动手前确认环境齐了:
- Docker 环境(
docker ps正常返回即可)。 - 一个支持 MCP 的客户端:Claude Desktop、Cursor、Cline、Windsurf 任选其一。
- 对应平台的 API Key(第 2 步要用)。
第 1 步:安装博客发布服务
终端里任选一条(不同安装方式,效果等价):
docker build -t alsaheem/blogging-mcp:latest .
docker run --rm -i \
docker run --rm -p 8765:8765 \第 2 步:写入 MCP 配置
先把凭证准备好:DEVTO_API_KEY、HASHNODE_TOKEN、DOCKERHUB_TOKEN。拿不到后面全白搭。
Claude Desktop 的配置文件路径:macOS 在 ~/Library/Application Support/Claude/claude_desktop_config.json,Windows 在 %APPDATA%\Claude\claude_desktop_config.json;Cursor 则是 ~/.cursor/mcp.json(或项目级 .cursor/mcp.json)。把下面这段并进 mcpServers 段(注意是并进外层大括号,别整个文件替换):
Fully **quit Cursor** and reopen so MCP reloads.
Example file: [`mcp.cursor.json.remote.example`](mcp.cursor.json.remote.example).
### Claude Desktop (remote)
Claude does **not** support Cursor’s `"url"` + `"headers"` block. Use **[`mcp-remote`](https://github.com/geelen/mcp-remote)** (Node 18+, `npx`) to connect to the **same HTTPS URL**. **Do not** pass `--allow-http` for this hosted URL.
**File:**
| OS | Path |
|----|------|
| macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
| Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
| Linux | `~/.config/Claude/claude_desktop_config.json` |
Merge `"mcpServers"` with any existing keys (e.g. `"preferences"`).改完保存。Windows 用户注意:如果 command 写 npx 起不来,换成 npx.cmd 再试。
第 3 步:重启并验证
完全退出客户端再打开(是托盘里真正退出,不是关窗口)。工具列表里出现博客发布服务的工具即接入成功;调用报错的话,先查下面的坑点清单。
容易踩的坑
- Key 填了但没生效:多半填在了
args而不是env段。客户端日志里看到Environment variable DEVTO_API_KEY not set就是这个原因。 - 改了配置没反应:客户端只重启了窗口没退进程。macOS 按 Cmd+Q,Windows 检查托盘。
- JSON 报错打不开客户端:多半是最后多个逗号。粘进任何 JSON 校验器里查一遍再保存。
常见问题
博客发布服务免费吗?
代码在 GitHub(https://github.com/Alsaheem/blogging-mcp)开放获取。个别功能依赖第三方服务时费用另算,看仓库 LICENSE 和定价页。
博客发布服务能用在 Cursor / Cline 吗?
能。MCP 是通用协议,同一份 mcpServers 配置在这些客户端之间基本通用,只是配置文件位置不同。
API Key 从哪拿?
去对应平台的开发者控制台申请,填进配置的 env 段。Key 泄露记得直接去平台吊销,别只改本地文件。
需要外网或代理吗?
拉包和调用官方 API 需要能访问 GitHub 与对应服务域名,内网环境先测 git ls-remote 和接口连通性。
