### Install and Test MCPVault with MCP Inspector Source: https://mcpvault.org/install Install the MCP Inspector globally and use it to test MCPVault functionality. ```bash npm install -g @modelcontextprotocol/inspector mcp-inspector npx @bitbonsai/mcpvault@latest /path/to/vault ``` -------------------------------- ### Example Git Sync Conversation Source: https://mcpvault.org/skill This illustrates a user interaction for initiating a Git sync. The skill confirms the process, performs preflight checks, and executes the sync sequence. ```text User: Use git to store my vault and keep it synced. Skill: I will run a git preflight first (git, repo, identity, remote), then set up anything missing with one targeted question. Skill: Preflight OK. Running sync: git add -A -> git commit (if changes) -> git pull --rebase -> git push. Skill: Done. Vault synced to origin/main. No force push used. ``` -------------------------------- ### Git Preflight Checks Source: https://mcpvault.org/skill These commands verify the Git environment before initiating a sync. Ensure Git is installed, the current directory is a Git repository, and a remote origin is configured. ```bash git --version git rev-parse --is-inside-work-tree git config user.name git config user.email git remote -v ``` -------------------------------- ### Install Obsidian Skill Source: https://mcpvault.org/skill Use this command to add the Obsidian Skill to your project. Ensure you have npx installed. ```bash npx skills add bitbonsai/mcpvault ``` -------------------------------- ### Configure MCPVault in OpenCode Config File Source: https://mcpvault.org/install Add this JSON configuration to your opencode.json file for project-specific or global setup. ```json { "$schema": "https://opencode.ai/config.json", "mcp": { "obsidian": { "type": "local", "command": ["npx", "-y", "@bitbonsai/mcpvault@latest", "/path/to/your/vault"] } } } ``` -------------------------------- ### Configure MCPVault for OpenAI Codex (TOML) Source: https://mcpvault.org/install Add this TOML configuration to set up MCPVault with OpenAI Codex. ```toml [mcp_servers.obsidian] command = "npx" args = ["-y", "@bitbonsai/mcpvault@latest", "/path/to/your/vault"] ``` -------------------------------- ### Add MCPVault via OpenCode CLI (Interactive) Source: https://mcpvault.org/install Run this command to interactively add MCPVault through the OpenCode CLI. ```bash opencode mcp add ``` -------------------------------- ### Configure MCPVault for Claude Desktop / ChatGPT+ Source: https://mcpvault.org/install Add this JSON configuration to your MCP configuration file to integrate MCPVault with Claude Desktop or ChatGPT+. ```json { "mcpServers": { "obsidian": { "command": "npx", "args": ["@bitbonsai/mcpvault@latest", "/path/to/your/vault"] } } } ``` -------------------------------- ### SKILL.md Frontmatter Configuration Source: https://mcpvault.org/skill Specifies the frontmatter configuration for the SKILL.md file, including the skill's name, description, version, and author. This metadata is crucial for skill activation and routing. ```yaml --- name: obsidian description: > Activate when the user mentions their Obsidian vault, notes, tags, frontmatter, daily notes, backup, or sync. Route operations across MCP, Obsidian CLI/app actions, and git sync with safe defaults. metadata: version: "2.0" author: bitbonsai --- ``` -------------------------------- ### Create a New Note Atomically Source: https://mcpvault.org/demo Use `write_note` to create new Markdown files with specified content and formatting. The operation is atomic, ensuring the file is created correctly. ```json { "path": "Meetings/Team Sync.md", "content": "# Team Sync\n\n- Discussed Q1 goals\n- Action items assigned" } ``` -------------------------------- ### Configure MCPVault in no-path mode (JSON) Source: https://mcpvault.org/install Use this JSON snippet for configuration when MCPVault is run from within the vault directory, omitting the path argument. ```json "args": ["@bitbonsai/mcpvault@latest"] ``` -------------------------------- ### Recommended .gitignore for Obsidian Vault Source: https://mcpvault.org/skill This .gitignore configuration helps prevent unnecessary files, such as workspace configurations and plugin data, from being tracked by Git. ```gitignore .obsidian/workspace.json .obsidian/workspace-mobile.json .obsidian/plugins/obsidian-git/data.json .trash/ ``` -------------------------------- ### Run MCPVault in no-path mode (CLI) Source: https://mcpvault.org/install Execute this command if your client launches MCPVault from within the vault directory, omitting the explicit path. ```bash npx @bitbonsai/mcpvault@latest ``` -------------------------------- ### Automate Git Sync for Obsidian Vault Source: https://mcpvault.org/skill Use this script as a cron job or launchd plist for headless Git synchronization of your Obsidian vault. Ensure you are in the vault directory before executing. ```bash # cron job or launchd plist cd /path/to/vault git add -A git commit -m "backup $(date +%Y-%m-%d)" git push ``` -------------------------------- ### Add MCPVault via Gemini CLI Source: https://mcpvault.org/install Use this command to add MCPVault to your Gemini CLI configuration. ```bash gemini mcp add obsidian -- npx @bitbonsai/mcpvault@latest /path/to/your/vault ``` -------------------------------- ### Add MCPVault via Claude Code CLI Source: https://mcpvault.org/install Use this command to add MCPVault to your Claude Code configuration with user scope. ```bash claude mcp add-json obsidian --scope user '{"type":"stdio","command":"npx","args":["@bitbonsai/mcpvault@latest","/path/to/your/vault"]}' ``` -------------------------------- ### Read and Summarize Multiple Notes Source: https://mcpvault.org/demo Use `read_multiple_notes` to process content from several Markdown files in a single request, enabling AI to analyze and summarize information across documents. ```json { "paths": [ "Reading/The Phoenix Project.md", "Reading/Atomic Habits.md", "Reading/Deep Work.md" ] } ``` -------------------------------- ### Skill Folder Structure Source: https://mcpvault.org/skill Defines the expected directory structure for the Obsidian skill within the .claude/skills/ directory. Includes key files for configuration, error handling, and resource management. ```tree .claude/ skills/ obsidian/ SKILL.md # Gotchas, error recovery, index resources/ tool-patterns.md # Per-tool response shapes and recipes obsidian-conventions.md # Vault structure, wikilinks, tags git-sync.md # Git backup/sync workflows ``` -------------------------------- ### Efficiently Patch a Note Section Source: https://mcpvault.org/demo Use `patch_note` to update specific sections of a Markdown file without rewriting the entire content. This is significantly faster for small changes. ```json { "path": "Physics/Relativity.md", "oldString": "## Energy and Mass", "newString": "## Energy and Mass\n\nE = mc²" } ``` -------------------------------- ### Update Note Frontmatter Source: https://mcpvault.org/how-it-works Use this to update YAML frontmatter for a note. It safely merges new fields with existing ones, preserving the raw formatting of unmodified keys. ```json { "path": "Projects/Website Redesign.md", "frontmatter": { "status": "completed", "completed": "2025-01-20" } } ``` -------------------------------- ### Search Notes Content Source: https://mcpvault.org/demo Use `search_notes` to find specific text within your notes. The response is token-optimized with minified field names for efficiency. ```json { "query": "React hooks", "limit": 10 } ``` ```json [ { "p": "Development/React Best Practices.md", "t": "React Best Practices", "ex": "...State **React hooks** provide...", "mc": 8, "ln": 42 }, { "p": "Learning/Modern JavaScript.md", "t": "Modern JavaScript", "ex": "...useEffect are common **React hooks**...", "mc": 3, "ln": 156 } ] ``` -------------------------------- ### Update Note Frontmatter Source: https://mcpvault.org/demo Use `update_frontmatter` to modify YAML frontmatter in a Markdown file. Existing fields are preserved, and the note's main content remains untouched. ```json { "path": "Projects/Website Redesign.md", "frontmatter": { "tags": ["project", "web-design", "priority-high"], "status": "in-progress", "created": "2025-01-15", "updated": "2025-01-20" } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.