deploy_blog
Build and publish your Hexo blog to GitHub Pages by executing clean, generate, and deploy commands to make your content live.
Instructions
构建并发布博客到 GitHub Pages(执行 hexo clean && hexo generate && hexo deploy)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/hexo-tools.ts:69-90 (handler)The "deploy_blog" tool is registered and implemented directly in src/tools/hexo-tools.ts using the MCP server.tool method. It executes 'hexo clean', 'hexo generate', and 'hexo deploy' via the 'hexoCommand' utility.
server.tool( "deploy_blog", "构建并发布博客到 GitHub Pages(执行 hexo clean && hexo generate && hexo deploy)", {}, async () => { try { await hexoCommand("clean"); const genOutput = await hexoCommand("generate"); const deployOutput = await hexoCommand("deploy"); return { content: [ { type: "text" as const, text: `🎉 博客已成功发布到 GitHub Pages!\n\n网址: https://leejersey.github.io\n\n⚠️ GitHub Pages 需要 1~3 分钟刷新缓存。\n\n建议接下来执行 backup_source 备份源码。`, }, ], }; } catch (e: any) { return { content: [{ type: "text" as const, text: `部署失败: ${e.message}` }], isError: true }; } } );