带SSE传输的Ghost MCP服务器
此存储库包含Ghost博客平台的模型上下文协议(MCP)服务器实现,支持服务器发送事件(SSE)传输。
特性
- 支持SSE和stdio传输
- 通过MCP工具提供对Ghost Admin API功能的访问
- 管理Ghost博客文章、页面和标签
- 默认情况下,Docker中的非root用户是安全的
- 环境变量配置
- 健康检查端点
快速开始
环境设置
- 复制示例环境文件:
cp .env.example .env- 编辑
.env文件与您的Ghost API凭据:
GHOST_URL=https://your-ghost-blog.com
GHOST_KEY_ID=your_ghost_key_id_here
GHOST_KEY_SECRET=your_ghost_key_secret_here
PORT=3064
NODE_ENV=production使用Docker Compose
运行服务器最简单的方法是使用Docker Compose:
docker-compose up -d如果需要,这将构建映像,并在分离模式下启动服务器。
直接使用Docker
你也可以直接构建和运行Docker镜像:
# Build the image
docker build -t oculair/ghost-mcp:1.0.0 .
# Run the container
docker run -p 3064:3064 --env-file .env --rm -it oculair/ghost-mcp:1.0.0多架构构建
要为多种架构(amd64和arm64)构建:
- 启用Docker Buildx:
docker buildx create --use --name multiarch-builder
docker buildx inspect --bootstrap- 构建并推进:
docker buildx build --platform linux/amd64,linux/arm64 \
-t oculair/ghost-mcp:1.0.0 \
--push .- 验证多架构映像:
docker manifest inspect oculair/ghost-mcp:1.0.0发展
项目结构
.
├── everything/
│ ├── src/
│ │ ├── core/ # Core server implementation
│ │ ├── tools/ # MCP tool implementations
│ │ ├── transports/ # Transport implementations (SSE, stdio)
│ │ └── index.js # Main entry point
│ └── package.json # Node.js dependencies
├── .env.example # Example environment variables
├── .gitignore # Git ignore file
├── compose.yaml # Docker Compose configuration
├── Dockerfile # Docker build configuration
└── README.md # This file可用工具
服务器提供以下MCP工具:
- 帖子:
create_ghost_post,list_ghost_posts,update_ghost_post,delete_ghost_post - 页面:
create_ghost_page,list_ghost_pages,update_ghost_page,delete_ghost_page - 标签:
create_ghost_tag,update_ghost_tag
有关每个工具及其参数的详细信息,请参阅 everything/README.md 文件。
调试
要调试容器,您可以使用交互式shell运行它:
docker run -p 3064:3064 --env-file .env --rm -it --entrypoint bash oculair/ghost-mcp:1.0.0使用Claude Desktop
添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"ghost": {
"url": "http://localhost:3064/sse",
"disabled": false,
"alwaysAllow": []
}
}
}```