Obsidian × MCPVault: The Vault Health Check
A monthly, scheduled audit that finds orphan notes, stale info, and inconsistent tags before your vault rots.
Run this workflow
CI-verified, 4/4 fixtures passing.
Build this with your agent
One copy-paste hands Claude Code, Codex, or Cursor the full recipe, steps included, nothing to fetch.
Intended Use
Anyone who wants Claude Code to run a monthly vault audit on a cron, using MCPVault's get_vault_stats / search_notes / get_frontmatter to flag orphans, stale notes, and missing frontmatter into a fix-it checklist.
Not for
- Vaults you don't maintain (nothing to audit)
- Anyone who hasn't backed up their vault
The Stack
Tested Against
mcpvault@latestclaude-codebash@5.xobsidian@1.7.xSide effects & data flow
- Network
- Anthropic API, only in the non-CI Claude step
- Writes
- ./vault/Maintenance/, ~/bin/vault-health-check.sh
- Credentials
- Claude Code login, for the audit step only
Data privacy
- Anthropic (Claude), only in the non-CI agent step ← your vault stats and note metadata (retention: per Anthropic's API/data policy)
Prerequisites
- Claude Code, and register MCPVault: `claude mcp add obsidian --scope user npx @bitbonsai/mcpvault /Users/you/Documents/MyVault`
- Node 20+ (MCPVault runs via npx)
- cron (built into macOS/Linux)
- Back up your vault first (git ideal)
Steps
- 1
Validate config, write the scheduled script, check the cron
CI validates the MCPVault config, writes the exact vault-health-check.sh from the guide (executable, carrying the claude -p call), scaffolds Maintenance/, and confirms the monthly cron line is well-formed.
cat > claude_desktop_config.json <<'EOF' { "mcpServers": { "obsidian": { "command": "npx", "args": ["@bitbonsai/mcpvault@latest", "/Users/you/Documents/MyVault"] } } } EOF node -e 'const c=JSON.parse(require("fs").readFileSync("claude_desktop_config.json","utf8"));const o=c.mcpServers.obsidian;if(o.command==="npx"&&o.args.some(a=>a.indexOf("@bitbonsai/mcpvault")===0)){console.log("config OK: npx -> @bitbonsai/mcpvault")}else{console.log("BAD");process.exit(1)}' mkdir -p vault/Maintenance bin cat > bin/vault-health-check.sh <<'EOF' #!/usr/bin/env bash claude -p "Audit my Obsidian vault using the obsidian MCP tools. Find orphan notes with no incoming links, notes whose information looks outdated, projects with no update in 2 weeks, tags used inconsistently, and notes missing expected frontmatter fields. Write the findings to Maintenance/$(date +%F)-health-check.md as a fix-it checklist." EOF chmod +x bin/vault-health-check.sh test -x bin/vault-health-check.sh && grep -q 'claude -p' bin/vault-health-check.sh && echo "script ready: bin/vault-health-check.sh" echo "0 9 1 * * /Users/you/bin/vault-health-check.sh" | grep -Eq '^0 9 1 \* \* ' && echo "cron OK: 1st of month at 09:00" - 2
Schedule and run (the Claude step, not checked by CI)
Add `0 9 1 * * ~/bin/vault-health-check.sh` to crontab. Claude Code, with MCPVault registered, leans on get_vault_stats / search_notes / get_frontmatter / get_notes_info to spot the rot and writes a checklist. The audit runs a model, so CI doesn't run it.
Eval, 4 fixtures
Last passed: verified todayconfig-validcontainstimeout 30s · max $0Expected:
config OK: npx -> @bitbonsai/mcpvaultscript-readycontainstimeout 30s · max $0Expected:
script ready: bin/vault-health-check.shcron-okcontainstimeout 30s · max $0Expected:
cron OK: 1st of month at 09:00clean-exitexit_codetimeout 30s · max $0Expected:
0
Results
The scheduled audit from the WebAfterAI Part 2 guide.
Did this work for you?
Our CI checks the setup runs. You tell us if the whole thing worked. Tell us straight.
Related workflows
- One AGENTS.md, no drift: prove CLAUDE.md is a real symlink and the generated files are in sync
- One shared memory for every coding agent: prove the configs actually point at the same server
- Self-hosting the open-source stack? Prove your backup actually restores before you need it
- Chat with a CSV, but pin a known-answer guardrail so a wrong query cannot pass
- Advisor pattern: cap how often the expensive model gets called, and catch drift
- Route through a gateway with a tested open-weights fallback
Liked this workflow?
Get new verified workflows in WebAfterAI, three issues a week (Tue, Thu, Sat).