ghost-content-mcp

ghost-content-mcp

Read-only MCP server for Ghost sites that enables AI assistants to search, summarize, and read content via hybrid lexical and semantic ranking.

Category
访问服务器

README

ghost-content-mcp

A read-only MCP server that turns any Ghost site into a semantic content-discovery source for AI assistants.

Point it at a Ghost site (URL + Content API key) and it exposes tools an LLM can call to search, summarize, and read that site's posts, pages, and tags — ranked by a hybrid of lexical (BM25) and local semantic embeddings. It's designed to power visitor-facing chatbots and RAG, not to manage the blog.

How this differs from other Ghost MCP servers. Most existing ones wrap the Admin API for content management (create/edit/delete posts, members, newsletters) — tools for the site owner. This one is the opposite: public, read-only, retrieval-focused. Its job is to answer "what does this site say about X?" well.

Features

  • 🔎 Hybrid search — Okapi BM25 (lexical) + all-MiniLM-L6-v2 embeddings (semantic), so natural-language questions match even without shared keywords. Runs fully locally (model bundled in the image, no external inference calls).
  • 🧭 9 tools — search_all, search_posts, get_related_posts, get_site_summary, get_post, get_page, list_posts, list_pages, list_tags.
  • ⚙️ Zero-config identity — auto-detects the site's name/description/URL from Ghost's own /settings endpoint (override with env vars if you want).
  • 🔄 Self-updating — in-memory index with a ~10-min TTL refresh; new content appears automatically. Optional internal POST /refresh for webhook-driven instant updates.
  • 🐙 Optional GitHub companions — if a post links a repo you own, its README can be indexed and surfaced next to the article (off by default).
  • 🙈 #noindex — tag any post/page #noindex to keep it out of discovery search (still fetchable by direct slug).

Quick start

cp .env.example .env      # set GHOST_URL + GHOST_CONTENT_API_KEY
npm install
npm run build
npm start

Or with Docker:

docker build -t ghost-content-mcp .
docker run -p 3000:3000 --env-file .env ghost-content-mcp

Or with Docker Compose (see docker-compose.yml — includes a memory cap and healthcheck):

cp .env.example .env      # set GHOST_URL + GHOST_CONTENT_API_KEY
docker compose up -d

The MCP endpoint is POST /mcp (Streamable HTTP, stateless JSON). GET /health reports index status.

Getting a Ghost Content API key

Ghost Admin → Settings → Integrations → Add custom integration → copy the Content API key. (Content keys are read-only and safe to use for a public endpoint.)

Connecting a client

Any MCP client that speaks Streamable HTTP. Example (Claude Desktop-style config):

{
  "mcpServers": {
    "ghost-content": { "url": "https://your-host/mcp" }
  }
}

Configuration

Env var Required Default Notes
GHOST_URL ✅ http://localhost:2368 Your Ghost site URL
GHOST_CONTENT_API_KEY ✅ — Content API key (read-only)
PORT 3000 HTTP port
SITE_NAME / SITE_URL / SITE_DESCRIPTION from Ghost /settings Identity overrides
GITHUB_COMPANION_OWNERS — (off) Comma-separated owner allowlist to enable repo companions
GITHUB_TOKEN — Raises GitHub API rate limits
INDEX_TTL_MS 600000 Auto-refresh interval
REFRESH_TOKEN — If set, POST /refresh requires header x-refresh-token
EMBEDDINGS_MODEL Xenova/all-MiniLM-L6-v2 Sentence-embedding model
EMBEDDINGS_BATCH_SIZE 8 Lower = lower peak RAM during index build

Tools

Tool Purpose
search_all Search posts + pages (+ repos) by keyword/question, ranked by relevance. Start here.
search_posts Same ranking, posts only.
get_related_posts "More like this" for a given post slug.
get_site_summary One-call overview: what the site is, topics, counts, recent posts, pages.
get_post / get_page Full content as Markdown by slug.
list_posts / list_pages Paginated listings (filter by tag/date, sort).
list_tags All public tags with post counts.

Relevance is 0.5·BM25 + 0.5·cosine(embeddings), range 0–1. As a rule of thumb: ≥0.5 is a strong match, 0.3–0.5 weak, <0.3 noise.

How updates work

The index rebuilds automatically every ~10 minutes (TTL); publishing in Ghost is enough. For instant updates, wire a Ghost "post published/updated" webhook to the internal POST /refresh (optionally guarded by REFRESH_TOKEN).

Notes

  • Requires glibc (Node node:22-slim, not Alpine) — onnxruntime-node's native binding doesn't load on musl.
  • The embedding model (~90 MB) is downloaded at image build time and bundled, so there are no network calls at runtime.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选