AutomationOpen SourceFreeActiveMachine-verified· intermediate · ~15 min setup

Obsidian × MCPVault: The Vault Health Check

A monthly, scheduled audit that finds orphan notes, stale info, and inconsistent tags before your vault rots.

by Shilpa Mitra· verified 13d ago· v1.0.0

Run this workflow

CI-verified, 4/4 fixtures passing.

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.x

Side 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. 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. 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 13d ago
  • config-validcontainstimeout 30s · max $0

    Expected: config OK: npx -> @bitbonsai/mcpvault

  • script-readycontainstimeout 30s · max $0

    Expected: script ready: bin/vault-health-check.sh

  • cron-okcontainstimeout 30s · max $0

    Expected: cron OK: 1st of month at 09:00

  • clean-exitexit_codetimeout 30s · max $0

    Expected: 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.

Liked this workflow?

Get new verified workflows in WebAfterAI, three issues a week (Tue, Thu, Sat).