Ghost MCP Server

Ghost MCP Server

site icon
2025.02.03 2
TypeScript内容管理CMS 集成内容生成
Ghost MCP Server 是一个与 Ghost Admin API 集成的 Model Context Protocol (MCP) 服务器,提供对 Ghost CMS 功能的程序化访问,包括文章管理、页面管理、成员管理等。
View on GitHub

Overview

基本能力

产品定位

Ghost MCP Server 是一个用于与 Ghost CMS 集成的 MCP 服务器,提供程序化访问 Ghost CMS 的功能。

核心功能

  • 文章管理(创建、读取、更新、删除、搜索)
  • 页面管理(创建、读取、更新、删除)
  • 标签管理
  • 作者管理
  • 成员管理(创建、读取、更新、删除、搜索)
  • 图片上传支持

适用场景

  • 自动化管理 Ghost CMS 内容
  • 批量处理文章或页面
  • 集成 Ghost CMS 到其他系统或工作流中

工具列表

  • get_posts: 获取博客文章列表
  • get_post: 通过 ID 获取特定文章
  • search_posts: 搜索文章
  • create_post: 创建新文章
  • update_post: 更新现有文章
  • delete_post: 删除文章
  • get_pages: 获取页面列表
  • get_members: 获取成员列表
  • search_members: 搜索成员
  • upload_image: 上传图片

常见问题解答

  • 调试建议:使用 MCP Inspector 进行调试,运行 npm run inspect 获取调试工具 URL。

使用教程

使用依赖

  • Node.js (v18 或更高版本)
  • Ghost CMS 实例
  • Ghost Admin API 密钥

安装教程

安装包:

npm install @mtane0412/ghost-mcp-server

配置

  1. 在 Ghost Admin 仪表板的 Settings > Integrations 中创建新的自定义集成。
  2. 设置环境变量:
# macOS/Linux
export GHOST_URL="https://your-ghost-blog.com"
export GHOST_ADMIN_API_KEY="your_admin_api_key"

# Windows (PowerShell)
$env:GHOST_URL="https://your-ghost-blog.com"
$env:GHOST_ADMIN_API_KEY="your_admin_api_key"

或创建 .env 文件:

GHOST_URL=https://your-ghost-blog.com
GHOST_ADMIN_API_KEY=your_admin_api_key

启动服务器

npx @mtane0412/ghost-mcp-server

调试方式

使用 MCP Inspector 进行调试:

npm run inspect

许可证

该项目遵循 MIT 开源许可条款。