Ghost MCP Server for Cloudflare Workers
Provides tools for managing Ghost posts through the Ghost Admin API, including listing posts, retrieving editable content by ID or slug, creating drafts or published/scheduled posts from Markdown, updating posts with optimistic locking, and deleting posts after explicit confirmation.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Ghost MCP Server for Cloudflare Workers
A Cloudflare Workers-native Model Context Protocol server for securely managing posts in Ghost. It provides a small, post-only tool surface over the Ghost Admin API and is designed for remote MCP clients, Cloudflare MCP Portals, and Workers Builds.
The reference deployment manages Knowledge.Wine
Features
Runs natively on Cloudflare Workers using the Cloudflare Agents SDK.
Uses short-lived, five-minute Ghost Admin API JWTs generated per request.
Seals Worker-to-Ghost requests with a high-entropy
X-Seal-Probesecret header.Requires bearer authentication at the MCP endpoint.
Supports Cloudflare Access authentication in front of an MCP Portal.
Returns allowlisted post fields instead of raw Ghost Admin API responses.
Creates drafts by default and requires explicit confirmation to publish or schedule.
Uses Ghost's
updated_atvalue for optimistic locking.Requires explicit confirmation before permanent deletion.
Retrieves bounded writing samples so clients can match an existing publication's style.
The server deliberately excludes pages, members, newsletters, users, integrations, webhooks, themes, and arbitrary image uploads.
Related MCP server: Ghost MCP Server
Tools
Tool | Purpose |
| Browse drafts, scheduled posts, and published posts. |
| Read editable post content by Ghost post ID. |
| Read editable post content by URL slug. |
| Retrieve bounded samples of recently published writing. |
| Create a draft, scheduled, or published post from Markdown. |
| Update a post with optimistic locking. |
| Permanently delete a post after explicit confirmation. |
Architecture
MCP client
-> Cloudflare Access
-> Cloudflare MCP Portal
-> bearer-authenticated Cloudflare Worker /mcp
-> Ghost Admin APIThe reference deployment uses two independent authentication boundaries. Cloudflare
Access authenticates clients to the MCP Portal, while MCP_API_TOKEN authenticates
the Portal to the Worker upstream. Rotating the Worker bearer requires updating the
Portal upstream token; expired Access sessions require client reauthentication and
do not require changing the Worker secret.
AI Gateway is complementary but separate: it governs model inference traffic, not MCP tool traffic or Worker-to-Ghost requests.
Prerequisites
A Cloudflare account with Workers enabled
A Ghost site and a custom integration Admin API key
Node.js and npm
Create the Ghost key under Settings > Advanced > Integrations in Ghost Admin. Treat the key as a secret; it grants administrative access to posts.
Configuration
Install dependencies:
npm ciCustomize wrangler.jsonc for your deployment:
name: Worker nameroutes: custom domain or routeGHOST_ADMIN_API_URL: Ghost site originGHOST_API_VERSION: Ghost API version, such asv6.0MCP_ALLOWED_HOSTNAMES: comma-separated hostnames accepted by the MCP handler
Store credentials as encrypted Worker secrets:
npx wrangler secret put GHOST_ADMIN_API_KEY
npx wrangler secret put MCP_API_TOKEN
npx wrangler secret put X_SEAL_PROBE_TOKENThe Ghost key must use the id:secret value provided by a Ghost custom integration.
Use independent high-entropy values for MCP_API_TOKEN and X_SEAL_PROBE_TOKEN.
Origin seal
Do not identify trusted Worker traffic with a User-Agent rule. User-Agent strings are public and trivial to forge. Instead, generate an origin-seal token without placing its value in source code or shell history:
SEAL_PROBE_TOKEN="$(openssl rand -hex 32)"
printf '%s\n' "$SEAL_PROBE_TOKEN" | npx wrangler secret put X_SEAL_PROBE_TOKEN
printf '%s\n' "$SEAL_PROBE_TOKEN"If Bot Management is not challenging requests to the Ghost Admin API, no WAF rule change is required. The Worker can still send the seal header, but it grants no special treatment by itself.
If Bot Management is active on the Ghost zone, open Security > WAF > Custom rules and add the seal as a narrowly scoped exclusion inside the existing bot challenge rule. Replace the hostname and token in this example:
(cf.bot_management.score le 29 and
not cf.bot_management.verified_bot and
not (
http.host eq "www.example.com" and
starts_with(http.request.uri.path, "/ghost/api/admin/") and
any(http.request.headers["x-seal-probe"][*] eq "<replace-token-value-here>")
))Keep the rule's existing Challenge action. Requests are excluded only when the hostname, Ghost Admin API path, and secret header all match. Missing, incorrect, or out-of-scope seal values remain subject to the bot challenge. Do not create a broad Allow or Skip rule for the token; all other WAF, rate-limiting, and access controls should remain active. After saving the rule, clear the shell variable:
unset SEAL_PROBE_TOKENThe Worker secret and WAF rule must always contain the same value. During rotation, update the WAF rule and Worker secret as one coordinated change, then validate Ghost reads before removing the previous rule value.
For local development, copy .dev.vars.example to a gitignored .dev.vars file and
set all three values:
GHOST_ADMIN_API_KEY="id:secret"
MCP_API_TOKEN="replace-with-a-random-local-token"
X_SEAL_PROBE_TOKEN="replace-with-the-origin-seal-token"Start the development server:
npm run devThe MCP endpoint is /mcp and requires this header:
Authorization: Bearer <MCP_API_TOKEN>When using an Access-protected MCP Portal, configure this bearer value on the Portal's upstream server. Clients authenticate to Access at the Portal URL instead of receiving the Worker bearer token.
Deployment
Validate and deploy with Wrangler:
npm run type-check
npm run deployFor Cloudflare Workers Builds, connect the GitHub repository, choose main as
the production branch, and use npm run deploy as the deploy command. Configure
the three Worker secrets in Cloudflare; never add them to the repository.
Cloudflare Deploy Buttons can detect and prompt for the secrets declared in
.dev.vars.example, with descriptions supplied by package.json. They cannot safely
create the matching custom rule in a separately selected Ghost zone or generate a
token that must also be copied into that rule. The origin-seal rule therefore remains
an explicit deployment step rather than insecure hidden automation.
Commits to main deploy to production through Workers Builds. Other branches use
npx wrangler preview to create isolated Preview URLs for validation before merge.
The checked-in preview configuration intentionally uses a non-routable Ghost origin
and no production secrets, so previews validate bundling and Worker startup only.
Before every major GitHub update, follow the Knowledge.Wine validation gate in
PROJECT_PLAN.md.
Origin
This implementation is a Cloudflare Workers-native refactor inspired by the narrow
post-management scope of
nautis/ghost-mcp-server. Its
transport and deployment architecture were rewritten for Workers, with the tool
surface deliberately limited to the documented Ghost post CRUD operations. It is
not a GitHub fork and does not share the original Node.js stdio transport.
License
Licensed under the MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Create, edit, organize, publish, and configure JustBlogged blogs from MCP clients.
Read posts, members and tiers; create draft posts and edit post text in Ghost.
Ghost MCP server for ChatGPT, Claude and any AI agent: list posts, create draft post, schedule post, send newsletter, list members and label members in your own Ghost account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Ghost yourself; Cotlet does not store your password and you need no Ghost API key. About the official Ghost API: Ghost has a full REST Admin API, but no official MCP server (checked 17 Oct 2026). The Admin API covers posts, pages, members, labels, newsletters, tiers and offers, and Ghost says everything Ghost Admin can do is also possible with the API. Setup and FAQ: https://cotlet.dev/integrations/ghost-api-mcp-server
Hosted remote MCP for protected account access, permissions, activity history and supported undo.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables management of Ghost blog content (posts, pages, and tags) through the Ghost Admin API with SSE transport support.-
- AlicenseNot gradedqualityNot gradedmaintenanceEnables interaction with Ghost CMS through the Ghost Admin API via LLM interfaces. It provides comprehensive tools for managing posts, members, newsletters, and other site entities through secure JWT authentication.-
- AlicenseNot gradedqualityDmaintenanceMCP server for Ghost CMS that lets Claude manage posts, pages, members, tags, and newsletters via the Ghost Admin API.ISC
- AlicenseDqualityCmaintenanceMCP server that enables AI assistants to manage Ghost CMS posts, members, tags, tiers, and more, with support for remote hosting on Azure Functions and Entra ID authentication.42MIT