For the complete documentation index, see llms.txt. The full corpus is available at llms-full.txt. This page is also available as Markdown by appending
.mdto the URL.
MCP server (AI agents)
Vault CMS ships with a Model Context Protocol server bundled inside the same create-vaultcms npm package. Once registered, AI tools like Claude Code, Cursor, Claude Desktop, and Codex can install and configure Vault CMS for you through structured tool calls — no need to switch to a terminal or answer interactive prompts.
Why this matters
Section titled “Why this matters”Without MCP, asking an AI for help with Vault CMS gets you a tutorial. The AI tells you to cd to your project, run npx create-vaultcms, pick options, and so on. You do the work.
With MCP registered, the same conversation goes:
“Set up Vault CMS in my Astro project at
~/code/my-blogusing the Starlight preset.”
The agent inspects the project, confirms it’s Astro, picks the right install location, runs the install, and reports what changed — all in one turn.
Quick start
Section titled “Quick start”The server speaks stdio. AI clients spawn it as a subprocess. You only need to register it once per tool.
Claude Code
Section titled “Claude Code”Run the registration command (one line):
claude mcp add vaultcms --scope user -- npx -y -p create-vaultcms@latest vaultcms-mcpThat writes the server entry to your user-level Claude config. Restart Claude Code and the three tools become available.
To allow the tools without permission prompts, open ~/.claude/settings.json and add "mcp__vaultcms__*" to the permissions.allow array.
Cursor
Section titled “Cursor”Open Settings → Cursor Settings → MCP → Add new MCP server:
- Name:
vaultcms - Type:
command - Command:
npx -y -p create-vaultcms@latest vaultcms-mcp
Claude Desktop
Section titled “Claude Desktop”Edit claude_desktop_config.json (location varies by OS — see the Claude Desktop docs):
{ "mcpServers": { "vaultcms": { "command": "npx", "args": ["-y", "-p", "create-vaultcms@latest", "vaultcms-mcp"] } }}Restart Claude Desktop. The vaultcms tools appear in the tool picker.
Other MCP-compatible clients
Section titled “Other MCP-compatible clients”Anything that runs an MCP stdio server can use it. The launch command is always:
npx -y -p create-vaultcms@latest vaultcms-mcpWhat the agent can do
Section titled “What the agent can do”The server exposes three tools.
detect_project (read-only)
Section titled “detect_project (read-only)”Inspects a directory and returns a structured snapshot:
- Whether it’s an Astro project
- The resolved project root (walks up looking for
package.json,astro.config.*, or.git) - Detected package manager (pnpm, yarn, bun, npm)
- Content collections under
src/content/(filtered to exclude Vault CMS install artifacts) - Dynamic Astro routes (
[...slug].astro) mapped to their content collections - Whether Vault CMS is already installed
- Whether any Obsidian vault is present (even without the vault-cms plugin — protects older Obsidian-authored sites from being overwritten)
The agent uses this to confirm the project state before doing anything.
list_presets (read-only)
Section titled “list_presets (read-only)”Returns the available preset templates from the registry, with metadata pulled from the vaultcms-presets manifest:
- Name (e.g.
starlight) - Display name and description
- Default install target (typically
src/content) - Theme association
Defaults to the official davidvkimball/vaultcms-presets registry. See Custom preset registries below for using a fork.
install_vaultcms (mutating)
Section titled “install_vaultcms (mutating)”Runs the full install programmatically — equivalent to npx create-vaultcms minus the interactive prompts:
- Downloads the vault config (and optionally a preset zip)
- Copies
_bases/and.obsidian/into the target directory - Fixes paths in
.obsidian/plugins/vault-cms/data.jsonso they’re vault-relative - Adjusts
Home.baseformulas,app.json, and Explorer Focus config based on whether you installed at project root vs.src/content - Updates
.gitignorewith the standard Vault CMS entries
Returns a structured result with modifiedPaths, gitignore action, and the captured installer log.
The tool refuses by default if it detects an existing Obsidian vault without the vault-cms plugin — prevents an agent from silently clobbering an older Obsidian-authored setup. Pass force: true to override after the user explicitly confirms.
What the server intentionally doesn’t do
Section titled “What the server intentionally doesn’t do”- No GUI launches. The interactive CLI offers to open Obsidian after install; the MCP server returns a hint string instead. Reason: agents shouldn’t trigger windows the user didn’t ask for.
- No automatic Git commits. The Git plugin runs locally inside Obsidian; the MCP doesn’t drive it.
- No interactive prompts. Everything is structured args in, structured data out. The agent does the asking.
Custom preset registries
Section titled “Custom preset registries”Both list_presets and install_vaultcms default to davidvkimball/vaultcms-presets, but you can point them at a fork or a private team registry. Three converging override paths (priority order):
- Per-call argument — agent can pass
sourcetolist_presetsorpresets_repotoinstall_vaultcms - CLI flag —
npx create-vaultcms --presets-repo owner/repo - Environment variable —
VAULTCMS_PRESETS_REPO=owner/repo
Format is owner/repo or owner/repo@branch. Branch defaults to master. Examples:
# CLInpx create-vaultcms --presets-repo acme/vaultcms-presets
# Env var (zero-config — once set, all flows pick it up)export VAULTCMS_PRESETS_REPO=acme/vaultcms-presetsnpx create-vaultcms// MCP arg{ "tool": "install_vaultcms", "arguments": { "target_path": "src/content", "template": "myth", "presets_repo": "acme/vaultcms-presets@dev" }}A typical agent flow
Section titled “A typical agent flow”What a good prompt → agent → install loop looks like:
- You: “Set up Vault CMS in my Astro project at
~/sites/blogusing Slate.” - Agent calls
detect_project({ path: "~/sites/blog" })→ confirms Astro, pnpm, no Vault CMS yet, no pre-existing Obsidian setup - Agent calls
list_presets()→ confirmsslateexists, sees it installs atsrc/content - Agent confirms with you: “This is an Astro project using pnpm. I’ll install Vault CMS with the Slate preset at
~/sites/blog/src/content. Proceed?” - You: “Yes.”
- Agent calls
install_vaultcms({ target_path: "~/sites/blog/src/content", template: "slate" })→ returns success with modified paths - Agent tells you: “Done. Open Obsidian → ‘Open folder as vault’ → select
~/sites/blog/src/content. Then run Vault CMS: Open Wizard to finish setup.”
You typed two short messages. The agent handled the rest.
Safety guards
Section titled “Safety guards”install_vaultcmsis mutating — confirm with the user before invoking. The tool description marks it as such, so well-behaved agents will ask first.- Existing Obsidian vault protection — install refuses by default if any
.obsidian/directory exists in the project root,src/content/, or any first-level content collection without the vault-cms plugin. This catches older Obsidian-authored sites that predate the plugin and prevents silent overwrites of workspace, hotkeys, themes, and plugin lists. - Custom registries warn the user — both tool descriptions and the docs explicitly note that custom
presets_repovalues download and execute code from third-party repos.
Verifying it works
Section titled “Verifying it works”A quick sanity check from your shell:
# Should boot, log to stderr, and respond on stdinecho '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"manual","version":"0"}}}' \ | npx -y -p create-vaultcms@latest vaultcms-mcpYou should see vaultcms-mcp <version> ready (stdio) on stderr and a JSON-RPC response on stdout.
Inside the AI tool itself, ask: “Use the vaultcms MCP to detect the project at the current directory.” You should get back a structured JSON snapshot.
Source and reporting issues
Section titled “Source and reporting issues”- npm package:
create-vaultcms - Source: github.com/davidvkimball/vaultcms —
src/mcp.jsandsrc/lib/ - Bundled spec:
MCP.mdinside the package - Issues: GitHub Issues