Ghost MCP

Ein MCP-Server für die Ghost-Blogging-Plattform mit Server-Sent-Events (SSE)-Unterstützung.

Dokumentation

Ghost MCP Server

MCP (Model Context Protocol) server for Ghost CMS blog integration. Enables AI agents and LLMs to manage Ghost blog content through standardized MCP tools.

Directory Structure

.
├── index.js              # Main entry point
├── core/                 # Core server functionality
│   ├── server.js         # GhostServer class with API communication
│   └── api-client.js     # Shared Ghost API utilities and JWT auth
├── tools/                # MCP tool implementations
│   ├── index.js          # Tool registry and handlers
│   ├── ghost-tools.js    # Tool exports and definitions
│   ├── create-ghost-post.js
│   ├── list-ghost-posts.js
│   ├── update-ghost-post.js
│   ├── delete-ghost-post.js
│   ├── create-ghost-page.js
│   ├── list-ghost-pages.js
│   ├── update-ghost-page.js
│   ├── delete-ghost-page.js
│   ├── create-ghost-tag.js
│   └── update-ghost-tag.js
├── transports/           # Server transport implementations
│   ├── index.js          # Transport exports
│   ├── stdio-transport.js
│   ├── sse-transport.js
│   └── http-transport.js # Streamable HTTP (default)
└── __tests__/            # Test files

Available Tools

ToolDescription
create_ghost_postCreate a new blog post
list_ghost_postsList posts with pagination
update_ghost_postUpdate an existing post
delete_ghost_postDelete a post
create_ghost_pageCreate a new page
list_ghost_pagesList pages with pagination
update_ghost_pageUpdate an existing page
delete_ghost_pageDelete a page
create_ghost_tagCreate a new tag
update_ghost_tagUpdate an existing tag

Environment Variables

VariableDescriptionRequired
GHOST_API_URLGhost instance URLYes
GHOST_ADMIN_KEYAdmin API key (format: id:secret)Yes
PORTServer port (default: 3064)No
NODE_ENVEnvironment modeNo

Running the Server

# HTTP transport (default, for production)
npm start

# SSE transport
npm run start:sse

# Stdio transport (for CLI integration)
npm run start:stdio

# Development
npm run dev

# Run tests
npm test

Docker

# Build image
docker build -t ghost-mcp .

# Run container
docker run -p 3064:3064 \
  -e GHOST_API_URL=https://your-ghost-blog.com \
  -e GHOST_ADMIN_KEY=your-key-id:your-key-secret \
  ghost-mcp

API Endpoints

  • POST /mcp - MCP request endpoint
  • GET /mcp - SSE streaming endpoint
  • DELETE /mcp - Session termination
  • GET /health - Health check

License

MIT