DevHub MCP Server: CMS Website Content Management
Manage website content with the DevHub MCP server to streamline CMS workflows, publish updates, and control assets across your site.
npx -y @devhub/devhub-cms-mcpOverview
The DevHub MCP Server is a lightweight backend that centralizes website content, assets, and publication workflows while exposing content as structured context for model-driven processes. It implements the Model Context Protocol (MCP) patterns so downstream tools — including automated pipelines and LLM-based editors — can fetch normalized site state and make context-aware edits or suggestions.
The server is intended for developer teams who need to coordinate content updates, control asset distribution, and integrate content operations into CI/CD or model-augmented workflows. It supports local or S3-backed storage, a REST API for content and asset management, and webhook hooks for automated publishing and notifications.
Features
- REST API for content CRUD, asset upload/download, and publication control
- MCP-compatible context endpoint for model and automation integrations
- Support for local filesystem or S3-compatible storage backends
- Authentication via JWT or API tokens, with role-aware endpoints (editor, publisher)
- Webhook events on content changes and publish actions
- Optional CLI and SDK for local workflows and automation scripts
- Configurable caching and pagination for large sites
- Audit logs and basic versioning for content entries
Installation / Configuration
Clone the repository and install dependencies:
Run locally (development):
# copy example env and edit as needed
# start the server
Run with Docker (example using Docker Compose):
# docker-compose.yml
version: "3.8"
services:
devhub-mcp:
image: devhub/devhub-cms-mcp:latest
ports:
- "8080:8080"
environment:
- PORT=8080
- STORAGE_TYPE=s3
- S3_BUCKET=your-bucket
- S3_REGION=us-east-1
- JWT_SECRET=changeme
volumes:
- ./data:/data
Configuration environment variables
| Variable | Default | Description |
|---|---|---|
| PORT | 8080 | HTTP server port |
| STORAGE_TYPE | filesystem | Storage backend: filesystem or s3 |
| STORAGE_PATH | ./data | Local storage path (for filesystem) |
| S3_BUCKET | — | S3 bucket name (if STORAGE_TYPE=s3) |
| S3_REGION | — | S3 region |
| S3_ACCESS_KEY | — | S3 access key |
| S3_SECRET_KEY | — | S3 secret key |
| JWT_SECRET | changeme | Secret for signing JWT auth tokens |
| DATABASE_URL | — | Optional relational DB connection string for audit/versioning |
| MCP_TOKEN | — | Token required for MCP context endpoint (optional) |
Authentication
- The server supports JWT bearer tokens. Include Authorization: Bearer
on protected endpoints. - You can seed admin tokens via environment variables or create users through the admin API.
Available Resources
API endpoints (examples)
- GET /mcp/context
- Returns structured site context (content entries, asset metadata, routing) suitable for MCP clients.
- GET /api/content
- List content entries with pagination and filters.
- GET /api/content/:id
- Retrieve a single content item (Markdown, JSON, or structured model).
- POST /api/content
- Create or update content (body, metadata, locale).
- POST /api/publish/:id
- Publish a content entry to the live channel; triggers webhooks.
- POST /api/assets
- Upload an asset (images, media). Returns URL and metadata.
- GET /api/assets/:id
- Retrieve asset metadata or stream the file.
- POST /api/webhooks/register
- Register webhook callbacks for publish/content events.
CLI and SDK
- The project includes a small CLI for local dev commands (start, validate, export) and a JavaScript SDK that wraps the REST API for scripted workflows. Check the repository’s /cli and /sdk folders for usage examples.
Documentation and API docs
- Auto-generated OpenAPI/Swagger docs are available at /docs when running the server locally.
Use Cases
Collaborative editorial workflow
- Editors create or update content via the REST API or UI. Changes are stored, audited, and only published after review. Webhooks notify external systems (search indexing, static site builders) when a publish event occurs.
CI/CD-driven publishing
- A CI pipeline fetches content previews from /mcp/context, runs automated validation and tests, then triggers POST /api/publish/:id to release updates. Artifacts (static builds) can be synced using published asset URLs.
Model-augmented content generation
- An LLM-based assistant queries GET /mcp/context to receive structured page context and metadata. The assistant proposes edits which are then POSTed to /api/content for review and publication.
Asset distribution and optimization
- Upload assets to /api/assets. The MCP server stores files (local or S3), provides canonical URLs, and publishes metadata so CDNs or image services can fetch and optimize assets.
Multi-locale and A/B testing
- Store localized content variants and use the publish endpoint to control which variant is live. Use metadata fields to coordinate A/B test assignment and rollbacks.
Example Requests
Fetch MCP context (requires MCP token or auth):
Create or update content:
Upload an asset:
Use these examples as starting points; check the running server’s /docs for the full OpenAPI schema.
Notes and Best Practices
- For production, prefer S3 (or S3-compatible) storage and a managed database for audit/version history.
- Protect MCP endpoints with tokens and limit access to automation clients and trusted editors.
- Use webhooks to connect publishing events to downstream systems (static site generator, search index, analytics).
- Implement content validation and linting steps in CI to prevent malformed content from being published.