@fanyangmeng/ghost-mcp

中文文档
0.2.0发布于 2026/04/20ISCCommonJS近 30 天下载 10.2万

MCP server for using the Ghost API

原始使用文档
文档目录19 节
  1. ‼️ Important Notice: Python to TypeScript Migration
  2. Breaking Changes
  3. Features
  4. Usage
  5. Available Resources
  6. Available Tools
  7. Posts
  8. Members
  9. Newsletters
  10. Offers
  11. Invites
  12. Roles
  13. Tags
  14. Tiers
  15. Users
  16. Webhooks
  17. Error Handling
  18. Contributing
  19. License

Ghost MCP Server

‼️ Important Notice: Python to TypeScript Migration

I've completely rewritten the Ghost MCP Server from Python to TypeScript in this v0.1.0 release. This major change brings several benefits:

  • Simplified installation: Now available as an NPM package (@fanyangmeng/ghost-mcp)
  • Improved reliability: Uses the official @tryghost/admin-api client instead of custom implementation
  • Better maintainability: TypeScript provides type safety and better code organization
  • Streamlined configuration: Simple environment variable setup

Breaking Changes

  • Python dependencies are no longer required
  • Configuration method has changed (now using Node.js environment variables)
  • Docker deployment has been simplified
  • Different installation process (now using NPM)

Please see the below updated documentation for details on migrating from the Python version. If you encounter any issues, feel free to open an issue on GitHub.


A Model Context Protocol (MCP) server for interacting with Ghost CMS through LLM interfaces like Claude. This server provides secure and comprehensive access to your Ghost blog, leveraging JWT authentication and a rich set of MCP tools for managing posts, users, members, tiers, offers, and newsletters.

demo

Features

  • Secure Ghost Admin API requests with @tryghost/admin-api
  • Comprehensive entity access including posts, users, members, tiers, offers, and newsletters
  • Advanced search functionality with both fuzzy and exact matching options
  • Detailed, human-readable output for Ghost entities
  • Robust error handling using custom GhostError exceptions
  • Integrated logging support via MCP context for enhanced troubleshooting

Usage

To use this with MCP clients, for instance, Claude Desktop, add the following to your claude_desktop_config.json:

{
  "mcpServers": {
      "ghost-mcp": {
        "command": "npx",
        "args": ["-y", "@fanyangmeng/ghost-mcp"],
        "env": {
            "GHOST_API_URL": "https://yourblog.com",
            "GHOST_ADMIN_API_KEY": "your_admin_api_key",
            "GHOST_API_VERSION": "v5.0"
        }
      }
    }
}

Available Resources

The following Ghost CMS resources are available through this MCP server:

  • Posts: Articles and content published on your Ghost site.
  • Members: Registered users and subscribers of your site.
  • Newsletters: Email newsletters managed and sent via Ghost.
  • Offers: Promotional offers and discounts for members.
  • Invites: Invitations for new users or staff to join your Ghost site.
  • Roles: User roles and permissions within the Ghost admin.
  • Tags: Organizational tags for posts and content.
  • Tiers: Subscription tiers and plans for members.
  • Users: Admin users and staff accounts.
  • Webhooks: Automated event notifications to external services.

Available Tools

This MCP server exposes a comprehensive set of tools for managing your Ghost CMS via the Model Context Protocol. Each resource provides a set of operations, typically including browsing, reading, creating, editing, and deleting entities. Below is a summary of the available tools:

Posts

  • Browse Posts: List posts with optional filters, pagination, and ordering.
  • Read Post: Retrieve a post by ID or slug.
  • Add Post: Create a new post with title, content, and status.
  • Edit Post: Update an existing post by ID.
  • Delete Post: Remove a post by ID.

Members

  • Browse Members: List members with filters and pagination.
  • Read Member: Retrieve a member by ID or email.
  • Add Member: Create a new member.
  • Edit Member: Update member details.
  • Delete Member: Remove a member.

Newsletters

  • Browse Newsletters: List newsletters.
  • Read Newsletter: Retrieve a newsletter by ID.
  • Add Newsletter: Create a new newsletter.
  • Edit Newsletter: Update newsletter details.
  • Delete Newsletter: Remove a newsletter.

Offers

  • Browse Offers: List offers.
  • Read Offer: Retrieve an offer by ID.
  • Add Offer: Create a new offer.
  • Edit Offer: Update offer details.
  • Delete Offer: Remove an offer.

Invites

  • Browse Invites: List invites.
  • Add Invite: Create a new invite.
  • Delete Invite: Remove an invite.

Roles

  • Browse Roles: List roles.
  • Read Role: Retrieve a role by ID.

Tags

  • Browse Tags: List tags.
  • Read Tag: Retrieve a tag by ID or slug.
  • Add Tag: Create a new tag.
  • Edit Tag: Update tag details.
  • Delete Tag: Remove a tag.

Tiers

  • Browse Tiers: List tiers.
  • Read Tier: Retrieve a tier by ID.
  • Add Tier: Create a new tier.
  • Edit Tier: Update tier details.
  • Delete Tier: Remove a tier.

Users

  • Browse Users: List users.
  • Read User: Retrieve a user by ID or slug.
  • Edit User: Update user details.
  • Delete User: Remove a user.

Webhooks

  • Browse Webhooks: List webhooks.
  • Add Webhook: Create a new webhook.
  • Delete Webhook: Remove a webhook.

Each tool is accessible via the MCP protocol and can be invoked from compatible clients. For detailed parameter schemas and usage, see the source code in src/tools/.

Error Handling

Ghost MCP Server employs a custom GhostError exception to handle API communication errors and processing issues. This ensures clear and descriptive error messages to assist with troubleshooting.

Contributing

  1. Fork repository
  2. Create feature branch
  3. Commit changes
  4. Create pull request

License

MIT

版本与发布记录

@fanyangmeng/ghost-mcp 共发布 6 个版本,首次发布于 2025/04/21;过去 12 个月发布了 1 个版本。

版本发布日期距今
0.2.0latest2026/04/206 个月前
0.1.02025/04/211.6 年前
0.0.42025/04/211.6 年前
0.0.32025/04/211.6 年前
0.0.22025/04/211.6 年前
0.0.12025/04/211.6 年前

关于 @fanyangmeng/ghost-mcp 的常见问题

@fanyangmeng/ghost-mcp 是什么?

MCP server for using the Ghost API

如何安装 @fanyangmeng/ghost-mcp?

在项目目录运行 npm install @fanyangmeng/ghost-mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 ghost-mcp,可以用 npx ghost-mcp 直接运行。

@fanyangmeng/ghost-mcp 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/fanyangmeng__ghost-mcp 是否存在。

@fanyangmeng/ghost-mcp 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@fanyangmeng/ghost-mcp 可以商用吗?

@fanyangmeng/ghost-mcp 使用 ISC 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@fanyangmeng/ghost-mcp 的下载量有多少?

根据 npm 官方下载统计,@fanyangmeng/ghost-mcp 在 2026/10/15 – 2026/11/13 这 30 天内被下载 101,913 次,日均约 3,397 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fanyangmeng/ghost-mcp 还在维护吗?

最新版本 0.2.0 发布于 2026/04/20(6 个月前);至今共发布 6 个版本,其中过去 12 个月发布了 1 个;首次发布于 2025/04/21。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。