🚀 亡靈MCP服務器
亡靈MCP服務器是一個與Ghost管理控制檯API集成的模型上下文協議(MCP)服務器。它能夠實現對Ghost CMS功能的程序化訪問,涵蓋文章管理、頁面管理、成員管理等諸多方面。
🚀 快速開始
在使用亡靈MCP服務器前,你需要確保滿足以下先決條件,並完成安裝和配置:
先決條件
- 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
更新現有事件。
輸入:
{
"id": "string",
"title": "string",
"date": "date",
"description": "string"
}
delete_event
刪除事件。
輸入:
{
"id": "string"
}