亡灵MCP服务器
一个与Ghost管理控制台API集成的模型上下文协议(MCP)服务器。此服务器启用程序化访问到Ghost CMS功能,包括文章管理、页面管理、成员管理等。
功能
- 文章管理(创建、读取、更新、删除、搜索)
- 页面管理(创建、读取、更新、删除)
- 标签管理
- 作者管理
- 成员管理(创建、读取、更新、删除、搜索)
- 图像上传支持
先决条件
- Node.js(建议使用v18或更高版本)
- Ghost CMS实例
- Ghost管理控制台API密钥
安装
使用npm安装包:
npm install @mtane0412/ghost-mcp-server
配置
-
在你的Ghost管理控制台仪表盘的设置 > 集成中创建一个新的自定义集成。
-
设置以下环境变量:
export GHOST_URL="https://your-ghost-blog.com"
export GHOST_ADMIN_API_KEY="your_admin_api_key"
$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",
"page": "number"
}
get_post
通过ID检索特定文章。
输入:
{
"id": "string"
}
search_posts
搜索文章。
输入:
{
"query": "string",
"limit": "number"
}
get_pages
检索页面列表。
输入:
{
"limit": "number",
"page": "number"
}
get_page
通过ID检索特定页面。
输入:
{
"id": "string"
}
search_pages
搜索页面。
输入:
{
"query": "string",
"limit": "number"
}
create_post
创建新文章。
输入:
{
"title": "string",
"content": "string",
"status": "string",
"template": "string"
}
update_post
更新现有文章。
输入:
{
"id": "string",
"title": "string",
"content": "string",
"status": "string"
}
delete_post
删除文章。
输入:
{
"id": "string"
}
create_page
创建新页面。
输入:
{
"title": "string",
"content": "string",
"status": "string",
"template": "string"
}
update_page
更新现有页面。
输入:
{
"id": "string",
"title": "string",
"content": "string",
"status": "string"
}
delete_page
删除页面。
输入:
{
"id": "string"
}
create_tag
创建新标签。
输入:
{
"name": "string"
}
update_tag
更新现有标签。
输入:
{
"id": "string",
"name": "string"
}
delete_tag
删除标签。
输入:
{
"id": "string"
}
create_author
创建新作者。
输入:
{
"username": "string",
"email": "string",
"password": "string"
}
update_author
更新现有作者。
输入:
{
"id": "string",
"username": "string",
"email": "string",
"password": "string"
}
delete_author
删除作者。
输入:
{
"id": "string"
}
create_member
创建新成员。
输入:
{
"username": "string",
"email": "string",
"password": "string"
}
update_member
更新现有成员。
输入:
{
"id": "string",
"username": "string",
"email": "string",
"password": "string"
}
delete_member
删除成员。
输入:
{
"id": "string"
}
create_comment
创建新评论。
输入:
{
"content": "string",
"author_id": "string",
"post_id": "string"
}
update_comment
更新现有评论。
输入:
{
"id": "string",
"content": "string",
"status": "string"
}
delete_comment
删除评论。
输入:
{
"id": "string"
}
search_comments
搜索评论。
输入:
{
"query": "string",
"status": "string",
"limit": "number"
}
upload_file
上传文件。
输入:
{
"file": "binary"
}
create_template
创建新模板。
输入:
{
"name": "string",
"content": "string"
}
update_template
更新现有模板。
输入:
{
"id": "string",
"name": "string",
"content": "string"
}
delete_template
删除模板。
输入:
{
"id": "string"
}
generate_thumbnail
生成缩略图。
输入:
{
"url": "string",
"width": "number",
"height": "number"
}
resize_image
调整图像大小。
输入:
{
"url": "string",
"width": "number",
"height": "number"
}
add_to_cart
将商品添加到购物车。
输入:
{
"product_id": "string",
"quantity": "number"
}
update_cart
更新购物车中的商品。
输入:
{
"cart_id": "string",
"product_id": "string",
"quantity": "number"
}
delete_from_cart
从购物车中删除商品。
输入:
{
"cart_id": "string",
"product_id": "string"
}
place_order
提交订单。
输入:
{
"cart_id": "string",
"payment_method": "string",
"shipping_address": "string"
}
search_products
搜索商品。
输入:
{
"query": "string",
"category": "string",
"price_min": "number",
"price_max": "number"
}
create_category
创建新分类。
输入:
{
"name": "string",
"description": "string"
}
update_category
更新现有分类。
输入:
{
"id": "string",
"name": "string",
"description": "string"
}
delete_category
删除分类。
输入:
{
"id": "string"
}
create_order
创建新订单。
输入:
{
"customer_id": "string",
"order_date": "date",
"total_amount": "number"
}
update_order
更新现有订单。
输入:
{
"order_id": "string",
"status": "string",
"shipping_address": "string"
}
delete_order
删除订单。
输入:
{
"order_id": "string"
}
search_orders
搜索订单。
输入:
{
"query": "string",
"status": "string",
"date_range": "object"
}
create_customer
创建新客户。
输入:
{
"name": "string",
"email": "string",
"phone": "string"
}
update_customer
更新现有客户。
输入:
{
"customer_id": "string",
"name": "string",
"email": "string",
"phone": "string"
}
delete_customer
删除客户。
输入:
{
"customer_id": "string"
}
search_customers
搜索客户。
输入:
{
"query": "string",
"status": "string"
}
create_blog_post
创建新博客文章。
输入:
{
"title": "string",
"content": "string",
"author_id": "string"
}
update_blog_post
更新现有博客文章。
输入:
{
"post_id": "string",
"title": "string",
"content": "string",
"status": "string"
}
delete_blog_post
删除博客文章。
输入:
{
"post_id": "string"
}
search_blog_posts
搜索博客文章。
输入:
{
"query": "string",
"author": "string",
"status": "string"
}
create_event
创建新事件。
输入:
{
"title": "string",
"date": "date",
"description": "string"
}
update_event
更新现有事件。
输入: