# ghost-mcp

> MCP Server

The Ghost MCP Server enables interaction with Ghost CMS through LLM interfaces like Claude, providing secure access to manage posts, users, and other entities via the Model Context Protocol. It

## Overview

- **Category:** Developer Tools
- **Language:** Python
- **Stars:** 220
- **Forks:** 7
- **Owner:** MFYDev
- **GitHub:** https://github.com/MFYDev/ghost-mcp
- **Homepage:** https://fanyangmeng.blog/introducing-ghost-mcp-a-model-context-protocol-server-for-ghost-cms/
- **Created:** 2025-02-11T06:23:30+00:00
- **Updated:** 2025-03-27T07:30:00+00:00
- **Source:** https://model-context-protocol.com/servers/ghost-cms-llm-control-model-protocol

## Setup

## Setup

### Installing via Smithery
To install Ghost MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@MFYDev/ghost-mcp):

```bash
npx -y @smithery/cli install @MFYDev/ghost-mcp --client claude
```

### Manual Installation
```bash
# 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 .
```

## Requirements

- Python â¥ 3.12
- Running Ghost instance with Admin API access (v5.x+ recommended)
- Node.js (for testing with MCP Inspector)

## Usage

### Environment Variables

```bash
GHOST_API_URL=https://yourblog.com  # Your Ghost Admin API URL
GHOST_STAFF_API_KEY=your_staff_api_key                 # Your Ghost Staff API key
```

### Usage with MCP Clients
To use this with MCP clients, for instance, Claude Desktop, add the following to your `claude_desktop_config.json`:
```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"
      }
    }
  }
}
```

### Testing with MCP Inspector

```bash
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
```

## Tools

## Available Tools

1.  Secure JWT Authentication (for Ghost Admin API requests)
2.  Comprehensive entity access (including posts, users, members, tiers, offers, and newsletters)
3.  Advanced search functionality (with both fuzzy and exact matching options)
4.  Detailed, human-readable output (for Ghost entities)
5.  Robust error handling (using custom `GhostError` exceptions)
6.  Integrated logging support (via MCP context for enhanced troubleshooting)
7.  `ghost` tool (Central tool for accessing all Ghost CMS functionality)
8.  Posts Actions (List, search, read, create, update, delete, and batch update posts)
9.  Tags Actions (Browse, read, create, update, and delete tags)
10. Users Actions (List roles, create invite, list, read, and delete users)
11. Members Actions (List, read, create, and update members)
12. Tiers Actions (List, read, create, and update tiers)
13. Offers Actions (List, read, create, and update offers)
14. Newsletters Actions (List, read, create, and update newsletters)
15. Webhooks Actions (Create, update, and delete webhooks)
