Skip to main content
Glama
leejersey

Hexo Blog MCP Server

by leejersey

git_status

Check uncommitted changes in your Hexo blog project to monitor Git status before publishing updates.

Instructions

查看博客项目当前的 Git 状态(未提交的更改)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The function that actually executes `git status --short` and returns the output.
    export async function getGitStatus(): Promise<string> {
        return runCommand("git status --short");
    }
  • The registration of the 'git_status' tool using the MCP server, including the handler wrapper.
    server.tool(
        "git_status",
        "查看博客项目当前的 Git 状态(未提交的更改)",
        {},
        async () => {
            try {
                const status = await getGitStatus();
                return {
                    content: [
                        {
                            type: "text" as const,
                            text: status
                                ? `当前有未提交的更改:\n\n${status}`
                                : "✅ 工作区干净,没有未提交的更改。",
                        },
                    ],
                };
            } catch (e: any) {
                return { content: [{ type: "text" as const, text: `错误: ${e.message}` }], isError: true };
            }
        }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/leejersey/hexo-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server