MCP Server Developer Documentation

RaveCMS MCP Integration

Welcome to the internal documentation for the Model Context Protocol (MCP) server for RaveCMS!

This service provides an MCP server that allows AI assistants (such as Claude, Cursor, and Gemini) to interact securely with your Ghost CMS instance using standard JSON-RPC over stdio.


🚀 Setup & Configuration

To use the RaveCMS MCP server, it requires environment variables to connect to an existing Ghost Admin API.

  1. Prepare the configuration:

    Copy the template environment file:

    cp .env.example .env
    
  2. Required Environment Variables:

    Make sure your .env contains the correct values for:

    • GHOST_API_URL: The URL of your Ghost CMS instance (e.g., http://localhost:3000).
    • GHOST_ADMIN_API_KEY: Your Ghost Admin API key.

🛠️ Supported MCP Tools

The ghost-mcp server currently exposes the following tools to the LLM Client. They map directly to standard Ghost Admin API capabilities:

Posts

  • list_posts: List all posts from Ghost CMS.
    • Parameters: limit (integer), offset (integer), status (string: published, draft, scheduled).
  • get_post: Get a single post by ID or Slug.
    • Parameters: id (string) OR slug (string).
  • create_post: Create a new post.
    • Required Parameters: title (string).
    • Optional Parameters: html (string), status (string), featured (boolean), feature_image (string).
  • update_post: Update an existing post.
    • Required Parameters: id (string).
    • Optional Parameters: title (string), html (string), status (string), featured (boolean), feature_image (string).
  • delete_post: Delete a post.
    • Required Parameters: id (string).

Pages

  • list_pages: List all pages from Ghost CMS.
    • Parameters: limit (integer), offset (integer), status (string).
  • get_page: Get a single page by ID or Slug.
    • Parameters: id (string) OR slug (string).
  • create_page: Create a new page.
    • Required Parameters: title (string).
    • Optional Parameters: html (string), status (string).
  • update_page: Update an existing page.
    • Required Parameters: id (string).
    • Optional Parameters: title (string), html (string), status (string).
  • delete_page: Delete a page.
    • Required Parameters: id (string).

🏃 Testing & Running

The server operates using standard I/O streams (stdio) and accepts JSON-RPC 2.0 requests.

To manually test the MCP server, you can pipe a mocked JSON-RPC initialization and a tool_call directly into the binary:

cd ghost-mcp

# Test listing posts
printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1"}}}\n{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_posts","arguments":{"limit":1}}}\n' | ../target/debug/ghost-mcp

# Test listing pages
printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1"}}}\n{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_pages","arguments":{"limit":1}}}\n' | ../target/debug/ghost-mcp