Cover image

Un servidor de protocolo de contexto modelo (MCP) para interactuar con Ghost CMS a través de interfaces LLM como Claude. Permitirle controlar su blog de fantasmas simplemente preguntando a Claude, etc.

3 years

Works with Finder

2

Github Watches

12

Github Forks

36

Github Stars

Ghost MCP Server

smithery badge

Ghost Server MCP server

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 JWT Authentication for Ghost Admin API requests
  • 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

Installation

Installing via Smithery

To install Ghost MCP Server for Claude Desktop automatically via Smithery:

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

Manual Installation

# 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

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:

{
  "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

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

Available Tools

Ghost MCP now provides a single unified tool that provides access to all Ghost CMS functionality:

Main Tool

  • ghost: Central tool for accessing all Ghost CMS functionality

Using the Ghost Tool

The ghost tool accepts two main parameters:

  1. action: The specific Ghost operation to perform
  2. params: A dictionary of parameters for the specified action

Example 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}}"
    }
})

Available Actions

The ghost tool supports all the same actions as before, but now through a unified interface:

Posts Actions

  • list_posts: List blog posts with pagination
  • search_posts_by_title: Search for posts by title
  • read_post: Retrieve full content of a specific post
  • create_post: Create a new post
  • update_post: Update a specific post
  • delete_post: Delete a specific post
  • batchly_update_posts: Update multiple posts in a single request

Tags Actions

  • browse_tags: List all tags
  • read_tag: Retrieve specific tag information
  • create_tag: Create a new tag
  • update_tag: Update an existing tag
  • delete_tag: Delete a specific tag

Users Actions

  • list_roles: List all available roles
  • create_invite: Create a new user invitation
  • list_users: List all users
  • read_user: Get details of a specific user
  • delete_user: Delete a specific user

Members Actions

  • list_members: List members
  • read_member: Retrieve specific member information
  • create_member: Create a new member
  • update_member: Update an existing member

Tiers Actions

  • list_tiers: List all membership tiers
  • read_tier: Retrieve specific tier information
  • create_tier: Create a new tier
  • update_tier: Update an existing tier

Offers Actions

  • list_offers: List promotional offers
  • read_offer: Get specific offer information
  • create_offer: Create a new offer
  • update_offer: Update an existing offer

Newsletters Actions

  • list_newsletters: List all newsletters
  • read_newsletter: Retrieve specific newsletter information
  • create_newsletter: Create a new newsletter
  • update_newsletter: Update an existing newsletter

Webhooks Actions

  • create_webhook: Create a new webhook
  • update_webhook: Update an existing webhook
  • delete_webhook: Delete a specific webhook

Available Resources

All resources follow the URI pattern: [type]://[id]

  • user://{user_id}: User profiles and roles
  • member://{member_id}: Member details and subscriptions
  • tier://{tier_id}: Tier configurations
  • offer://{offer_id}: Offer details
  • newsletter://{newsletter_id}: Newsletter settings
  • post://{post_id}: Post content and metadata
  • blog://info: General blog information

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

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • jae-jae
  • Servidor MCP para obtener contenido de la página web con el navegador sin cabeza de dramaturgo.

  • ravitemer
  • Un poderoso complemento Neovim para administrar servidores MCP (protocolo de contexto del modelo)

  • patruff
  • Puente entre los servidores Ollama y MCP, lo que permite a LLM locales utilizar herramientas de protocolo de contexto del modelo

  • pontusab
  • La comunidad de cursor y windsurf, encontrar reglas y MCP

  • av
  • Ejecute sin esfuerzo LLM Backends, API, frontends y servicios con un solo comando.

  • Mintplex-Labs
  • La aplicación AI de escritorio todo en uno y Docker con trapo incorporado, agentes de IA, creador de agentes sin código, compatibilidad de MCP y más.

  • chongdashu
  • Habilite clientes asistentes de IA como Cursor, Windsurf y Claude Desktop para controlar el motor irreal a través del lenguaje natural utilizando el Protocolo de contexto del modelo (MCP).

    Reviews

    5 (1)
    Avatar
    user_YxbnImSj
    2025-04-17

    As a loyal user of the ghost-mcp application, I am thoroughly impressed with its capabilities. Developed by MFYDev and available on GitHub, this tool has significantly streamlined my workflow. Its user-friendly interface and extensive functionality make it a valuable asset for any project. Highly recommend checking it out!