Skip to main content
Glama

πŸš€ Ghost Blog Management MCP Server

MCP Protocol Cloudflare Workers Ghost CMS License: MIT

Transform your Ghost CMS workflow with AI-powered content management directly from Claude Desktop.

This MCP server brings the full power of Ghost Blog Smart API to Claude, enabling you to create AI-enhanced blog posts, generate stunning feature images, and manage multiple Ghost blogs - all through natural conversation.

✨ Why This MCP Server?

🎯 Multi-Blog Management

Manage unlimited Ghost blogs from a single MCP server. Switch between blogs dynamically by providing credentials, perfect for agencies and content creators managing multiple properties.

πŸ€– AI-First Content Creation

  • Smart Create: Transform rough notes into polished blog posts with Google Gemini

  • Dual Image Generation: Choose between ultra-fast Flux (3-7s) or professional Imagen (10-15s)

  • Auto Enhancement: Generate titles, excerpts, and tags automatically

  • Multi-language Support: Create content in any language

πŸ“ Support for Posts AND Pages

Create both blog posts and static pages (About, Contact, etc.) with the new post_type parameter support.

πŸ” Enterprise-Grade Security

  • GitHub OAuth authentication with flexible access control

  • Private mode: Restrict to specific GitHub users

  • Public mode: Allow all authenticated GitHub users

  • Three-level credential priority system

  • HMAC-signed session management

  • No hardcoded secrets

Related MCP server: Ghost MCP Server

πŸ—οΈ Architecture

graph LR
    A[Claude Desktop] -->|MCP Protocol| B[Ghost Blog MCP Server]
    B -->|REST API| C[Ghost Blog Smart API]
    C -->|Admin API| D[Ghost CMS]
    
    B -.->|OAuth| E[GitHub]
    C -.->|AI| F[Google Gemini]
    C -.->|Images| G[Flux/Imagen]
    
    style A fill:#FFE6CC
    style B fill:#D4FFD4
    style C fill:#D4E4FF
    style D fill:#E8E8E8

πŸ› οΈ Complete Tool Suite (13 Tools)

Tool

Description

AI Features

ghost_health_check

Check API status and health

-

ghost_api_info

Get API capabilities and version

-

ghost_create_post

Create posts/pages with optional AI images

🎨 Flux/Imagen

ghost_smart_create

Transform ideas into complete posts

πŸ€– Gemini + 🎨

ghost_get_posts

List posts with filters

-

ghost_advanced_search

Search posts by text, tags, dates

-

ghost_get_post_details

Get complete post information

-

ghost_update_post

Update post content/metadata

-

ghost_update_post_image

Generate new AI feature image

🎨 Flux/Imagen

ghost_delete_post

Delete posts permanently

-

ghost_posts_summary

Analytics and statistics

-

ghost_batch_get_details

Efficient batch operations

-

ghost_search_by_date

Find posts by date patterns

-

πŸš€ Quick Start

Prerequisites

  1. Ghost Blog with Admin API access

  2. Ghost Blog Smart API deployed (Instructions)

  3. Cloudflare account (free tier works)

  4. GitHub account for OAuth

Step 1: Deploy Ghost Blog Smart API

# Quick start with Docker
docker run -d -p 5000:5000 \
  -e GHOST_ADMIN_API_KEY=your_ghost_key \
  -e GHOST_API_URL=https://your-blog.com \
  -e GEMINI_API_KEY=your_gemini_key \
  -e REPLICATE_API_TOKEN=your_replicate_token \
  --name ghost-blog-api \
  betashow/ghost-blog-smart-api

Step 2: Clone and Configure

git clone https://github.com/preangelleo/ghost-blog-management-mcp.git
cd ghost-blog-management-mcp
npm install

Step 3: Setup GitHub OAuth

Create a GitHub OAuth App:

  • Application name: Ghost Blog Management

  • Homepage URL: http://localhost:8792

  • Callback URL: http://localhost:8792/callback

Step 4: Configure Environment

cp .dev.vars.example .dev.vars

Edit .dev.vars:

GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
COOKIE_ENCRYPTION_KEY=your_api_key  # Must match Ghost Blog Smart API

Step 5: Configure Authorization

Choose your access control mode in .dev.vars:

Option 1: Private Mode (Recommended for production)

# Only specific GitHub users can access
AUTHORIZED_USERS=your-github-username
# For multiple users: AUTHORIZED_USERS=user1,user2,user3

Option 2: Public Mode

# All authenticated GitHub users can access
AUTHORIZED_USERS=
# Or simply don't set the variable

Update the Ghost Blog API URL in src/tools/ghost-blog-tools.ts if needed:

// Line 6: Your Ghost Blog Smart API URL
const API_BASE_URL = 'http://localhost:5000';  // or your production URL

Step 6: Start Development Server

npm run dev
# Server runs at http://localhost:8792

Step 7: Configure Claude Desktop

Add to Claude Desktop settings:

{
  "mcpServers": {
    "ghost-blog": {
      "command": "npx",
      "args": ["mcp-remote", "http://localhost:8792/mcp"],
      "env": {}
    }
  }
}

πŸ’‘ Advanced Features

🎯 Three-Level Credential System

Perfect for managing multiple blogs:

Level 1: Dynamic Selection (Highest Priority)

// Pass credentials directly in tool parameters
await ghost_create_post({
  title: "My Post",
  content: "Content here",
  ghost_admin_api_key: "blog2_key",  // Override default
  ghost_api_url: "https://blog2.com"  // Override default
})

Level 2: Worker Configuration

# Set for entire Worker deployment
wrangler secret put CUSTOM_GHOST_ADMIN_API_KEY
wrangler secret put CUSTOM_GHOST_API_URL

Level 3: Backend Defaults

Uses Ghost Blog Smart API's configured blog - no additional setup needed.

πŸ“„ Posts vs Pages Support

// Create a blog post (default)
await ghost_create_post({
  title: "Blog Post Title",
  content: "Blog content...",
  post_type: "post"  // Optional, this is default
})

// Create a static page
await ghost_create_post({
  title: "About Us",
  content: "Company information...",
  post_type: "page"  // Creates a page instead of post
})

🎨 AI Image Generation Options

// Ultra-fast generation with Flux (3-7 seconds)
await ghost_create_post({
  title: "My Post",
  content: "Content",
  use_generated_feature_image: true,
  prefer_flux: true
})

// Professional quality with Imagen (10-15 seconds)
await ghost_create_post({
  title: "My Post",
  content: "Content",
  use_generated_feature_image: true,
  prefer_imagen: true
})

🌟 Usage Examples in Claude

Create AI-Enhanced Content

"Use ghost_smart_create to write a blog post about 'The Future of Remote Work in 2025' with a professional tone"

Manage Multiple Blogs

"Get the Animagent blog credentials from my-credentials database, then use ghost_create_post to publish a new announcement there"

Batch Operations

"Use ghost_advanced_search to find all posts tagged 'technology', then use ghost_batch_get_details to get their full content"

Update with AI Images

"Use ghost_update_post_image on post ID abc123 to generate a new feature image using Imagen"

πŸš€ Production Deployment

Deploy to Cloudflare Workers

# Login to Cloudflare
wrangler login

# Create KV namespace for OAuth
wrangler kv namespace create "OAUTH_KV"
# Add the namespace_id to wrangler.jsonc

# Deploy to production
npm run deploy

# Set production secrets
wrangler secret put GITHUB_CLIENT_ID
wrangler secret put GITHUB_CLIENT_SECRET
wrangler secret put COOKIE_ENCRYPTION_KEY

# Optional: Set authorization control
# For private mode (specific users only):
wrangler secret put AUTHORIZED_USERS  # Enter: "user1,user2,user3"
# For public mode (all GitHub users), don't set this or set empty

# Optional: Set custom Ghost blog (Level 2)
wrangler secret put CUSTOM_GHOST_ADMIN_API_KEY
wrangler secret put CUSTOM_GHOST_API_URL

Update Claude Desktop for Production

{
  "mcpServers": {
    "ghost-blog": {
      "command": "npx",
      "args": ["mcp-remote", "https://your-worker.workers.dev/mcp"],
      "env": {}
    }
  }
}

πŸ“Š Performance Metrics

Operation

Typical Time

Max Time

Create post (no image)

2-5s

10s

Create post (with Flux)

8-15s

30s

Create post (with Imagen)

15-25s

45s

Smart create (AI content)

10-20s

60s

Update post

1-2s

5s

Search/List

<1s

3s

Batch operations

2-5s

15s

Note: All operations have a 5-minute timeout to ensure reliability

πŸ”’ Security Features

  • GitHub OAuth 2.0: Industry-standard authentication

  • Flexible Access Control:

    • Private Mode: Restrict to specific GitHub users

    • Public Mode: Allow all authenticated GitHub users

  • Signed Cookies: HMAC-SHA256 session security

  • Environment Variables: No hardcoded secrets

  • API Key Protection: Separate keys for each service

  • Test Mode: Safe experimentation with is_test: true

πŸ” Troubleshooting

Common Issues

Issue

Solution

"Ghost Blog Smart API not reachable"

Verify Docker container is running: docker ps

"Unauthorized access"

Check AUTHORIZED_USERS environment variable - add your GitHub username or leave empty for public

"API key mismatch"

Ensure COOKIE_ENCRYPTION_KEY matches Ghost Blog Smart

"Tools not appearing in Claude"

Restart Claude Desktop after configuration

"Timeout errors"

API has 5-minute default timeout, check network

Debug Commands

# Check development logs
npm run dev

# Production logs
wrangler tail

# Test Ghost Blog Smart API
curl http://localhost:5000/health

# Test authentication
open http://localhost:8792/authorize

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository

  2. Create a feature branch (git checkout -b feature/amazing)

  3. Commit your changes (git commit -m 'Add amazing feature')

  4. Push to the branch (git push origin feature/amazing)

  5. Open a Pull Request

πŸ“š Documentation

πŸ“„ License

MIT License - see LICENSE file for details

πŸ™ Acknowledgments

  • Anthropic for Model Context Protocol

  • Ghost for the amazing CMS platform

  • Cloudflare for Workers infrastructure

  • Google for Gemini AI and Imagen

  • Replicate for Flux image generation

πŸ“ž Support


Built with ❀️ by leowang.net

Transform your content creation workflow with AI-powered Ghost CMS management

Get Started β€’ Documentation β€’ Support

-
security - not tested
-
license - not tested
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/preangelleo/content-creation-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server