ghost-mcp
by: MFYDev
A Model Context Protocol (MCP) server for interacting with Ghost CMS through LLM interfaces like Claude. Allow you to control your Ghost blog by simply asking Claude etc.
📌Overview
Purpose: Provide a secure and comprehensive server interface for interacting with Ghost CMS through LLMs like Claude.
Overview: The Ghost MCP Server utilizes the Model Context Protocol to enable users to efficiently manage their Ghost blog's posts, users, members, tiers, offers, and newsletters with advanced functionalities and secure communication via JWT authentication.
Key Features:
-
Secure JWT Authentication: Ensures secure and authorized access to the Ghost Admin API, enhancing system integrity.
-
Comprehensive Entity Access: Offers detailed access to all critical Ghost CMS components, including posts, users, and newsletters, facilitating extensive content management.
-
Advanced Search Functionality: Supports both fuzzy and exact matching for enhanced search capabilities, allowing users to find content more easily.
-
Detailed Output: Provides human-readable responses for API calls, enhancing the usability and interpretability of data.
-
Error Handling and Logging: Equipped with robust error handling through custom exceptions and integrated logging support for improved troubleshooting and system monitoring.
Ghost MCP Server
Important Notice: Python to TypeScript Migration
The Ghost MCP Server has been completely rewritten from Python to TypeScript in v0.1.0. This update brings several benefits:
- Simplified installation via NPM package:
@fanyangmeng/ghost-mcp
- Improved reliability using the official
@tryghost/admin-api
client - Better maintainability with TypeScript's type safety and organization
- Streamlined configuration through environment variables
Breaking Changes
- No more Python dependencies
- Configuration now uses Node.js environment variables
- Simplified Docker deployment
- Installation now via NPM
Refer to the updated documentation for migration details. For issues, open a GitHub issue.
A Model Context Protocol (MCP) server enabling interaction with Ghost CMS through LLM interfaces like Claude. It provides secure and comprehensive access to your Ghost blog using JWT authentication and a rich set of MCP tools to manage posts, users, members, tiers, offers, and newsletters.
Features
- Secure Ghost Admin API requests with
@tryghost/admin-api
- Access to posts, users, members, tiers, offers, newsletters, and more
- Advanced search with fuzzy and exact matching
- Human-readable output for Ghost entities
- Robust error handling with custom
GhostError
exceptions - Integrated logging via MCP context for troubleshooting
Usage
To use with MCP clients like Claude Desktop, add this 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 MCP server provides access to these Ghost CMS resources:
- Posts: Articles and content
- Members: Registered users and subscribers
- Newsletters: Managed email newsletters
- Offers: Promotional offers and discounts
- Invites: Invitations for new users or staff
- Roles: User roles and permissions
- Tags: Organizational tags
- Tiers: Subscription tiers and plans
- Users: Admin and staff accounts
- Webhooks: Automated event notifications
Available Tools
Each resource provides operations such as browse, read, create, edit, and delete.
Posts
- Browse Posts
- Read Post
- Add Post
- Edit Post
- Delete Post
Members
- Browse Members
- Read Member
- Add Member
- Edit Member
- Delete Member
Newsletters
- Browse Newsletters
- Read Newsletter
- Add Newsletter
- Edit Newsletter
- Delete Newsletter
Offers
- Browse Offers
- Read Offer
- Add Offer
- Edit Offer
- Delete Offer
Invites
- Browse Invites
- Add Invite
- Delete Invite
Roles
- Browse Roles
- Read Role
Tags
- Browse Tags
- Read Tag
- Add Tag
- Edit Tag
- Delete Tag
Tiers
- Browse Tiers
- Read Tier
- Add Tier
- Edit Tier
- Delete Tier
Users
- Browse Users
- Read User
- Edit User
- Delete User
Webhooks
- Browse Webhooks
- Add Webhook
- Delete Webhook
Each tool is accessible via MCP protocol and usable from compatible clients. For detailed parameters and usage, see the source code under src/tools/
.
Error Handling
Uses custom GhostError
exceptions to clearly report API and processing errors for effective troubleshooting.
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Create a pull request
License
MIT