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.
GhostError
exceptionsTo install Ghost MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @MFYDev/ghost-mcp --client claude
# Clone repository
git clone git@github.com/mfydev/ghost-mcp.git
cd ghost-mcp
# Create virtual environment and install
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e .
GHOST_API_URL=https://yourblog.com # Your Ghost Admin API URL
GHOST_STAFF_API_KEY=your_staff_api_key # Your Ghost Staff API key
To use this with MCP clients, for instance, Claude Desktop, add the following to your claude_desktop_config.json
:
{
"mcpServers": {
"ghost": {
"command": "/Users/username/.local/bin/uv",
"args": [
"--directory",
"/path/to/ghost-mcp",
"run",
"src/main.py"
],
"env": {
"GHOST_API_URL": "your_ghost_api_url",
"GHOST_STAFF_API_KEY": "your_staff_api_key"
}
}
}
}
GHOST_API_URL=your_ghost_api_url GHOST_STAFF_API_KEY=your_staff_api_key npx @modelcontextprotocol/inspector uv --directory /path/to/ghost-mcp run src/main.py
Ghost MCP now provides a single unified tool that provides access to all Ghost CMS functionality:
ghost
: Central tool for accessing all Ghost CMS functionalityThe ghost tool accepts two main parameters:
action
: The specific Ghost operation to performparams
: A dictionary of parameters for the specified actionExample usage:
# List posts
ghost(action="list_posts", params={"format": "text", "page": 1, "limit": 15})
# Search posts by title
ghost(action="search_posts_by_title", params={"query": "Welcome", "exact": False})
# Create a post
ghost(action="create_post", params={
"post_data": {
"title": "New Post via MCP",
"status": "draft",
"lexical": "{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Hello World\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}"
}
})
The ghost tool supports all the same actions as before, but now through a unified interface:
list_posts
: List blog posts with paginationsearch_posts_by_title
: Search for posts by titleread_post
: Retrieve full content of a specific postcreate_post
: Create a new postupdate_post
: Update a specific postdelete_post
: Delete a specific postbatchly_update_posts
: Update multiple posts in a single requestbrowse_tags
: List all tagsread_tag
: Retrieve specific tag informationcreate_tag
: Create a new tagupdate_tag
: Update an existing tagdelete_tag
: Delete a specific taglist_roles
: List all available rolescreate_invite
: Create a new user invitationlist_users
: List all usersread_user
: Get details of a specific userdelete_user
: Delete a specific userlist_members
: List membersread_member
: Retrieve specific member informationcreate_member
: Create a new memberupdate_member
: Update an existing memberlist_tiers
: List all membership tiersread_tier
: Retrieve specific tier informationcreate_tier
: Create a new tierupdate_tier
: Update an existing tierlist_offers
: List promotional offersread_offer
: Get specific offer informationcreate_offer
: Create a new offerupdate_offer
: Update an existing offerlist_newsletters
: List all newslettersread_newsletter
: Retrieve specific newsletter informationcreate_newsletter
: Create a new newsletterupdate_newsletter
: Update an existing newslettercreate_webhook
: Create a new webhookupdate_webhook
: Update an existing webhookdelete_webhook
: Delete a specific webhookAll resources follow the URI pattern: [type]://[id]
user://{user_id}
: User profiles and rolesmember://{member_id}
: Member details and subscriptionstier://{tier_id}
: Tier configurationsoffer://{offer_id}
: Offer detailsnewsletter://{newsletter_id}
: Newsletter settingspost://{post_id}
: Post content and metadatablog://info
: General blog informationGhost 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.
MIT
Seamless access to top MCP servers powering the future of AI integration.