MCP Server
What is MCP?
Model Context Protocol (MCP) is an open standard for connecting AI assistants to external data sources and tools. Instead of copying content into a chat window, MCP lets an AI assistant read your pages, search content, browse your site hierarchy, and inspect taxonomy – all through a standardized protocol.
Accent CMS implements an MCP server that exposes your content as resources and provides tools for content querying and mutation. Any MCP-compatible client – including Claude Desktop, Claude Code, Cursor, and VS Code – can connect to it.
Starting the MCP Server
The MCP server runs over standard input/output (stdio), reading JSON-RPC messages from stdin and writing responses to stdout. This is the transport used by desktop AI assistants.
accent mcp --config config.yaml
You can override directories with CLI flags:
accent mcp --config config.yaml --site-dir /path/to/site accent mcp --config config.yaml --content-dir ./content --theme-dir ./themes
A valid Pro license key is required, set via config.yaml or the ACCENTCMS_LICENSE environment variable.
Available Tools
Read Tools
MCP read tools let AI assistants query your site content.
| Tool | Description | Parameters |
|---|---|---|
read_page | Read a page by URL path | url (required), include_content (optional, default false) |
list_pages | List pages with filtering and pagination | path_glob, tag, author, status, template, sort, order, limit, offset (all optional) |
search_content | Full-text search across content | query (required), fields (optional), limit (optional, default 20) |
get_tags | Get taxonomy tags with page counts | include_pages (optional), tag (optional glob filter) |
get_tree | Get content hierarchy tree | root (optional), flat (optional) |
read_page returns page metadata (title, date, author, tags, template, status), hierarchy (parent, children, breadcrumbs), and translations. Set include_content: true to also get the raw markdown body.
list_pages supports filtering by tag, author, status (published/draft/review/archived), template, and path_glob (e.g., /blog/**). Sort by date, title, url, or modified in asc or desc order. Defaults to 50 results.
search_content performs full-text search across page titles, content, tags, lead text, and custom frontmatter. Restrict search to specific fields with fields: ["title", "content", "tags", "lead", "frontmatter"].
get_tags returns all tags with page counts. Use tag to filter by glob pattern and include_pages: true to include page URLs for each tag.
get_tree returns the content hierarchy as a nested tree. Set root to start from a subtree (e.g., /docs) and flat: true for a flat list with depth information.
Mutation Tools
Mutation tools let AI assistants create, update, and move content pages. These require write_enabled: true in your MCP configuration.
| Tool | Description | Parameters |
|---|---|---|
update_frontmatter | Update frontmatter fields on a page | url (required), set (JSON object), remove (field names), dry_run (optional) |
create_page | Create a new content page | url (required), title (required), template, frontmatter (JSON object), content, dry_run (all optional) |
move_page | Move a page to a new URL | from_url (required), to_url (required), update_references, dry_run (optional) |
update_frontmatter sets or removes frontmatter fields. Pass set as a JSON object (e.g., {"status": "published", "tags": ["rust"]}) and remove as a list of field names. Use dry_run: true to preview changes without writing. The content index is rebuilt after each successful write.
create_page creates a new page at the given URL path. The CMS resolves the URL to a filesystem path following Accent CMS conventions (numeric prefixes, slug directories, default.md files). Pass additional frontmatter via a JSON object in frontmatter. Use dry_run: true to see the resolved file path without creating anything.
move_page moves a page from one URL to another by renaming its filesystem directory. It scans all other pages for references to the old URL and reports them. Set update_references: true to automatically rewrite those references. Use dry_run: true to preview the move without making changes.
Advanced & AI-Native Tools
These tools combine multiple lower-level operations into the higher-level workflows AI assistants reach for most often.
| Tool | Description | Parameters |
|---|---|---|
validate_content | Run the content validation report on one page or the entire site | url (optional) |
render_preview | Render a page (or raw markdown) to body HTML for preview | url or markdown (exactly one) |
audit_content | Comprehensive content quality audit | min_word_count, stale_days, path_glob (all optional) |
find_references | Find every page that references a URL | url (required) |
validate_content wraps the same validation report exposed by the accent://validation resource. Pass url to scope it to one page; omit it to validate the entire site. Returns errors, warnings, and info messages with severity-summary counts.
render_preview renders the markdown pipeline (TOC, syntax highlighting, smart quotes, …) and returns the body HTML. Pass url to render the saved page or markdown to render an unsaved draft. The Jinja layout template is not applied – the response carries a note field documenting this. Full template-level preview is on the roadmap.
audit_content combines validation with completeness, length, freshness, and taxonomy checks. Findings are grouped by category (completeness, length, freshness, taxonomy) and tagged with a severity. Tune min_word_count (default 200) and stale_days (default 180) to match your site, and use path_glob to scope the audit to a subset.
find_references scans every page for content-body links and relation-frontmatter references to the given URL. Use it for impact analysis before moving or removing content.
MCP Prompts
Prompts are user-controlled workflows surfaced through the prompts/list and prompts/get MCP methods. An MCP client selects a prompt, and the server fills it with live site context so the AI receives a ready-to-execute starting point.
| Prompt | Arguments | Bundles |
|---|---|---|
content_review | url (required) | Page metadata, body, site tag list |
content_migration_plan | (none) | Full flat site tree + tags with page associations |
taxonomy_cleanup | (none) | All tags with page URLs |
content_review kicks off a structured review of one page: metadata completeness, content quality, SEO, cross-linking, and consistency with the site’s tag vocabulary. The model is asked to surface concrete update_frontmatter calls for each finding.
content_migration_plan seeds a restructuring discussion. The model receives the depth-annotated site tree and full taxonomy, and is asked to identify pages worth moving, missing sections, and the concrete move_page / update_frontmatter calls needed to apply each change.
taxonomy_cleanup focuses on the tag vocabulary: duplicates, single-use tags, inconsistent naming, and tags worth splitting. The model proposes the update_frontmatter calls needed to apply each consolidation.
Available Resources
MCP resources provide read access to site-wide data. AI assistants can browse these to understand your site structure.
| Resource | URI | Description |
|---|---|---|
| Content Schema | accent://schema | Content model: frontmatter fields, templates, languages |
| Content Tree | accent://content/tree | Site content hierarchy as a nested tree |
| Taxonomy | accent://taxonomy | Tag index with page counts |
| Validation Report | accent://validation | Content integrity validation results |
All resources return JSON.
Claude Desktop Integration
Add Accent CMS to your Claude Desktop configuration in claude_desktop_config.json:
{ "mcpServers": { "accent": { "command": "accent", "args": ["mcp", "--config", "config.yaml"], "cwd": "/path/to/my-site" } } }
Set the cwd field to your Accent CMS project directory (the folder containing config.yaml).
Once configured, you can use natural language prompts:
- “List all pages tagged with ‘tutorial’”
- “Show me the content tree for /docs”
- “Search for pages about Rust error handling”
- “What pages are in draft status?”
- “Show me the tag taxonomy for this site”
Claude Code Integration
Add Accent CMS as an MCP server in your Claude Code settings (.claude/settings.json or project-level .mcp.json):
{ "mcpServers": { "accent": { "command": "accent", "args": ["mcp", "--config", "config.yaml"], "cwd": "/path/to/my-site" } } }
Configuration
Control MCP tool access in config.yaml:
mcp: transport: stdio tools: allowed_paths: [] # Restrict tools to these URL prefixes (empty = all) write_enabled: false # Enable mutation tools (create, update, move pages)
Path Restrictions
Use allowed_paths to restrict which content paths MCP tools can access:
mcp: tools: allowed_paths: - /blog - /docs
With this configuration, tools like read_page will only work for pages under /blog or /docs. Requests for other paths (e.g., /admin/secret) will be rejected. Leave allowed_paths empty to allow access to all content.
Security Considerations
- Pro license required – the MCP server only starts with a valid Pro license key, preventing unauthorized use.
- Write disabled by default – mutation tools (
update_frontmatter,create_page,move_page) require explicitly settingwrite_enabled: truein the MCP configuration. Without this, the server operates in read-only mode. - Stdio transport is inherently scoped to the current user’s permissions. The AI assistant can only access content the user can access.
- Path restrictions let you limit which content sections are exposed to AI assistants via
allowed_paths. This applies to both read and write tools. - Dry-run mode – all mutation tools accept a
dry_runparameter to preview changes before committing them to disk. - All tool responses are JSON serializations of the same data available through the CLI query and content commands.
Next Steps
- Integrations Overview – compare integration options
- CLI Reference – full command reference including
accent mcp - Configuration Reference – all
config.yamlfields