mcpField
G
Ghost MCP Server

Ghost MCP Server

本地服务
github.com/mtane0412商业与营销390 周前更新

关于 Ghost MCP Server

Ghost MCP Server 将 Ghost Admin API 接入 MCP,面向需要通过客户端管理 Ghost CMS 内容和成员的用户。它支持文章与页面维护、标签和作者管理、成员检索以及图片上传。

主要功能

  1. 01创建、查询、更新和删除文章
  2. 02搜索文章并管理页面
  3. 03管理标签与作者
  4. 04创建、搜索和维护成员
  5. 05上传图片

适用场景

  1. 01查找或更新博客文章
  2. 02创建和维护网站页面
  3. 03管理会员记录
  4. 04将图片上传至 Ghost

MCP 相关

该 MCP 服务通过 Ghost Admin API 向 MCP 客户端提供 Ghost CMS 的内容、页面、成员及图片管理工具。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"ghost": {
"command": "npx",
"args": [
"-y",
"@mtane0412/ghost-mcp-server"
]
}
}
}
启动命令npx -y @mtane0412/ghost-mcp-server

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npm@mtane0412/ghost-mcp-server

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

Ghost MCP 服务

一个与 Ghost Admin API 集成的模型上下文协议(MCP)服务。此服务支持以编程方式访问 Ghost CMS 功能,包括文章管理、页面管理、成员管理等。

功能

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

前提条件

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

安装

使用 npm 安装软件包:

npm install @mtane0412/ghost-mcp-server

配置

  1. 在 Ghost 管理后台的 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

可用工具

get_posts

获取文章列表。

输入:

{
  "limit": "number", // Optional: Number of posts to retrieve (1-100, default: 10)
  "page": "number"   // Optional: Page number (default: 1)
}
get_post

按 ID 获取指定文章。

输入:

{
  "id": "string" // Required: Post ID
}
search_posts

搜索文章。

输入:

{
  "query": "string", // Required: Search query
  "limit": "number"  // Optional: Number of posts to retrieve (1-100, default: 10)
}
create_post

创建新文章。

输入:

{
  "title": "string",     // Required: Post title
  "html": "string",      // Optional: HTML content
  "lexical": "string",   // Optional: Lexical content
  "status": "string",    // Optional: Post status (published/draft/scheduled)
  "visibility": "string" // Optional: Visibility level (public/members/paid/tiers)
}
update_post

更新现有文章。

输入:

{
  "id": "string",       // Required: Post ID
  "title": "string",    // Optional: Post title
  "html": "string",     // Optional: HTML content
  "lexical": "string",  // Optional: Lexical content
  "status": "string"    // Optional: Post status
}
delete_post

删除文章。

输入:

{
  "id": "string" // Required: Post ID
}
get_pages

获取页面列表。

输入:

{
  "limit": "number",     // Optional: Number of pages to retrieve (1-100, default: 10)
  "page": "number",      // Optional: Page number (default: 1)
  "order": "string",     // Optional: Sort order
  "formats": ["string"], // Optional: Content formats (html/mobiledoc/lexical)
  "include": ["string"]  // Optional: Related data to include (authors/tags)
}
get_members

获取成员列表。

输入:

{
  "limit": "number",     // Optional: Number of members to retrieve (1-100, default: 10)
  "page": "number",      // Optional: Page number (default: 1)
  "order": "string",     // Optional: Sort order
  "include": ["string"]  // Optional: Related data to include (labels/newsletters)
}
search_members

搜索成员。

输入:

{
  "query": "string",     // Required: Search query
  "limit": "number",     // Optional: Number of members to retrieve (1-100, default: 10)
  "include": ["string"]  // Optional: Related data to include (labels/newsletters)
}
upload_image

上传图片。

输入:

{
  "file": "string",   // Required: Base64 encoded image data
  "purpose": "string" // Optional: Image purpose (image/profile_image/icon)
}
调试

由于 MCP 服务通过标准输入输出(stdio)通信,调试可能颇具挑战。我们建议使用 MCP Inspector,它可通过软件包脚本运行:

npm run inspect

Inspector 会提供一个 URL,供你在浏览器中访问调试工具。

许可证

MIT 许可证

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。