MCP Server
Dune ships a built-in Model Context Protocol (MCP) server that lets AI coding agents — Claude Code, Cursor, and others — read your site's content, schema, and configuration directly, without a running web server.
Starting the server
dune mcp:serve
The server reads from stdin and writes to stdout using newline-delimited JSON-RPC 2.0. It loads your site's content index at startup and serves requests from there — no HTTP port is opened.
Configuring Claude Code
Add an entry to .mcp.json in your site root (or ~/.claude.json for global access):
{
"mcpServers": {
"dune": {
"command": "deno",
"args": ["run", "-A", "jsr:@dune/core/cli", "mcp:serve"],
"cwd": "/path/to/your/site"
}
}
}
After restarting Claude Code, the dune server appears in the MCP tools panel and all tools are available in your conversations.
Configuring Cursor
Add the same entry under mcpServers in Cursor's MCP config file (~/.cursor/mcp.json):
{
"mcpServers": {
"dune": {
"command": "deno",
"args": ["run", "-A", "jsr:@dune/core/cli", "mcp:serve"],
"cwd": "/path/to/your/site"
}
}
}
Tools
Tools are callable functions that agents can invoke with parameters.
| Tool | Description |
|---|---|
list_pages |
List pages in the content index. Filter by template, published status, language, taxonomy, or date range. |
get_page |
Get a single page by route — full frontmatter, rendered HTML, media files, and metadata. |
get_page_source |
Read the raw source (YAML frontmatter + markdown body) of a page by route. |
search_content |
Full-text search across all pages. Returns matches with relevance scores and excerpts. |
get_taxonomy |
Get all values for a taxonomy (e.g. tags, categories) with per-value page counts. Omit the name argument to list all taxonomies. |
get_config |
Get the site configuration summary — title, URL, theme, taxonomies, languages, feature flags. Secrets are never included. |
get_runtime_info |
Live snapshot of the engine state — page counts, content formats, sections, plugins, theme details. |
list_templates |
List all templates and layouts available in the active theme. |
list_blueprints |
List all blueprint (frontmatter schema) definitions. Returns field names, types, and validation rules per template. |
Resources
Resources are static URIs that agents can read directly.
| URI | Description |
|---|---|
dune://site/config |
Full site configuration as JSON. |
dune://site/schema |
JSON Schema for site.yaml — the same as GET /_dune/schema/config. |
dune://content/pages |
Complete page index as JSON. |
dune://content/taxonomy |
All taxonomy data with page counts. |
dune://content/blueprints |
All blueprint definitions. |
Skill files
dune new installs a set of agent skill files into .claude/skills/ that brief an AI session on Dune's conventions, file layout, plugin shape, config schema, and common tasks. These complement the MCP server — the skills provide static background knowledge while the MCP tools provide live site data.
To reinstall or update skill files in an existing project:
dune update:skills