MCP Reference

Accent CMS exposes a Model Context Protocol (MCP) server for AI-assisted content management. This page is a complete reference of every tool, resource, configuration field, and CLI flag.

For setup instructions and client integration guides, see the MCP Server integration page.

CLI

accent mcp

Start the MCP server in stdio mode (JSON-RPC over stdin/stdout).

accent mcp [OPTIONS]
FlagTypeDefaultDescription
-c, --configpathconfig.yamlPath to the site configuration file
--site-dirpath–Project root directory (derives content and theme directories)
--content-dirpath–Content directory override
--theme-dirpath–Theme directory override
--themestring–Theme name override

A valid Pro license key is required. Set it via the ACCENTCMS_LICENSE environment variable or the license.key field in config.yaml.

Configuration

All MCP settings live under the mcp: section in config.yaml. Every field has a sensible default, so the entire section can be omitted.

mcp:
  transport: stdio
  http:
    path: /_mcp/
  tools:
    write_enabled: false
    allowed_paths: []

mcp.transport

ValueDescription
stdioJSON-RPC over stdin/stdout (default). Used by Claude Desktop, Claude Code, Cursor, VS Code.
httpSSE transport on an HTTP endpoint (future).

mcp.http

FieldTypeDefaultDescription
pathstring/_mcp/URL path for the HTTP/SSE transport endpoint

mcp.tools

FieldTypeDefaultDescription
write_enabledboolfalseEnable mutation tools (update_frontmatter, create_page, move_page). Disabled by default for safety.
allowed_pathslist of strings[] (all)Restrict tool access to pages under these URL prefixes. Empty means all paths are accessible. Applies to both read and write tools.

Example – restrict access to /blog and /docs:

mcp:
  tools:
    allowed_paths:
      - /blog
      - /docs

Requests for pages outside these prefixes (e.g., /admin/secret) are rejected with an invalid_params error.

Tools

Read Tools

read_page

Read a single page by URL path. Returns page metadata, hierarchy, translations, and optionally the raw markdown body.

ParameterTypeRequiredDefaultDescription
urlstringyes–URL path of the page (e.g., /blog/my-post)
include_contentboolnofalseInclude the raw markdown body in the response

Response fields: title, date, author, tags, template, status, lead, url, parent, children, breadcrumbs, translations, custom (passthrough frontmatter fields), and content (when include_content is true).

Errors: invalid_params if the page is not found or the path is not in allowed_paths.


list_pages

List pages matching filter criteria with sorting and pagination.

ParameterTypeRequiredDefaultDescription
path_globstringno–Glob pattern to match page URLs (e.g., /blog/**)
tagstringno–Filter to pages with this tag
authorstringno–Filter to pages by this author
statusstringno–Filter by status: published, draft, review, archived
templatestringno–Filter by template name
sortstringnodateSort field: date, title, url, modified
orderstringnodescSort order: asc or desc
limitintegerno50Maximum number of pages to return
offsetintegerno0Number of pages to skip

Response: Array of page summary objects (same fields as read_page minus content).


search_content

Full-text search across page content. Returns matching pages ranked by relevance.

ParameterTypeRequiredDefaultDescription
querystringyes–The search query string
fieldslist of stringsnoallFields to search in (see below)
limitintegerno20Maximum number of results

Searchable fields:

Field valueSearches
titlePage titles
contentMarkdown body text
tagsTag names
leadLead/summary text
frontmatterAll custom frontmatter fields

When fields is omitted or empty, all fields are searched.


get_tags

Get all taxonomy tags with page counts.

ParameterTypeRequiredDefaultDescription
include_pagesboolnofalseInclude the list of page URLs for each tag
tagstringno–Glob pattern to filter tag names

Response: Array of tag objects with name, count, and optionally pages (list of URLs).


get_tree

Get the content hierarchy tree.

ParameterTypeRequiredDefaultDescription
rootstringno/Root URL to start the tree from
flatboolnofalseReturn a flat list with depth information instead of a nested tree

Response: Nested tree of page nodes with url, title, order, and children. With flat: true, a flat array with depth values.

Mutation Tools

All mutation tools require mcp.tools.write_enabled: true in config.yaml. Without it, calls return an invalid_params error. Mutation tools also respect allowed_paths.

After each successful write, the content index is rebuilt from disk so subsequent reads reflect the changes.

update_frontmatter

Update frontmatter fields on an existing page.

ParameterTypeRequiredDefaultDescription
urlstringyes–URL path of the page to update
setJSON objectno–Fields to set (e.g., {"status": "published", "tags": ["rust"]})
removelist of stringsno–Field names to remove from frontmatter
dry_runboolnofalsePreview changes without writing to disk

At least one of set or remove must be provided. String values in set are stored as-is; non-string values are serialized to their YAML representation. Field names must be printable text: a name containing a control character other than tab (a line break, DEL, or a C1 control) or the non-characters U+FFFE and U+FFFF is refused with invalid_params naming the key, before the page is read.

Response fields: written (bool), path (file path), before and after (frontmatter snapshots in dry-run mode).

Errors: invalid_params if the page is not found, the path is restricted, or no operations are provided. Requires write_enabled.


create_page

Create a new content page.

ParameterTypeRequiredDefaultDescription
urlstringyes–Desired URL path (e.g., /blog/new-post)
titlestringyes–Page title
templatestringnodefaultTemplate name without file extension
frontmatterJSON objectno–Additional frontmatter fields
contentstringno–Markdown body content
dry_runboolnofalsePreview what would be created without writing

The URL is resolved to a filesystem path following Accent CMS conventions (numeric prefixes, slug directories, default.md files). If a page already exists at the URL, an error is returned.

Response fields: created (bool), path (resolved file path), url (canonical URL).

Errors: invalid_params if the path is restricted, a page already exists at the URL, or a frontmatter field name contains a non-printable character (the key is named, as for update_frontmatter). Requires write_enabled.


move_page

Move a page to a new URL path.

ParameterTypeRequiredDefaultDescription
from_urlstringyes–Current URL path of the page
to_urlstringyes–Target URL path
update_referencesboolnofalseAutomatically rewrite references to the old URL in other pages
dry_runboolnofalsePreview what would change without moving

The page’s filesystem directory is renamed. All other pages are scanned for markdown links and references to the old URL. With update_references: true, those references are rewritten in place. Both from_url and to_url must pass the allowed_paths check.

Response fields: moved (bool), from_path and to_path (filesystem paths), references (list of pages that reference the old URL).

Errors: invalid_params if either path is restricted, the source page is not found, or the target already exists. Requires write_enabled.

Resources

Resources provide read-only access to site-wide data. They are always available (no write_enabled gate).

ResourceURIMIMEDescription
Content Schemaaccent://schemaapplication/jsonContent model: frontmatter fields, available templates, configured languages
Content Treeaccent://content/treeapplication/jsonFull site hierarchy as a nested tree
Taxonomyaccent://taxonomyapplication/jsonAll tags with page counts and page URLs
Validation Reportaccent://validationapplication/jsonContent integrity validation results (missing templates, broken references)

Error Codes

MCP tools return standard JSON-RPC error codes:

CodeNameWhen
-32602invalid_paramsPage not found, path restricted, write disabled, missing required parameters, target already exists
-32603internal_errorFilesystem error, JSON serialization failure, content index rebuild failure

Server Identity

The MCP server identifies itself as:

FieldValue
Nameaccent-mcp
VersionCurrent Accent CMS version
CapabilitiesTools, Resources