cms-mcp
Enables Claude to manage Directus content through auto-generated REST tools for configured collections, including list, get, create, update, and delete operations with schema discovery, filtering, pagination, previews, and approval-gated writes.
Adds GitHub plugin tools to scan repositories, list repos, and sync repository content into CMS projects, using a GitHub token.
Enables Claude to manage Payload CMS collections through auto-generated REST tools for configured endpoints, including list, get, create, update, and delete operations with schema-aware parameters, filtering, pagination, previews, and approval-gated writes.
Enables Claude to manage PocketBase records through auto-generated REST tools for configured collections, including list, get, create, update, and delete operations with schema discovery, filtering, pagination, previews, and approval-gated writes.
Enables Claude to manage Strapi content types through auto-generated REST tools for configured endpoints, including list, get, create, update, and delete operations with schema-aware parameters, filtering, pagination, previews, and approval-gated writes.
Enables Claude to manage Supabase data through auto-generated REST tools for configured tables/endpoints, including list, get, create, update, and delete operations with schema discovery, filtering, pagination, previews, and approval-gated writes.
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.
Quick Start · Tools · Advanced · Security · Docs
What it looks like
You: "Scan my latest GitHub repo and publish it as a portfolio project"
Claude: Done — scanned, policy-checked, diff shown, awaiting your approval...
[You click Approve in browser]
Claude: Published. ✅
You: "Have I written about LSTMs before? If so, link to it in this new article."
Claude: Yes — found Deep Learning Fundamentals (87% match). Linking now.
You: "List my draft products"
Claude: Found 8 products: Widget Pro (draft), Gadget X (draft)...
You: "Create a new author named Jane Doe with email jane@example.com"
Claude: ✅ Author created! ID: a1b2c3Works with any REST JSON API — Supabase, PocketBase, Payload CMS, Directus, Strapi, custom Next.js/Express/FastAPI routes, or any backend that speaks JSON over HTTP.
Related MCP server: AutoWP MCP Server
How it works
cms-mcp reads your API's shape at startup, builds typed MCP tools from that shape, and registers them before Claude connects.
Schema resolution — 4-tier priority chain
flowchart LR
A["💾 Tier 1\nSQLite Cache\nInstant"] -->|"cache miss"| B["📄 Tier 2\nOpenAPI Spec\n~200ms"]
B -->|"no spec"| C["🔬 Tier 3\nLive Sampling\n20 records\n~500ms"]
C -->|"empty endpoint"| D["🌀 Tier 4\nCold-start\nPassthrough"]
style A fill:#1E1B4B,color:#C4B5FD,stroke:#4C1D95
style B fill:#1E3A5F,color:#93C5FD,stroke:#1E40AF
style C fill:#1C3829,color:#6EE7B7,stroke:#065F46
style D fill:#292524,color:#FCD34D,stroke:#92400EWhy OpenAPI first? Sampling records misses optional fields and fails on empty endpoints. An OpenAPI spec declares every field, format, required status, and enum value explicitly. If your API has a spec, cms-mcp uses it.
Sampling fallback: 20 records are fetched and merged into a union schema. Fields absent from even one record are flagged inconsistent: true and always use .optional() in generated Zod shapes — no false "required" errors.
What gets built per endpoint
flowchart LR
CFG["config.json\nendpoints:\n posts: /posts\n products: /products"] --> GEN["Schema\nResolution"]
GEN --> T1["list_posts"]
GEN --> T2["get_posts"]
GEN --> T3["create_posts"]
GEN --> T4["update_posts"]
GEN --> T5["delete_posts"]
GEN --> T6["list_products\n...5 more"]
style CFG fill:#1E1B4B,color:#C4B5FD,stroke:#4C1D95
style GEN fill:#1E3A5F,color:#93C5FD,stroke:#1E40AF
style T1 fill:#1C3829,color:#6EE7B7,stroke:#065F46
style T2 fill:#1C3829,color:#6EE7B7,stroke:#065F46
style T3 fill:#1C3829,color:#6EE7B7,stroke:#065F46
style T4 fill:#1C3829,color:#6EE7B7,stroke:#065F46
style T5 fill:#1C3829,color:#6EE7B7,stroke:#065F46
style T6 fill:#374151,color:#9CA3AF,stroke:#4B5563For every key in config.endpoints (except media), exactly 5 tools are registered. Schemas are cached in SQLite — next startup hits Tier 1 instantly.
Installation
# Zero install — just run
npx cms-mcp --config ./cms-mcp.config.json
# Or install globally
npm install -g cms-mcp
# Or from source
git clone https://github.com/parnish007/cms-mcp
cd cms-mcp && npm install && npm run build
node build/index.js --config ./cms-mcp.config.jsonQuick Start
1. Create your config
{
"baseUrl": "https://your-api.com/api",
"auth": {
"type": "bearer",
"token": "env:CMS_API_TOKEN"
},
"endpoints": {
"posts": "/posts",
"projects": "/projects",
"products": "/products",
"authors": "/authors",
"media": "/uploads"
}
}Any endpoint key works. At startup, cms-mcp generates list_posts, get_posts, create_posts, update_posts, delete_posts — and 5 more for every other endpoint — with schemas built from your API's actual fields.
Or skip manual config entirely:
npx cms-mcp init --base-url https://your-api.com/api2. Get your API token
CMS | Location |
Supabase | Project Settings → API → |
Strapi | Settings → API Tokens → Create new |
Directus | Settings → Access Tokens → Create Token |
PocketBase |
|
Payload CMS | Admin → Users → your user → API Key |
Custom backend | Whatever your backend requires |
Full instructions: docs/env-vars.md
export CMS_API_TOKEN=your-token-here3. Connect to Claude
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"cms-mcp": {
"command": "npx",
"args": ["cms-mcp", "--config", "/path/to/cms-mcp.config.json"],
"env": { "CMS_API_TOKEN": "your-token-here" }
}
}
}Claude Code:
claude mcp add cms-mcp -- npx cms-mcp --config ./cms-mcp.config.json4. Talk to Claude
"List my draft posts"
"Create a product called Widget Pro with price 29.99"
"Inspect the schema of my authors endpoint"
"Refresh the schema for products and tell me what changed"Tools Reference
Per-endpoint tools
Tool | What it does |
| Filter, paginate, full-text search. Enum fields become optional filter params. |
| Fetch single record by ID. |
| Create new record. |
| Update by |
| Delete by |
Examples:
"Preview creating a post titled Hello World"
→ create_posts({ title: "Hello World", status: "draft", preview: true })
"Update post 42, set status to published"
→ update_posts({ id: "42", status: "published", confirm: true })
"Delete post 42"
→ delete_posts({ id: "42", confirm: true })Foreign-key fields (author_id, tag_ids) are auto-detected and surfaced as relation hints in tool descriptions — Claude knows which tool to call to resolve related records.
Set legacyMode: true to revert to the v0.5 mutate_X combined tool:
{ "legacyMode": true }→ mutate_posts({ action: "create", data: { title: "Hello World" }, confirm: true })Useful if you have saved Claude prompts that reference mutate_X by name.
Always-available tools
Category | Tools |
Media (if |
|
Introspection |
|
Policy |
|
Optional plugin tools
Plugin | Config required | Tools added |
Semantic search |
|
|
GitHub |
|
|
MCP Resources
One resource pair per configured endpoint:
cms://posts → list all posts
cms://posts/{id} → single post (HTML distilled to Markdown)Advanced Features
Human Approval Gate
Every write pauses for a human click before executing.
sequenceDiagram
actor You
participant Claude
participant cms-mcp
participant Browser
Claude->>cms-mcp: delete_posts({ id: "42", confirm: true })
cms-mcp->>Browser: Open approval UI at localhost:2323
cms-mcp-->>Claude: Waiting for approval...
Browser->>You: Show diff preview + Approve / Reject
You->>Browser: Click Approve
Browser->>cms-mcp: approved
cms-mcp->>Claude: ✅ DeletedEnable:
npx cms-mcp --config ./config.json --approvalOr scope to specific tools:
{
"approvals": {
"port": 2323,
"timeoutMs": 300000,
"tools": ["delete_posts", "delete_products", "create_posts"]
}
}Auto-rejects after 5 minutes. See docs/advanced/approval-gate.md.
Semantic Search
TF-IDF (no API key):
{ "schemaCache": { "path": "~/.cms-mcp/schema.db" } }True semantic similarity (OpenAI):
{
"schemaCache": { "path": "~/.cms-mcp/schema.db" },
"embedding": {
"provider": "openai",
"apiKey": "env:OPENAI_API_KEY",
"model": "text-embedding-3-small"
}
}"Have I written about machine learning before? Link to it in this new article."
→ Found: Deep Learning Fundamentals (87% match), Neural Net Tutorial (73% match)Policy Engine
Policies are auto-enforced on every create_X, update_X, and delete_X — no manual step needed.
{
"version": "1",
"rules": [
{
"type": "required_fields",
"fields": ["cover_image", "seo_title", "seo_description"],
"tools": ["update_posts", "update_projects"]
},
{
"type": "forbidden_words",
"field": "body",
"words": ["TODO", "lorem ipsum"],
"tools": ["create_posts", "update_posts"]
},
{
"type": "min_tags",
"min": 2,
"tools": ["create_projects"]
}
]
}required_fields · min_tags · max_tags · min_length · max_length · forbidden_words · require_cover_image · seo_required · regex_match · status_transition
Rule tools arrays accept both v1.0.0 names (create_X) and legacy names (mutate_X) interchangeably.
Generate a starter file: "Initialize policies for my CMS"
See docs/advanced/policy-engine.md.
CMSAdapter — Field Mapping
Some CMS APIs use internal field names that differ from what Claude sees. The adapters block handles this bidirectionally:
{
"adapters": {
"posts": {
"updateMethod": "PUT",
"fieldMap": {
"title": "post_heading_1",
"body": "post_content_markdown",
"status": "publication_state"
}
}
}
}Claude uses the left-hand names. The API receives the right-hand names. Responses are reverse-mapped before returning to Claude.
Schema → Zod Type Mapping
OpenAPI / inferred type | Zod validator |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| base type |
| excluded from create/update inputs |
Configuration
{
"name": "My Site",
"baseUrl": "https://your-api.com/api",
"auth": {
"type": "bearer",
"token": "env:CMS_API_TOKEN"
},
"endpoints": {
"posts": "/posts",
"projects": "/projects",
"products": "/products",
"authors": "/authors",
"events": "/events",
"media": "/uploads"
},
"github": {
"token": "env:GITHUB_TOKEN",
"defaultOwner": "your-username"
},
"readOnly": false,
"auditLog": "~/.cms-mcp/audit.log",
"policies": "./cms-mcp.policies.json",
"schemaCache": {
"path": "~/.cms-mcp/schema-cache.db",
"ttlMinutes": 60
},
"embedding": {
"provider": "openai",
"apiKey": "env:OPENAI_API_KEY",
"model": "text-embedding-3-small"
},
"approvals": {
"port": 2323,
"timeoutMs": 300000,
"tools": ["delete_posts", "delete_products"]
},
"adapters": {
"posts": {
"updateMethod": "PUT",
"fieldMap": {
"title": "post_heading_1",
"body": "post_content_markdown"
}
}
},
"legacyMode": false,
"allowedPorts": [3000, 8080],
"openapi": {
"autoDiscover": true,
"discoveryUrl": "https://your-api.com/api/docs/openapi.json"
},
"webhook": {
"port": 3001,
"secret": "env:WEBHOOK_SECRET",
"path": "/webhook"
}
}Auth types:
Type | Config |
Bearer token |
|
API key header |
|
HTTP Basic |
|
No auth |
|
Any value prefixed with env: is resolved from the environment at startup. Secrets are never written to logs.
CLI flags:
Flag | Description |
| Config file path |
| Disable all write tools |
| Enable approval gate |
| Start GitHub webhook listener |
| Skip OpenAPI auto-discovery |
Security
flowchart LR
REQ["Incoming\nRequest"] --> SSRF["SSRF v2\nPrivate IP block\nPort whitelist\nNull-byte filter"]
SSRF --> ZOD["Zod Validation\nDynamic shapes\nfrom live schema"]
ZOD --> POLICY["Policy Engine\nAuto-enforced\non every write"]
POLICY --> CONFIRM["Confirm Guard\nconfirm: true\nrequired"]
CONFIRM --> GATE["Approval Gate\nHuman click\noptional"]
GATE --> EXEC["Execute"]
style REQ fill:#1F2937,color:#D1D5DB,stroke:#374151
style SSRF fill:#450A0A,color:#FCA5A5,stroke:#7F1D1D
style ZOD fill:#1E3A5F,color:#93C5FD,stroke:#1E40AF
style POLICY fill:#1C2A1E,color:#86EFAC,stroke:#14532D
style CONFIRM fill:#2D1B69,color:#C4B5FD,stroke:#4C1D95
style GATE fill:#3B1F2B,color:#F9A8D4,stroke:#9D174D
style EXEC fill:#065F46,color:#6EE7B7,stroke:#047857Protection | Detail |
SSRF v2 | Blocks private IPs (RFC 1918), loopback, AWS/GCP/Azure metadata ( |
Port whitelist | Only 80 and 443 by default — add extras via |
SecretManager | Secrets tokenized after |
No redirect following |
|
Timeouts | 30s |
Media cap | 50 MB upload limit |
Secret redaction | Recursive redaction of all secret field names in audit logs |
Input validation | Zod shapes from live schema — every input validated at runtime |
Confirm guards | All destructive operations require |
Webhook HMAC | Constant-time SHA-256 signature verification |
Read-only mode |
|
See docs/security.md · Report vulnerabilities via SECURITY.md.
Testing
npm test78 tests, 6 suites, Node native test runner (no Jest/Mocha/Vitest):
Suite | Tests | What's covered |
Policy Engine | 15 | All 10 rule types, tool scoping, multi-rule violations |
Content Distiller | 14 | HTML→Markdown, field stripping, metadata headers, pipeline |
Circuit Breaker | 10 | Full lifecycle, cached fallback, reset, status |
Vector Cache | 10 | Store, async search, TF-IDF, custom embedFn, type filter, clear |
OpenAPI | 6 | Formatting, empty resources, missing fields |
Security | 23 | SSRF (15 URL patterns), null bytes, long URLs, auth URLs |
Current Limitations
Limitation | Workaround |
Tool shapes fixed at connect time — schema changes require restart |
|
No nested/relational writes — top-level fields only | Post top-level record, then use secondary tools for relations |
Sampling can miss rare fields — Tier 3 samples 20 records | Use OpenAPI spec (Tier 2) or |
CompensatingTransaction is not atomic — REST has no transaction primitive | On |
No pagination abstraction — | Pass |
| Name your media endpoint |
Single base URL — one auth config per instance | Run a second cms-mcp instance for a second API |
No GraphQL | Use a REST wrapper or Hasura REST endpoints in front of GraphQL |
Supported CMS Platforms
Supabase · PocketBase · Payload CMS · Directus · Strapi · Custom Next.js/Express/FastAPI · Any REST JSON API
Ready-made config files: examples/
Normalized response shapes (all handled automatically):
[{...}] · { "data": [...] } · { "items": [...] } · { "results": [...] } · { "records": [...] } · { "nodes": [...] } · { "collection": [...] }
Docker
# Build and run
docker build -t cms-mcp .
docker run -v $(pwd)/cms-mcp.config.json:/app/config.json \
-e CMS_API_TOKEN=your-token \
cms-mcp --config /app/config.json
# Or with compose
docker compose upMulti-stage Alpine build (node:22-alpine) — ~45MB image. Uses dumb-init for proper PID 1 signal handling.
Documentation
Doc | Description |
Install, configure, first conversation | |
Tokens from every CMS | |
Full config schema reference | |
How schema-driven tools work | |
Upload, list, delete | |
Scan, sync, list repos | |
Schema inspect, refresh, cache | |
Human-in-the-loop setup | |
OpenAI embeddings setup | |
Auto-schema detection | |
Publishing standards | |
GitHub push → drafts | |
API failure handling | |
Operator reference | |
Upgrading from v0.5 | |
Upgrading from v0.4 | |
Upgrading from v0.3.x |
Contributing
Issues, PRs, and CMS adapter examples are welcome. See CONTRIBUTING.md for the dev workflow.
Good first contributions: add a CMS config to examples/ · add a new policy rule type · write tests for the generic introspection pipeline
License
MIT — see LICENSE.
Built for the Model Context Protocol ecosystem.
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
Read, write, translate and sync WordPress and Webflow blog articles from Claude.
Manage WordPress blogs and WooCommerce shops from Claude, ChatGPT, Cursor and other MCP apps.
AI Visibility and Content Intelligence tools for Claude and MCP-compatible agents.
Edit and publish your FramerToNextJS sites (converted Framer or AI-built) from Claude, Cursor or Codex. 19 tools: read pages, rewrite copy, restyle elements, add sections and pages, design Studio sites, manage CMS collections and items, then publish to your own host. OAuth with a read-only option, and MCP runs no model on FNJ's side. Requires an FNJ plan (Lifetime or any AI builder plan).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides access to Strapi CMS content through the MCP protocol, allowing users to create, read, update, and delete content entries via Claude.69 npm25MIT
- AlicenseBqualityDmaintenanceConnects Claude to WordPress sites through the REST API, enabling AI-assisted content creation, publishing, media management, user administration, and site maintenance tasks through natural language.4723MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to discover and call any REST API from an OpenAPI/Swagger spec or Postman collection at runtime, with authentication, workflows, and prebuilt registry support.MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to interact with Strapi CMS instances through a standardized interface, supporting schema introspection, REST CRUD operations, media uploads, JWT authentication, and version-aware content management.5MIT