Back to MCP directory
publicPublicdnsLocal runtime

mtane0412_ghost-mcp-server

Ghost MCP Server是一个与Ghost CMS管理API集成的服务器,提供对文章、页面、标签、作者和会员等内容的程序化访问与管理功能。

article

README

🚀 亡灵MCP服务器

亡灵MCP服务器是一个与Ghost管理控制台API集成的模型上下文协议(MCP)服务器。它能够实现对Ghost CMS功能的程序化访问,涵盖文章管理、页面管理、成员管理等诸多方面。

🚀 快速开始

在使用亡灵MCP服务器前,你需要确保满足以下先决条件,并完成安装和配置:

先决条件

  • Node.js(建议使用v18或更高版本)
  • Ghost CMS实例
  • Ghost管理控制台API密钥

安装

使用npm安装包:

npm install @mtane0412/ghost-mcp-server

配置

  1. 在你的Ghost管理控制台仪表盘的设置 > 集成中创建一个新的自定义集成。
  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", // 可选:要获取的文章数量(1-100,默认:10)
  "page": "number"   // 可选:页码(默认:1)
}

get_post

通过ID检索特定文章。 输入:

{
  "id": "string" // 必需:文章ID
}

search_posts

搜索文章。 输入:

{
  "query": "string", // 必需:搜索查询
  "limit": "number" // 可选:要获取的文章数量(默认:10)
}

get_pages

检索页面列表。 输入:

{
  "limit": "number", // 可选:要获取的页面数量(1-100,默认:10)
  "page": "number"   // 可选:页码(默认:1)
}

get_page

通过ID检索特定页面。 输入:

{
  "id": "string" // 必需:页面ID
}

search_pages

搜索页面。 输入:

{
  "query": "string", // 必需:搜索查询
  "limit": "number" // 可选:要获取的页面数量(默认:10)
}

create_post

创建新文章。 输入:

{
  "title": "string", // 必需:文章标题
  "content": "string", // 必需:文章内容
  "status": "string", // 可选:文章状态(draft、publish,默认:publish)
  "template": "string" // 可选:要使用的模板
}

update_post

更新现有文章。 输入:

{
  "id": "string", // 必需:文章ID
  "title": "string", // 可选:新标题
  "content": "string", // 可选:新内容
  "status": "string" // 可选:新状态(draft、publish)
}

delete_post

删除文章。 输入:

{
  "id": "string" // 必需:文章ID
}

create_page

创建新页面。 输入:

{
  "title": "string", // 必需:页面标题
  "content": "string", // 必需:页面内容
  "status": "string", // 可选:页面状态(draft、publish,默认:publish)
  "template": "string" // 可选:要使用的模板
}

update_page

更新现有页面。 输入:

{
  "id": "string", // 必需:页面ID
  "title": "string", // 可选:新标题
  "content": "string", // 可选:新内容
  "status": "string" // 可选:新状态(draft、publish)
}

delete_page

删除页面。 输入:

{
  "id": "string" // 必需:页面ID
}

create_tag

创建新标签。 输入:

{
  "name": "string" // 必需:标签名称
}

update_tag

更新现有标签。 输入:

{
  "id": "string", // 必需:标签ID
  "name": "string" // 可选:新标签名称
}

delete_tag

删除标签。 输入:

{
  "id": "string" // 必需:标签ID
}

create_author

创建新作者。 输入:

{
  "username": "string", // 必需:用户名
  "email": "string", // 必需:电子邮件
  "password": "string" // 可选:密码(加密)
}

update_author

更新现有作者。 输入:

{
  "id": "string", // 必需:作者ID
  "username": "string", // 可选:新用户名
  "email": "string", // 可选:新电子邮件
  "password": "string" // 可选:新密码(加密)
}

delete_author

删除作者。 输入:

{
  "id": "string" // 必需:作者ID
}

create_member

创建新成员。 输入:

{
  "username": "string", // 必需:用户名
  "email": "string", // 必需:电子邮件
  "password": "string" // 可选:密码(加密)
}

update_member

更新现有成员。 输入:

{
  "id": "string", // 必需:成员ID
  "username": "string", // 可选:新用户名
  "email": "string", // 可选:新电子邮件
  "password": "string" // 可选:新密码(加密)
}

delete_member

删除成员。 输入:

{
  "id": "string" // 必需:成员ID
}

create_comment

创建新评论。 输入:

{
  "content": "string", // 必需:评论内容
  "author_id": "string", // 可选:作者ID
  "post_id": "string" // 可选:关联的文章ID
}

update_comment

更新现有评论。 输入:

{
  "id": "string", // 必需:评论ID
  "content": "string", // 可选:新内容
  "status": "string" // 可选:新状态(approved、pending、spam,默认:pending)
}

delete_comment

删除评论。 输入:

{
  "id": "string" // 必需:评论ID
}

search_comments

搜索评论。 输入:

{
  "query": "string", // 可选:搜索查询
  "status": "string", // 可选:筛选状态(approved、pending、spam)
  "limit": "number" // 可选:要获取的评论数量(默认:10)
}

upload_file

上传文件。 输入:

{
  "file": "binary" // 必需:要上传的文件内容
}

create_template

创建新模板。 输入:

{
  "name": "string", // 必需:模板名称
  "content": "string" // 可选:模板内容
}

update_template

更新现有模板。 输入:

{
  "id": "string", // 必需:模板ID
  "name": "string", // 可选:新模板名称
  "content": "string" // 可选:新模板内容
}

delete_template

删除模板。 输入:

{
  "id": "string" // 必需:模板ID
}

generate_thumbnail

生成缩略图。 输入:

{
  "url": "string", // 必需:原始图像的URL
  "width": "number", // 可选:目标宽度
  "height": "number" // 可选:目标高度
}

resize_image

调整图像大小。 输入:

{
  "url": "string", // 必需:原始图像的URL
  "width": "number", // 可选:新宽度
  "height": "number" // 可选:新高度
}

add_to_cart

将商品添加到购物车。 输入:

{
  "product_id": "string", // 必需:商品ID
  "quantity": "number" // 可选:数量(默认:1)
}

update_cart

更新购物车中的商品。 输入:

{
  "cart_id": "string", // 必需:购物车ID
  "product_id": "string", // 必需:商品ID
  "quantity": "number" // 可选:新数量
}

delete_from_cart

从购物车中删除商品。 输入:

{
  "cart_id": "string", // 必需:购物车ID
  "product_id": "string" // 必需:商品ID
}

place_order

提交订单。 输入:

{
  "cart_id": "string", // 必需:购物车ID
  "payment_method": "string", // 可选:支付方式
  "shipping_address": "string" // 可选: shipping address
}

search_products

搜索商品。 输入:

{
  "query": "string", // 可选:搜索查询
  "category": "string", // 可选:筛选类别
  "price_min": "number", // 可选:最小价格
  "price_max": "number" // 可选:最大价格
}

create_category

创建新分类。 输入:

{
  "name": "string", // 必需:分类名称
  "description": "string" // 可选:分类描述
}

update_category

更新现有分类。 输入:

{
  "id": "string", // 必需:分类ID
  "name": "string", // 可选:新分类名称
  "description": "string" // 可选:新分类描述
}

delete_category

删除分类。 输入:

{
  "id": "string" // 必需:分类ID
}

create_order

创建新订单。 输入:

{
  "customer_id": "string", // 可选:客户ID
  "order_date": "date", // 可选:订单日期
  "total_amount": "number" // 必需:总金额
}

update_order

更新现有订单。 输入:

{
  "order_id": "string", // 必需:订单ID
  "status": "string", // 可选:新状态(pending、processing、shipped、delivered)
  "shipping_address": "string" // 可选:新 shipping address
}

delete_order

删除订单。 输入:

{
  "order_id": "string" // 必需:订单ID
}

search_orders

搜索订单。 输入:

{
  "query": "string", // 可选:搜索查询
  "status": "string", // 可选:筛选状态
  "date_range": "object" // 可选:日期范围(起始和结束)
}

create_customer

创建新客户。 输入:

{
  "name": "string", // 必需:客户名称
  "email": "string", // 必需:客户电子邮件
  "phone": "string" // 可选:客户电话号码
}

update_customer

更新现有客户。 输入:

{
  "customer_id": "string", // 必需:客户ID
  "name": "string", // 可选:新名称
  "email": "string", // 可选:新电子邮件
  "phone": "string" // 可选:新电话号码
}

delete_customer

删除客户。 输入:

{
  "customer_id": "string" // 必需:客户ID
}

search_customers

搜索客户。 输入:

{
  "query": "string", // 可选:搜索查询(可以是名称或电子邮件)
  "status": "string" // 可选:筛选状态(active、inactive)
}

create_blog_post

创建新博客文章。 输入:

{
  "title": "string", // 必需:文章标题
  "content": "string", // 必需:文章内容
  "author_id": "string" // 可选:作者ID
}

update_blog_post

更新现有博客文章。 输入:

{
  "post_id": "string", // 必需:文章ID
  "title": "string", // 可选:新标题
  "content": "string", // 可选:新内容
  "status": "string" // 可选:新状态(draft、published)
}

delete_blog_post

删除博客文章。 输入:

{
  "post_id": "string" // 必需:文章ID
}

search_blog_posts

搜索博客文章。 输入:

{
  "query": "string", // 可选:搜索查询(标题或内容)
  "author": "string", // 可选:作者名称
  "status": "string" // 可选:筛选状态(draft、published)
}

create_event

创建新事件。 输入:

{
  "title": "string", // 必需:事件标题
  "date": "date", // 必需:事件日期
  "description": "string" // 可选:事件描述
}

update_event

更新现有事件。 输入:

{
  "id": "string", // 必需:事件ID
  "title": "string", // 可选:新标题
  "date": "date", // 可选:新日期
  "description": "string" // 可选:新描述
}

delete_event

删除事件。 输入:

{
  "id": "string" // 必需:事件ID
}
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client