### Install and Run Ghost CMS MCP Server (Bash) Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Instructions for installing and running the Ghost CMS MCP server using uvx or pip. Includes examples for direct execution, CLI usage with credentials, and setting access levels via presets or specific tool groups. ```bash # Run directly with uvx (recommended) uvx ghost-cms-mcp # Or install with pip pip install ghost-cms-mcp # Run via CLI with credentials ghost-cms-mcp --url https://your-blog.com --key "your-id:your-secret" # Use a preset for limited access ghost-cms-mcp --url https://your-blog.com --key "id:secret" --preset readonly # Enable only specific tool groups ghost-cms-mcp --url https://your-blog.com --key "id:secret" --tools posts,tags ``` -------------------------------- ### Install ghost-cms-mcp using uvx or pip Source: https://github.com/matveev-pavel/ghost-mcp/blob/main/README.md Instructions for installing the ghost-cms-mcp package. It can be installed globally using the `uvx` command or via pip for project-specific installations. ```bash uvx ghost-cms-mcp ``` ```bash pip install ghost-cms-mcp ``` -------------------------------- ### Development setup for ghost-mcp Source: https://github.com/matveev-pavel/ghost-mcp/blob/main/README.md Instructions for setting up the development environment for the ghost-mcp project. This involves cloning the repository, navigating into the directory, synchronizing development dependencies with `uv sync --dev`, and running tests with `uv run pytest`. ```bash git clone https://github.com/matveev-pavel/ghost-mcp.git cd ghost-mcp uv sync --dev uv run pytest ``` -------------------------------- ### Configure ghost-cms-mcp tool selection using presets via JSON Source: https://github.com/matveev-pavel/ghost-mcp/blob/main/README.md Shows how to configure tool presets for the Ghost CMS MCP server using a JSON configuration file. This example sets the preset to 'writer', enabling posts, tags, and images tools. Environment variables like `GHOST_PRESET` can control this. ```json { "mcpServers": { "ghost": { "command": "uvx", "args": ["ghost-cms-mcp"], "env": { "GHOST_URL": "https://your-blog.com", "GHOST_ADMIN_KEY": "your-id:your-secret", "GHOST_PRESET": "writer" } } } } ``` -------------------------------- ### Get Ghost Page by ID or Slug Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Retrieves a single Ghost page's details and full HTML content using either its unique ID or its slug. This is useful for displaying page content dynamically. ```python # Get by ID await ghost_get_page(id="6478a1b2c3d4e5f6g7h8i9j0") # Get by slug await ghost_get_page(slug="about") ``` -------------------------------- ### GhostClient API for Direct Ghost Admin Access Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Provides direct access to the Ghost Admin API using JWT authentication. Supports various HTTP methods (GET, POST, PUT, DELETE) for managing content programmatically. Includes error handling for API requests. ```python from ghost_mcp.client import GhostClient, GhostAPIError # Initialize client client = GhostClient( url="https://your-blog.com", admin_key="your-key-id:your-key-secret" ) # Make API requests try: # GET request posts = await client.get("posts/", params={"limit": 10, "include": "tags"}) # POST request result = await client.post("posts/?source=html", data={ "posts": [{ "title": "New Post", "html": "
Content
", "status": "draft" }] }) # PUT request updated = await client.put("posts/abc123/", data={ "posts": [{"title": "Updated Title", "updated_at": "2024-01-15T10:00:00.000Z"}] }) # DELETE request await client.delete("posts/abc123/") except GhostAPIError as e: print(f"API Error {e.status_code}: {e.message}") finally: await client.close() ``` -------------------------------- ### Get Single Ghost Post (Python) Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Python function to retrieve a single Ghost post by its ID or slug. Returns comprehensive post data including HTML content, tags, authors, SEO metadata, and URLs. ```python # Get by ID await ghost_get_post(id="6478a1b2c3d4e5f6g7h8i9j0") # Returns: # Title: Getting Started with Ghost # ID: 6478a1b2c3d4e5f6g7h8i9j0 # Slug: getting-started # Status: published # Tags: tutorials, beginner # Authors: John Doe # Excerpt: Learn how to set up your Ghost blog # URL: https://your-blog.com/getting-started/ # Published: 2024-01-15T10:00:00.000Z # Updated: 2024-01-16T14:30:00.000Z # # HTML content: #Welcome to Ghost...
# Get by slug await ghost_get_post(slug="getting-started") ``` -------------------------------- ### Configure ghost-cms-mcp tool selection using presets via CLI Source: https://github.com/matveev-pavel/ghost-mcp/blob/main/README.md Demonstrates how to select tool presets for the Ghost CMS MCP server using the command-line interface. The `--preset` argument allows users to choose predefined sets of tools, such as 'readonly' for read-only operations. ```bash ghost-cms-mcp --url https://your-blog.com --key "id:secret" --preset readonly ``` -------------------------------- ### CLI configuration for ghost-cms-mcp Source: https://github.com/matveev-pavel/ghost-mcp/blob/main/README.md Demonstrates the command-line interface (CLI) method for configuring the Ghost CMS MCP server. It shows how to provide the Ghost URL and Admin API Key directly as arguments. Environment variables take precedence over CLI arguments. ```bash ghost-cms-mcp --url https://your-blog.com --key "your-id:your-secret" ``` -------------------------------- ### Configure ghost-cms-mcp manual tool selection via JSON Source: https://github.com/matveev-pavel/ghost-mcp/blob/main/README.md Illustrates manual selection of tools for the Ghost CMS MCP server using a JSON configuration. The `GHOST_TOOLS` environment variable allows specifying exactly which tool groups (e.g., 'posts', 'tags') should be enabled. ```json { "env": { "GHOST_URL": "https://your-blog.com", "GHOST_ADMIN_KEY": "your-id:your-secret", "GHOST_TOOLS": "posts,tags" } } ``` -------------------------------- ### Server Configuration API for MCP Server Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Enables programmatic creation and configuration of the MCP server. Allows selection of tools and presets for defining server functionality and access levels (read-write or read-only). ```python from ghost_mcp.server import create_server, resolve_config, PRESETS # Resolve configuration from tools list or preset tools, readonly = resolve_config(tools="posts,tags") # Manual selection tools, readonly = resolve_config(preset="writer") # Preset: posts, tags, images tools, readonly = resolve_config(preset="readonly") # All tools, read-only mode # Available presets: # - "all": All tools (posts, pages, tags, images), read-write # - "writer": posts, tags, images - read-write # - "content": posts, pages, tags, images - read-write # - "readonly": All tools, read-only (no create/update/delete) # Create server with specific configuration mcp = create_server( url="https://your-blog.com", admin_key="id:secret", tools={"posts", "tags"}, # Only enable posts and tags readonly=False ) # Run the server mcp.run() ``` -------------------------------- ### Configure ghost-cms-mcp manual tool selection via CLI Source: https://github.com/matveev-pavel/ghost-mcp/blob/main/README.md Shows how to manually select tool groups for the Ghost CMS MCP server using the command-line interface. The `--tools` argument enables specific tool groups like 'posts' and 'tags'. This setting takes priority over presets. ```bash ghost-cms-mcp --url https://your-blog.com --key "id:secret" --tools posts,tags ``` -------------------------------- ### ghost_create_page Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Create a new Ghost page from Markdown content with optional SEO metadata. ```APIDOC ## ghost_create_page ### Description Create a new Ghost page from Markdown content with optional SEO metadata. ### Method POST ### Endpoint `/ghost/api/v3/admin/pages/` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **title** (string) - Required - The title of the page. - **markdown_content** (string) - Required - The content of the page in Markdown format. - **status** (string) - Optional - The status of the page ('published' or 'draft'). Defaults to 'draft'. - **tags** (array of strings) - Optional - A list of tag slugs or IDs to associate with the page. - **slug** (string) - Optional - A custom slug for the page. If not provided, it will be generated from the title. - **meta_title** (string) - Optional - The SEO title for the page. - **meta_description** (string) - Optional - The SEO meta description for the page. ### Request Example ```json { "title": "About Us", "markdown_content": "# About Our Company\n\nWe are a team of passionate developers building amazing products.", "status": "published", "slug": "about-us" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the newly created page. - **title** (string) - The title of the created page. - **slug** (string) - The slug of the created page. - **status** (string) - The status of the created page. #### Response Example ```json { "id": "6478a1b2c3d4e5f6g7h8i9j0", "title": "About Us", "slug": "about-us", "status": "published" } ``` ``` -------------------------------- ### Configure ghost-cms-mcp for Claude Code Source: https://github.com/matveev-pavel/ghost-mcp/blob/main/README.md Demonstrates how to add the Ghost CMS MCP server configuration for Claude Code. This involves setting environment variables for the Ghost URL and Admin API Key, and specifying the command to run the MCP server. ```bash claude mcp add ghost \ -e GHOST_URL=https://your-blog.com \ -e GHOST_ADMIN_KEY=your-id:your-secret \ -- uvx ghost-cms-mcp ``` -------------------------------- ### ghost_create_tag Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Create a new tag for organizing content. ```APIDOC ## ghost_create_tag ### Description Create a new tag for organizing content. ### Method POST ### Endpoint `/ghost/api/v3/admin/tags/` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **name** (string) - Required - The name of the tag. - **description** (string) - Optional - A description for the tag. - **slug** (string) - Optional - A custom slug for the tag. If not provided, it will be generated from the name. ### Request Example ```json { "name": "Python", "slug": "python-programming" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the newly created tag. - **name** (string) - The name of the created tag. - **slug** (string) - The slug of the created tag. - **description** (string) - The description of the created tag. #### Response Example ```json { "id": "6478a1b2c3d4e5f6g7h8i9j0", "name": "Python", "slug": "python-programming", "description": "Articles related to Python programming." } ``` ``` -------------------------------- ### Retrieve Ghost Site Metadata Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Fetches essential metadata about the Ghost site, such as its title, description, URL, and version. This function is useful for understanding the context of the Ghost instance. ```python await ghost_site_info() # Returns: # Title: My Awesome Blog # Description: A blog about technology and programming # URL: https://your-blog.com # Ghost version: 5.75.0 # Locale: en ``` -------------------------------- ### Create Ghost Page Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Creates a new Ghost page using Markdown content. Supports basic creation or advanced configuration with tags, slugs, and SEO metadata. ```python # Create a basic page await ghost_create_page( title="About Us", markdown_content=""" # About Our Company We are a team of passionate developers building amazing products. ## Our Mission To make technology accessible to everyone. """, status="published" ) # Create page with full SEO configuration await ghost_create_page( title="Contact", markdown_content="Get in touch with us...", status="published", tags=["contact", "support"], slug="contact", meta_title="Contact Us - Your Company", meta_description="Reach out to our team for support, inquiries, or partnerships." ) ``` -------------------------------- ### Configure Claude Code CLI for Ghost CMS (Bash) Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Command-line configuration for Claude Code to add the Ghost CMS MCP server. Uses environment variables for authentication and specifies the server execution command. ```bash # Claude Code CLI configuration claude mcp add ghost \ -e GHOST_URL=https://your-blog.com \ -e GHOST_ADMIN_KEY=your-id:your-secret \ -- uvx ghost-cms-mcp ``` -------------------------------- ### Configure ghost-cms-mcp using .mcp.json for Claude Code Source: https://github.com/matveev-pavel/ghost-mcp/blob/main/README.md Provides the JSON configuration for `.mcp.json` to set up the Ghost CMS MCP server for Claude Code. This method allows for persistent configuration within a project, specifying the command, arguments, and environment variables. ```json { "mcpServers": { "ghost": { "command": "uvx", "args": ["ghost-cms-mcp"], "env": { "GHOST_URL": "https://your-blog.com", "GHOST_ADMIN_KEY": "your-id:your-secret" } } } } ``` -------------------------------- ### ghost_list_pages Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt List Ghost pages with optional status filtering and pagination. Pages are static content separate from blog posts. ```APIDOC ## ghost_list_pages ### Description List Ghost pages with optional status filtering and pagination. Pages are static content separate from blog posts. ### Method GET ### Endpoint `/ghost/api/v3/admin/pages` ### Parameters #### Path Parameters None #### Query Parameters - **status** (string) - Optional - Filter pages by status. Valid values: 'all', 'published', 'draft'. Defaults to 'all'. - **limit** (integer) - Optional - The maximum number of pages to return per request. Defaults to 15. - **page** (integer) - Optional - The page number to retrieve. Defaults to 1. #### Request Body None ### Request Example ```bash GET /ghost/api/v3/admin/pages?status=published&limit=10&page=1 ``` ### Response #### Success Response (200) - **pages** (array) - An array of page objects. - **id** (string) - The unique identifier of the page. - **title** (string) - The title of the page. - **slug** (string) - The slug of the page. - **status** (string) - The status of the page ('published' or 'draft'). - **meta** (object) - Pagination metadata. - **pagination** (object) - **page** (integer) - Current page number. - **limit** (integer) - Number of items per page. - **total** (integer) - Total number of pages. - **pages** (integer) - Total number of pages available. #### Response Example ```json { "pages": [ { "id": "6478a1b2c3d4e5f6g7h8i9j0", "title": "About Us", "slug": "about", "status": "published" }, { "id": "6478b1b2c3d4e5f6g7h8i9j1", "title": "Contact", "slug": "contact", "status": "published" } ], "meta": { "pagination": { "page": 1, "limit": 10, "total": 5, "pages": 1 } } } ``` ``` -------------------------------- ### List Ghost Pages Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Retrieves a list of all Ghost pages, with options to filter by status (all, published, draft) and control pagination (limit, page). Useful for managing static content. ```python # List all pages await ghost_list_pages() # Filter by status with pagination await ghost_list_pages(status="published", limit=10, page=1) ``` -------------------------------- ### ghost_get_page Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Retrieve a single page by ID or slug with full HTML content. ```APIDOC ## ghost_get_page ### Description Retrieve a single page by ID or slug with full HTML content. ### Method GET ### Endpoint `/ghost/api/v3/admin/pages/{id}` or `/ghost/api/v3/admin/pages/slug/{slug}` ### Parameters #### Path Parameters - **id** (string) - Required (if slug is not provided) - The unique identifier of the page. - **slug** (string) - Required (if id is not provided) - The slug of the page. #### Query Parameters None #### Request Body None ### Request Example ```bash GET /ghost/api/v3/admin/pages/6478a1b2c3d4e5f6g7h8i9j0 ``` ### Response #### Success Response (200) - **title** (string) - The title of the page. - **id** (string) - The unique identifier of the page. - **slug** (string) - The slug of the page. - **status** (string) - The status of the page ('published' or 'draft'). - **url** (string) - The URL of the page. - **html** (string) - The full HTML content of the page. #### Response Example ```json { "title": "About Us", "id": "6478a1b2c3d4e5f6g7h8i9j0", "slug": "about", "status": "published", "url": "https://your-blog.com/about/", "html": "Welcome to our company...
" } ``` ``` -------------------------------- ### ghost_list_tags Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt List all tags in the Ghost site with post counts. ```APIDOC ## ghost_list_tags ### Description List all tags in the Ghost site with post counts. ### Method GET ### Endpoint `/ghost/api/v3/admin/tags` ### Parameters #### Path Parameters None #### Query Parameters - **limit** (integer) - Optional - The maximum number of tags to return. Defaults to 15. - **page** (integer) - Optional - The page number to retrieve. Defaults to 1. #### Request Body None ### Request Example ```bash GET /ghost/api/v3/admin/tags?limit=50 ``` ### Response #### Success Response (200) - **tags** (array) - An array of tag objects. - **id** (string) - The unique identifier of the tag. - **name** (string) - The name of the tag. - **slug** (string) - The slug of the tag. - **description** (string) - The description of the tag (if provided). - **post_count** (integer) - The number of posts associated with this tag. - **meta** (object) - Pagination metadata. - **pagination** (object) - **page** (integer) - Current page number. - **limit** (integer) - Number of items per page. - **total** (integer) - Total number of tags. - **pages** (integer) - Total number of pages available. #### Response Example ```json { "tags": [ { "id": "6478a1b2c3d4e5f6g7h8i9j0", "name": "tutorials", "slug": "tutorials", "description": null, "post_count": 15 }, { "id": "6478b1b2c3d4e5f6g7h8i9j1", "name": "news", "slug": "news", "description": null, "post_count": 8 } ], "meta": { "pagination": { "page": 1, "limit": 50, "total": 12, "pages": 1 } } } ``` ``` -------------------------------- ### List Ghost Posts (Python) Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Python function to list Ghost posts. Supports filtering by status (all, published, draft, scheduled) and tag, with pagination options (limit, page). Returns paginated results with post metadata. ```python # List all posts (default) await ghost_list_posts() # Returns: # Found posts: 25 (page 1/2) # - [published] Getting Started with Ghost # ID: 6478a... | Slug: getting-started # Tags: tutorials, beginner # Published: 2024-01-15T10:00:00.000Z # Filter by status await ghost_list_posts(status="draft") # Filter by tag with pagination await ghost_list_posts(status="published", tag="tutorials", limit=10, page=2) # Valid statuses: all, published, draft, scheduled ``` -------------------------------- ### Create Ghost Tag Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Creates a new tag for organizing content within Ghost. Can be created with just a name, or with a description and a custom slug for URL control. ```python # Create a basic tag await ghost_create_tag(name="Python") # Create tag with description and custom slug await ghost_create_tag( name="Machine Learning", description="Articles about ML, AI, and data science", slug="ml" ) ``` -------------------------------- ### ghost_publish_post Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Publish a draft post, making it publicly visible on your Ghost site. ```APIDOC ## ghost_publish_post ### Description Publish a draft post, making it publicly visible on your Ghost site. ### Method PUT ### Endpoint `/ghost/api/v3/admin/posts/{id}/publish` ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the post to publish. #### Query Parameters None #### Request Body None ### Request Example ```bash PUT /ghost/api/v3/admin/posts/6478a1b2c3d4e5f6g7h8i9j0/publish ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the post was published. - **id** (string) - The ID of the published post. - **url** (string) - The URL of the published post. #### Response Example ```json { "message": "Post published!", "id": "6478a1b2c3d4e5f6g7h8i9j0", "url": "https://your-blog.com/my-new-article/" } ``` ``` -------------------------------- ### Create Ghost Post from Markdown (Python) Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Python function to create a new Ghost post using Markdown content. Supports setting title, status, tags, excerpt, slug, SEO metadata, and featured image URL. Automatically converts Markdown to HTML. ```python # Create a basic draft post await ghost_create_post( title="My New Article", markdown_content=""" # Introduction This is my new article written in **Markdown**. ## Features - Automatic HTML conversion - Code syntax highlighting - Tables support ```python print("Hello, Ghost!") ``` """, status="draft" ) # Returns: # Post created! # ID: 6478a1b2c3d4e5f6g7h8i9j0 # Slug: my-new-article # Status: draft # URL: n/a # Create a fully-configured published post await ghost_create_post( title="Complete SEO Guide", markdown_content="Your comprehensive guide to SEO...", status="published", tags=["seo", "marketing", "guides"], excerpt="Learn everything about SEO in this guide", slug="complete-seo-guide", meta_title="Complete SEO Guide 2024 - Your Blog", meta_description="Master SEO with our comprehensive guide covering keywords, backlinks, and technical optimization.", featured_image_url="https://your-blog.com/content/images/seo-guide.jpg" ) ``` -------------------------------- ### Upload Image to Ghost Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Uploads an image file to the Ghost media library, returning the URL of the uploaded image. Supports common image formats and has a file size limit. ```python await ghost_upload_image(file_path="/path/to/image.jpg") ``` -------------------------------- ### List Ghost Tags Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Retrieves a list of all tags present on the Ghost site, including the number of posts associated with each tag. Supports limiting the number of returned tags. ```python await ghost_list_tags(limit=50) ``` -------------------------------- ### ghost_upload_image Source: https://context7.com/matveev-pavel/ghost-mcp/llms.txt Upload an image file to Ghost and receive its URL for use in posts and pages. Supports JPG, PNG, GIF, WebP, SVG, and ICO formats up to 10MB. ```APIDOC ## ghost_upload_image ### Description Upload an image file to Ghost and receive its URL for use in posts and pages. Supports JPG, PNG, GIF, WebP, SVG, and ICO formats up to 10MB. ### Method POST ### Endpoint `/ghost/api/v3/admin/images/upload/` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **file** (file) - Required - The image file to upload. ### Request Example ```bash POST /ghost/api/v3/admin/images/upload/ Content-Type: multipart/form-data --boundary Content-Disposition: form-data; name="file"; filename="image.jpg" Content-Type: image/jpeg