feat: pages CRUD, images upload, browse summaries, posts_meta, and Node v26 fix#22
Open
DevlinLiles wants to merge 9 commits into
Open
feat: pages CRUD, images upload, browse summaries, posts_meta, and Node v26 fix#22DevlinLiles wants to merge 9 commits into
DevlinLiles wants to merge 9 commits into
Conversation
Adds pages_browse, pages_read, pages_add, pages_edit, pages_delete mirroring the posts tool set, plus images_upload for uploading local image files to Ghost.
Installs prerequisites (Homebrew, Node.js), builds from source, collects Ghost credentials interactively, and registers the MCP server in ~/.claude.json. Preserves all existing Claude Code config on upsert; idempotent on re-run.
All *_browse tools now return lightweight summary projections instead of full objects, reducing token usage when listing. Added descriptive strings to each tool registration so the model knows what fields to expect and when to use *_read for full detail. Summaries extracted into src/utils/summaries.ts.
Replace manual ~/.claude.json editing with the official Claude Code CLI (claude mcp add --scope user). Removes any existing ghost-mcp entry first so re-runs are idempotent, and adds a check that the claude CLI is present before attempting registration.
…tall Remove ghost-mcp from ~/Library/Application Support/Claude/claude_desktop_config.json if present, so stale entries (e.g. pointing at @tryghost/mcp-server) don't conflict. Also sweep all three claude mcp scopes (user/local/project) before re-registering to ensure a clean slate on any machine.
Installer now upserts the ghost-mcp entry into claude_desktop_config.json instead of only removing it. Uses the absolute path to the node binary so Claude Desktop (which launches with a minimal env) can resolve the executable without relying on PATH.
…rash The buffer-equal-constant-time transitive dep (via admin-api → jsonwebtoken → jwa) references Buffer.SlowBuffer, which Node.js v26 removed, causing an immediate crash on require. Replace with a custom GhostAdminClient that signs JWTs using Node's built-in crypto.createHmac (HS256) and makes REST calls via axios. Removes @tryghost/ admin-api and the stale @types/axios shim entirely — no new dependencies added.
Adds a posts_meta tool that returns full metadata for a post by id without
body content — includes uuid, computed preview_url (/p/{uuid}/), live url,
full tags and authors via include=, and all SEO/OG/Twitter fields. Also
adds uuid to POST_READ_FIELDS and PAGE_READ_FIELDS so posts_read returns it,
and introduces the respond.ts utility module used across all tool handlers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
posts_metatool that returns full post metadata by id:uuid,url,preview_url(draft preview at/p/{uuid}/), fulltagsandauthorsviainclude=, and all SEO/OG/Twitter fields — without returning body contentuuidtoPOST_READ_FIELDSandPAGE_READ_FIELDSsoposts_read/pages_readreturn it@tryghost/admin-apiwith a custom Axios-based client to fix a crash on Node v26 (the upstream package usesnode-fetchinternals incompatible with v26)respond.tsutilities (textResult,browseEnvelope,toConfirmation,pickFields) to eliminate duplication across all tool handlersinstall.sh) that wires the MCP server into Claude Desktop config automaticallyTest plan
posts_metareturnsuuid,url,preview_url,tags, andauthorsfor a draft and a published postpages_browse,pages_read,pages_add,pages_edit,pages_deletework end-to-endimages_uploadreturns a usable Ghost URL that can be set asfeature_image@tryghost/admin-api)