Hexo Blog MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Hexo Blog MCP Server Create a new post about AI trends and start the local preview"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🚀 Hexo Blog MCP Server
一个基于 Model Context Protocol 的 Hexo 博客管理服务器,让 AI 客户端(Claude Desktop、Cursor 等)能够直接管理你的 Hexo 博客。
✨ 功能特性
📝 文章管理 — 列出、搜索、读取、创建、编辑、删除博客文章
👀 本地预览 — 一键启动/停止 Hexo 本地预览服务器
🌐 一键发布 — 构建并部署到 GitHub Pages
💾 源码备份 — 自动 Git 提交并推送到
hexo-source分支🔒 安全防护 — 路径沙盒、分支锁定、命令超时保护
Related MCP server: Halo MCP Server
📦 安装
# 克隆或进入项目目录
cd /Users/lizexi/Documents/AI/aiMcp/hexo-mcp-server
# 安装依赖
npm install
# 构建
npm run build⚙️ MCP 客户端配置
在你的 AI 客户端中添加以下 MCP 配置:
Claude Desktop
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"hexo-blog": {
"command": "node",
"args": ["/Users/lizexi/Documents/AI/aiMcp/hexo-mcp-server/dist/index.js"],
"env": {
"BLOG_ROOT": "/Users/lizexi/Documents/code/leejersey.github.io"
}
}
}
}Cursor
在 Cursor Settings → MCP 中添加相同配置。
🛠️ 可用的 Tools
文章管理
工具 | 参数 | 功能 |
|
| 列出所有文章,支持按关键词过滤标题和标签 |
|
| 按关键词全文搜索文章(标题+正文) |
|
| 读取指定文章的完整内容(含 Front-matter) |
|
| 创建新文章并自动生成 Front-matter |
|
| 修改文章内容或元数据 |
|
| 删除指定文章 |
博客操作
工具 | 功能 |
| 执行 |
| 停止正在运行的预览服务器 |
| 执行 |
Git 操作
工具 | 参数 | 功能 |
|
| Git add → commit → push 到 |
|
| 一键完成 deploy + backup 组合操作 |
| — | 查看当前工作区的 Git 状态 |
📚 可用的 Resources
URI | 描述 |
| 站点配置 |
| Apollo 主题配置 |
| 所有文章的元数据汇总(标题、日期、标签、字数) |
🏗️ 项目结构
src/
├── index.ts # MCP 服务器入口
├── config.ts # 路径与常量配置
├── tools/
│ ├── post-tools.ts # 文章管理工具(6个)
│ ├── hexo-tools.ts # 构建/预览/部署工具(3个)
│ └── git-tools.ts # Git 操作工具(3个)
├── resources/
│ └── blog-resources.ts # 博客数据资源(3个)
└── utils/
├── post-manager.ts # 文章文件操作核心逻辑
├── hexo-runner.ts # shell/hexo 命令封装
└── git-runner.ts # git 命令封装🔧 技术栈
TypeScript + Node.js 18+
@modelcontextprotocol/sdk — MCP 官方 SDK(stdio 传输)
zod — 工具参数验证
gray-matter — Hexo 文章 Front-matter 解析
📄 License
MIT
Available Tools
12 toolsbackup_sourceC
将博客源码通过 Git 备份到 hexo-source 分支
Inputs: message.
create_postC
创建一篇新的博客文章
Inputs: title (required), content, tags.
delete_postA
删除指定的博客文章(不可撤销)
Inputs: filename (required).
deploy_blogA
构建并发布博客到 GitHub Pages(执行 hexo clean && hexo generate && hexo deploy)
Inputs: no named parameters.
git_statusB
查看博客项目当前的 Git 状态(未提交的更改)
Inputs: no named parameters.
list_postsC
列出所有博客文章,支持按关键词过滤标题和标签
Inputs: keyword.
preview_blogB
启动 Hexo 本地预览服务器(localhost:4000)
Inputs: no named parameters.
quick_publishC
一键完成博客发布和源码备份(deploy + backup 组合操作)
Inputs: message.
read_postC
读取指定文章的完整内容(含 Front-matter 和正文)
Inputs: filename (required).
search_postsC
按关键词搜索文章标题和正文内容
Inputs: query (required).
stop_previewA
停止正在运行的 Hexo 本地预览服务器
Inputs: no named parameters.
update_postC
修改指定文章的内容或元数据
Inputs: filename (required), content (required), title, tags.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool has a clearly distinct purpose with no ambiguity. For example, create_post, read_post, update_post, and delete_post form a complete CRUD set for posts, while deploy_blog, preview_blog, and stop_preview handle different aspects of the publishing workflow. Tools like list_posts and search_posts are differentiated by their filtering mechanisms (list vs. search).
All tools follow a consistent verb_noun naming pattern in snake_case, such as create_post, delete_post, deploy_blog, and preview_blog. This uniformity makes the tool set predictable and easy to understand, with no deviations in style or convention across the 12 tools.
With 12 tools, the server is well-scoped for managing a Hexo blog, covering essential operations like post management, deployment, previewing, and backup. Each tool serves a specific function without redundancy, making the count appropriate for the domain's typical workflows.
The tool set provides complete coverage for Hexo blog management, including full CRUD for posts (create, read, update, delete), deployment (deploy_blog, preview_blog, stop_preview), backup (backup_source), and utilities like git_status and search. There are no obvious gaps, as all core lifecycle operations are supported.
Maintenance
Related MCP Connectors
Lets your AI build and edit websites in Xodia, a visual website builder for real code (Vite, React, Tailwind CSS or plain HTML in your own git repo): read and write site files, create pages and CMS collections, run typecheck, design and link checks, take screenshots, manage forms and translations, and pick up change requests the user sends from the visual editor. Sign in once with your Xodia account (OAuth). Free plan, no card needed. Setup: https://xodia.ai/ai/mcp
Manage a WordPress site from your AI assistant: read, search, propose edits, Search Console data.
Create, edit, organize, publish, and configure JustBlogged blogs from MCP clients.
Build and publish Ghost themes with your AI agent: pages, styles, patterns and previews.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Emlog blog systems through a standardized Model Context Protocol interface, supporting content management operations like creating/updating articles, managing comments, uploading files, and accessing blog resources.1214 npm2MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Halo blog systems through natural language, supporting article creation/editing/publishing, categories, tags, attachments, and includes 10 AI writing prompts for content optimization and SEO.18MIT
- AlicenseNot gradedqualityDmaintenanceEnables managing blog posts on Taita Blog via natural language, including creating, listing, updating, and deleting posts, as well as managing categories and tags.MIT
- AlicenseAqualityDmaintenanceEnables AI agents to generate SEO-optimized CSDN blog drafts, refine them against a writing style guide, run SEO self-checks, and optionally publish them to CSDN's draft box via browser automation with rate limiting and a human review gate. Also supports session-based login management, local draft library operations, and reading article statistics through CSDN's public API.141MIT