A lightweight Model Context Protocol (MCP) server for safe Obsidian vault access
TypeScript
1,685
440 commits
updated Oct 9, 2026
A local MCP server that lets compatible clients read, search, and edit notes in an Obsidian vault. MCPVault works directly with vault files, restricts file operations to the configured vault root, and preserves formatting for unchanged frontmatter fields.
Configuration examples are available for Claude Desktop, Claude Code, ChatGPT Desktop (Enterprise+), OpenCode, Gemini CLI, OpenAI Codex, IntelliJ IDEA 2025.1+, Cursor, Windsurf, and Ontheia. Other clients can use MCPVault if they support local stdio MCP servers.
https://github.com/user-attachments/assets/657ac4c6-1cd2-4cc3-829f-fd095a32f71c
Install Node.js runtime:
# Download from https://nodejs.org (v20.0.0 or later)
# or use a package manager like nvm, brew, apt, etc.
Test the server:
If using the published package:
npx @modelcontextprotocol/inspector npx @bitbonsai/mcpvault@latest /path/to/your/vault
Configure your AI client:
Claude Desktop - Copy this to claude_desktop_config.json:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["@bitbonsai/mcpvault@latest", "/path/to/your/vault"]
}
}
}
Claude Code - Copy this to ~/.claude.json:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["@bitbonsai/mcpvault@latest", "/path/to/your/vault"],
"env": {}
}
}
}
OpenCode - Copy this to ~/.config/opencode/opencode.json
{
"mcp": {
"obsidian": {
"type": "local",
"command": [
"npx",
"@bitbonsai/mcpvault@latest",
"/path/to/your/vault/"
],
"enabled": true
}
}
}
Replace /path/to/your/vault with your actual Obsidian vault path.
For other platforms, see detailed configuration guides below.
Test with your AI:
To verify the connection, ask your client to list MCPVault tools or read a known note.
An MCP client starts MCPVault as a local stdio process and passes the vault path. MCPVault exposes the same tools to each supported client, so the server is not tied to one AI provider. Obsidian does not need to be running, and no Obsidian plugin is required.
.obsidian, .git, and node_modules.read_note, write_note, patch_note, delete_note, move_note, move_fileget_note_outline, read_note_lineslist_directory, read_multiple_notessearch_notes with multi-word matching and BM25 rerankingget_frontmatter, update_frontmatter, get_notes_info, get_vault_stats, manage_tags, list_all_tagswiki_link resolves names and returns alternative paths when a name is ambiguouswrite_note supports overwrite, append, and prepend modes.delete_note and move_file require matching confirmation paths.prettyPrint: true for expanded output..md, .markdown, .txt, .base, or .canvas files)npx downloads and runs the package:
npx @bitbonsai/mcpvault@latest /path/to/your/obsidian/vault
If you omit the vault path, the server uses your current working directory as the vault root.
nvm use # Uses Node 24 from .nvmrc
npm install # Corepack automatically uses npm 10.9.0
npx @modelcontextprotocol/inspector npm start /path/to/your/vault
Use MCP Inspector to test the server before adding it to a client:
# Install globally for easier access
npm install -g @modelcontextprotocol/inspector
# Test with any vault
mcp-inspector npx @bitbonsai/mcpvault@latest /path/to/your/vault
End users:
npx @bitbonsai/mcpvault@latest
npx @bitbonsai/mcpvault@latest /path/to/your/obsidian/vault
npx @bitbonsai/mcpvault@latest ./Vault
Developers:
npm start
npm start /path/to/your/obsidian/vault
npm start ./Vault
Add to your Claude Desktop configuration file:
Single Vault:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": [
"@bitbonsai/mcpvault@latest",
"/Users/yourname/Documents/MyVault"
]
}
}
}
Multiple Vaults:
{
"mcpServers": {
"obsidian-personal": {
"command": "npx",
"args": [
"@bitbonsai/mcpvault@latest",
"/Users/yourname/Documents/PersonalVault"
]
},
"obsidian-work": {
"command": "npx",
"args": [
"@bitbonsai/mcpvault@latest",
"/Users/yourname/Documents/WorkVault"
]
}
}
}
Read-only mode:
Add --read-only after the vault path to expose only read tools. Mutating tools are omitted from discovery and rejected if called directly.
{
"mcpServers": {
"obsidian-read-only": {
"command": "npx",
"args": [
"@bitbonsai/mcpvault@latest",
"/Users/yourname/Documents/ResearchVault",
"--read-only"
]
}
}
}
The CLI also accepts --read-only true and --read-only=true for configuration systems that require explicit values. Omit the option, or set it to false, to keep normal read/write access.
Configuration File Locations:
~/Library/Application Support/Claude/claude_desktop_config.jsonC:\Users\{username}\AppData\Roaming\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonYou can also access this through Claude Desktop → Settings → Developer → Edit Config
Requirements: ChatGPT Enterprise, Education, or Team subscription (not available for individual Plus users)
ChatGPT uses MCP through Deep Research and developer mode. Configuration is done through the ChatGPT interface:
Note: ChatGPT Desktop's MCP integration is currently limited to enterprise subscriptions and uses a different setup process than file-based configuration.
Claude Code uses .claude.json configuration file:
User-scoped (recommended): Edit ~/.claude.json:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["@bitbonsai/mcpvault@latest", "/path/to/your/vault"],
"env": {}
}
}
}
Project-scoped: Edit .claude.json in your project or add to the projects section:
{
"projects": {
"/path/to/your/project": {
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["@bitbonsai/mcpvault@latest", "/path/to/your/vault"]
}
}
}
}
}
Using Claude Code CLI:
claude mcp add obsidian --scope user npx @bitbonsai/mcpvault /path/to/your/vault
On Goose Desktop settings, click Add custom extension, and on the command field add:
npx @bitbonsai/mcpvault@latest /path/to/your/vault
Confirmed MCP Support:
Most modern MCP clients use similar JSON configuration patterns. Refer to your specific client's documentation for exact setup instructions.
npm install -g @bitbonsai/mcpvault.obsidian/** patternsRun with error logging:
npx @bitbonsai/mcpvault /path/to/vault 2>debug.log
Run the test suite:
npm test
read_noteRead a note from the vault with parsed frontmatter.
Request:
{
"name": "read_note",
"arguments": {
"path": "project-ideas.md",
"prettyPrint": false
}
}
Compact response:
{
"fm": {
"title": "Project Ideas",
"tags": ["projects", "brainstorming"],
"created": "2023-01-15T10:30:00.000Z"
},
"content": "# Project Ideas\n\n## AI Tools\n- MCP server for Obsidian\n- Voice note transcription\n\n## Web Apps\n- Task management system"
}
Response (with prettyPrint: true):
{
"fm": {
"title": "Project Ideas",
"tags": ["projects", "brainstorming"],
"created": "2023-01-15T10:30:00.000Z"
},
"content": "# Project Ideas\n\n## AI Tools\n- MCP server for Obsidian\n- Voice note transcription\n\n## Web Apps\n- Task management system"
}
write_noteWrite a note to the vault with optional frontmatter and write mode.
Write Modes:
overwrite (default): Replace entire file contentappend: Add content to the end of existing fileprepend: Add content to the beginning of existing fileRequest (Overwrite):
{
"name": "write_note",
"arguments": {
"path": "meeting-notes.md",
"content": "# Team Meeting\n\n## Agenda\n- Project updates\n- Next milestones",
"frontmatter": {
"title": "Team Meeting Notes",
"date": "2023-12-01",
"tags": ["meetings", "team"]
},
"mode": "overwrite"
}
}
Request (Append):
{
"name": "write_note",
"arguments": {
"path": "daily-log.md",
"content": "\n\n## 3:00 PM Update\n- Completed project review\n- Started new feature",
"mode": "append"
}
}
Response:
{
"message": "Successfully wrote note: meeting-notes.md (mode: overwrite)"
}
patch_noteReplace an exact string inside an existing note without rewriting the full file.
Request:
{
"name": "patch_note",
"arguments": {
"path": "meeting-notes.md",
"oldString": "- Next milestones",
"newString": "- Next milestones (owner: Alex)",
"replaceAll": false
}
}
Response (success):
{
"success": true,
"path": "meeting-notes.md",
"message": "Successfully replaced 1 occurrence",
"matchCount": 1
}
Response (multiple matches with replaceAll=false):
{
"success": false,
"path": "meeting-notes.md",
"message": "Found 3 occurrences of the string. Use replaceAll=true to replace all occurrences, or provide a more specific string to match exactly one occurrence.",
"matchCount": 3
}
list_directoryList files and directories in the vault.
Note: this includes non-note filenames (for example pdf, png, jpg) so AI assistants can see vault structure, but note tools like read_note and write_note still operate on note files only (.md, .markdown, .txt, .base, .canvas).
Request:
{
"name": "list_directory",
"arguments": {
"path": "Projects",
"prettyPrint": false
}
}
Compact response:
{
"dirs": ["AI-Tools", "Web-Development"],
"files": ["project-template.md", "roadmap.md"]
}
delete_noteDelete a note from the vault (requires confirmation for safety).
Request:
{
"name": "delete_note",
"arguments": {
"path": "old-draft.md",
"confirmPath": "old-draft.md",
"trashMode": "local"
}
}
Response (Success):
{
"success": true,
"path": "old-draft.md",
"message": "Successfully moved note to vault trash: old-draft.md"
}
Trash modes:
none (default): permanent deletelocal: move to .trash inside the vault, preserving folder structuresystem: move to the OS trash/recycle binResponse (Confirmation Failed):
{
"success": false,
"path": "old-draft.md",
"message": "Deletion cancelled: confirmation path does not match. For safety, both 'path' and 'confirmPath' must be identical."
}
Confirmation: confirmPath must exactly match path before deletion proceeds.
get_frontmatterExtract only the frontmatter from a note without reading the full content.
Request:
{
"name": "get_frontmatter",
"arguments": {
"path": "project-ideas.md",
"prettyPrint": false
}
}
Compact response, returning frontmatter directly:
{
"title": "Project Ideas",
"tags": ["projects", "brainstorming"],
"created": "2023-01-15T10:30:00.000Z"
}
manage_tagsAdd, remove, or list tags in a note. Tags are managed in the frontmatter and inline tags are detected.
Request (List Tags):
{
"name": "manage_tags",
"arguments": {
"path": "research-notes.md",
"operation": "list"
}
}
Request (Add Tags):
{
"name": "manage_tags",
"arguments": {
"path": "research-notes.md",
"operation": "add",
"tags": ["machine-learning", "ai", "important"]
}
}
Request (Remove Tags):
{
"name": "manage_tags",
"arguments": {
"path": "research-notes.md",
"operation": "remove",
"tags": ["draft", "temporary"]
}
}
Response:
{
"path": "research-notes.md",
"operation": "add",
"tags": ["research", "ai", "machine-learning", "important"],
"success": true,
"message": "Successfully added tags"
}
search_notesSearch for notes in the vault by content or frontmatter with multi-word matching and BM25 relevance reranking.
Request:
{
"name": "search_notes",
"arguments": {
"query": "machine learning",
"limit": 5,
"searchContent": true,
"searchFrontmatter": false,
"caseSensitive": false,
"prettyPrint": false
}
}
Compact response:
[
{
"p": "ai-research.md",
"t": "AI Research Notes",
"ex": "...machine learning...",
"mc": 2,
"ln": 15,
"uri": "obsidian://open?vault=MyVault&file=ai-research.md"
}
]
Field names:
p = patht = titleex = excerpt (21 chars context)mc = match countln = line numberuri = Obsidian deep link for quick openingmove_noteMove or rename a note in the vault (.md, .markdown, .txt, .base, .canvas).
Request:
{
"name": "move_note",
"arguments": {
"oldPath": "drafts/article.md",
"newPath": "published/article.md",
"overwrite": false
}
}
Response:
{
"success": true,
"oldPath": "drafts/article.md",
"newPath": "published/article.md",
"message": "Successfully moved note from drafts/article.md to published/article.md"
}
move_fileMove or rename any file in the vault with binary-safe file operations (file-only; not recursive directory moves). For safety, this tool requires confirmation of both source and destination paths.
Request:
{
"name": "move_file",
"arguments": {
"oldPath": "Miro/attachments/Pasted image 20250812140124.png",
"newPath": "assets/images/Pasted image 20250812140124.png",
"confirmOldPath": "Miro/attachments/Pasted image 20250812140124.png",
"confirmNewPath": "assets/images/Pasted image 20250812140124.png",
"overwrite": false
}
}
Response:
{
"success": true,
"oldPath": "Miro/attachments/Pasted image 20250812140124.png",
"newPath": "assets/images/Pasted image 20250812140124.png",
"message": "Successfully moved file from Miro/attachments/Pasted image 20250812140124.png to assets/images/Pasted image 20250812140124.png"
}
Confirmation: confirmOldPath must match oldPath, and confirmNewPath must match newPath.
read_multiple_notesRead multiple notes in a batch (maximum 10 files).
Request:
{
"name": "read_multiple_notes",
"arguments": {
"paths": ["note1.md", "note2.md", "note3.md"],
"includeContent": true,
"includeFrontmatter": true,
"prettyPrint": false
}
}
Compact response:
{
"ok": [
{
"path": "note1.md",
"frontmatter": { "title": "Note 1" },
"content": "# Note 1\n\nContent here..."
}
],
"err": [{ "path": "note2.md", "error": "File not found" }]
}
Field names:
ok = successful readserr = failed readsupdate_frontmatterUpdate frontmatter of a note without changing content.
Request:
{
"name": "update_frontmatter",
"arguments": {
"path": "research-note.md",
"frontmatter": {
"status": "completed",
"updated": "2025-09-23"
},
"merge": true
}
}
Response:
{
"message": "Successfully updated frontmatter for: research-note.md"
}
get_notes_infoGet metadata for notes without reading full content.
Request:
{
"name": "get_notes_info",
"arguments": {
"paths": ["note1.md", "note2.md"],
"prettyPrint": false
}
}
Compact response, returning an array directly:
[
{
"path": "note1.md",
"size": 1024,
"modified": 1695456000000,
"hasFrontmatter": true
}
]
get_vault_statsGet high-level vault statistics without reading note contents.
Request:
{
"name": "get_vault_stats",
"arguments": {
"recentCount": 5,
"prettyPrint": false
}
}
Compact response:
{
"notes": 1248,
"folders": 76,
"size": 18349210,
"recent": [
{
"path": "Daily/2026-02-27.md",
"modified": 1772188800000,
"size": 2814
}
]
}
MCPVault applies these checks before file operations:
.obsidian, .git, node_modules, and system files are filtered.md, .markdown, .txt, .base, and .canvas files are accessible by default--read-only for sensitive vaults; mutating tools are hidden and rejectedOnly grant write access to clients and conversations you trust. Use --read-only when the client does not need to modify notes.
server.ts - MCP server entry pointsrc/frontmatter.ts - YAML frontmatter handling with gray-mattersrc/filesystem.ts - File operations with path validationsrc/pathfilter.ts - Directory and file filteringsrc/search.ts - Note search functionality with content and frontmatter supportsrc/uri.ts - Obsidian URI generation for deep linkssrc/types.ts - TypeScript type definitionsgit checkout -b feature-namenpm testMaintainers: production publishing is driven by GitHub Releases. See RELEASING.md.
MIT
Overall
Maintained
Code review
Contributors
Latest release
Releases this year
135 followers · starred Mar 2026
189 followers · starred Aug 2026
233 followers · starred Feb 2026
1,452 followers · starred Dec 2025
A lightweight Model Context Protocol (MCP) server for safe Obsidian vault access
TypeScript
1,685
440 commits
updated Oct 9, 2026
A local MCP server that lets compatible clients read, search, and edit notes in an Obsidian vault. MCPVault works directly with vault files, restricts file operations to the configured vault root, and preserves formatting for unchanged frontmatter fields.
Configuration examples are available for Claude Desktop, Claude Code, ChatGPT Desktop (Enterprise+), OpenCode, Gemini CLI, OpenAI Codex, IntelliJ IDEA 2025.1+, Cursor, Windsurf, and Ontheia. Other clients can use MCPVault if they support local stdio MCP servers.
https://github.com/user-attachments/assets/657ac4c6-1cd2-4cc3-829f-fd095a32f71c
Install Node.js runtime:
# Download from https://nodejs.org (v20.0.0 or later)
# or use a package manager like nvm, brew, apt, etc.
Test the server:
If using the published package:
npx @modelcontextprotocol/inspector npx @bitbonsai/mcpvault@latest /path/to/your/vault
Configure your AI client:
Claude Desktop - Copy this to claude_desktop_config.json:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["@bitbonsai/mcpvault@latest", "/path/to/your/vault"]
}
}
}
Claude Code - Copy this to ~/.claude.json:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["@bitbonsai/mcpvault@latest", "/path/to/your/vault"],
"env": {}
}
}
}
OpenCode - Copy this to ~/.config/opencode/opencode.json
{
"mcp": {
"obsidian": {
"type": "local",
"command": [
"npx",
"@bitbonsai/mcpvault@latest",
"/path/to/your/vault/"
],
"enabled": true
}
}
}
Replace /path/to/your/vault with your actual Obsidian vault path.
For other platforms, see detailed configuration guides below.
Test with your AI:
To verify the connection, ask your client to list MCPVault tools or read a known note.
An MCP client starts MCPVault as a local stdio process and passes the vault path. MCPVault exposes the same tools to each supported client, so the server is not tied to one AI provider. Obsidian does not need to be running, and no Obsidian plugin is required.
.obsidian, .git, and node_modules.read_note, write_note, patch_note, delete_note, move_note, move_fileget_note_outline, read_note_lineslist_directory, read_multiple_notessearch_notes with multi-word matching and BM25 rerankingget_frontmatter, update_frontmatter, get_notes_info, get_vault_stats, manage_tags, list_all_tagswiki_link resolves names and returns alternative paths when a name is ambiguouswrite_note supports overwrite, append, and prepend modes.delete_note and move_file require matching confirmation paths.prettyPrint: true for expanded output..md, .markdown, .txt, .base, or .canvas files)npx downloads and runs the package:
npx @bitbonsai/mcpvault@latest /path/to/your/obsidian/vault
If you omit the vault path, the server uses your current working directory as the vault root.
nvm use # Uses Node 24 from .nvmrc
npm install # Corepack automatically uses npm 10.9.0
npx @modelcontextprotocol/inspector npm start /path/to/your/vault
Use MCP Inspector to test the server before adding it to a client:
# Install globally for easier access
npm install -g @modelcontextprotocol/inspector
# Test with any vault
mcp-inspector npx @bitbonsai/mcpvault@latest /path/to/your/vault
End users:
npx @bitbonsai/mcpvault@latest
npx @bitbonsai/mcpvault@latest /path/to/your/obsidian/vault
npx @bitbonsai/mcpvault@latest ./Vault
Developers:
npm start
npm start /path/to/your/obsidian/vault
npm start ./Vault
Add to your Claude Desktop configuration file:
Single Vault:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": [
"@bitbonsai/mcpvault@latest",
"/Users/yourname/Documents/MyVault"
]
}
}
}
Multiple Vaults:
{
"mcpServers": {
"obsidian-personal": {
"command": "npx",
"args": [
"@bitbonsai/mcpvault@latest",
"/Users/yourname/Documents/PersonalVault"
]
},
"obsidian-work": {
"command": "npx",
"args": [
"@bitbonsai/mcpvault@latest",
"/Users/yourname/Documents/WorkVault"
]
}
}
}
Read-only mode:
Add --read-only after the vault path to expose only read tools. Mutating tools are omitted from discovery and rejected if called directly.
{
"mcpServers": {
"obsidian-read-only": {
"command": "npx",
"args": [
"@bitbonsai/mcpvault@latest",
"/Users/yourname/Documents/ResearchVault",
"--read-only"
]
}
}
}
The CLI also accepts --read-only true and --read-only=true for configuration systems that require explicit values. Omit the option, or set it to false, to keep normal read/write access.
Configuration File Locations:
~/Library/Application Support/Claude/claude_desktop_config.jsonC:\Users\{username}\AppData\Roaming\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonYou can also access this through Claude Desktop → Settings → Developer → Edit Config
Requirements: ChatGPT Enterprise, Education, or Team subscription (not available for individual Plus users)
ChatGPT uses MCP through Deep Research and developer mode. Configuration is done through the ChatGPT interface:
Note: ChatGPT Desktop's MCP integration is currently limited to enterprise subscriptions and uses a different setup process than file-based configuration.
Claude Code uses .claude.json configuration file:
User-scoped (recommended): Edit ~/.claude.json:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["@bitbonsai/mcpvault@latest", "/path/to/your/vault"],
"env": {}
}
}
}
Project-scoped: Edit .claude.json in your project or add to the projects section:
{
"projects": {
"/path/to/your/project": {
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["@bitbonsai/mcpvault@latest", "/path/to/your/vault"]
}
}
}
}
}
Using Claude Code CLI:
claude mcp add obsidian --scope user npx @bitbonsai/mcpvault /path/to/your/vault
On Goose Desktop settings, click Add custom extension, and on the command field add:
npx @bitbonsai/mcpvault@latest /path/to/your/vault
Confirmed MCP Support:
Most modern MCP clients use similar JSON configuration patterns. Refer to your specific client's documentation for exact setup instructions.
npm install -g @bitbonsai/mcpvault.obsidian/** patternsRun with error logging:
npx @bitbonsai/mcpvault /path/to/vault 2>debug.log
Run the test suite:
npm test
read_noteRead a note from the vault with parsed frontmatter.
Request:
{
"name": "read_note",
"arguments": {
"path": "project-ideas.md",
"prettyPrint": false
}
}
Compact response:
{
"fm": {
"title": "Project Ideas",
"tags": ["projects", "brainstorming"],
"created": "2023-01-15T10:30:00.000Z"
},
"content": "# Project Ideas\n\n## AI Tools\n- MCP server for Obsidian\n- Voice note transcription\n\n## Web Apps\n- Task management system"
}
Response (with prettyPrint: true):
{
"fm": {
"title": "Project Ideas",
"tags": ["projects", "brainstorming"],
"created": "2023-01-15T10:30:00.000Z"
},
"content": "# Project Ideas\n\n## AI Tools\n- MCP server for Obsidian\n- Voice note transcription\n\n## Web Apps\n- Task management system"
}
write_noteWrite a note to the vault with optional frontmatter and write mode.
Write Modes:
overwrite (default): Replace entire file contentappend: Add content to the end of existing fileprepend: Add content to the beginning of existing fileRequest (Overwrite):
{
"name": "write_note",
"arguments": {
"path": "meeting-notes.md",
"content": "# Team Meeting\n\n## Agenda\n- Project updates\n- Next milestones",
"frontmatter": {
"title": "Team Meeting Notes",
"date": "2023-12-01",
"tags": ["meetings", "team"]
},
"mode": "overwrite"
}
}
Request (Append):
{
"name": "write_note",
"arguments": {
"path": "daily-log.md",
"content": "\n\n## 3:00 PM Update\n- Completed project review\n- Started new feature",
"mode": "append"
}
}
Response:
{
"message": "Successfully wrote note: meeting-notes.md (mode: overwrite)"
}
patch_noteReplace an exact string inside an existing note without rewriting the full file.
Request:
{
"name": "patch_note",
"arguments": {
"path": "meeting-notes.md",
"oldString": "- Next milestones",
"newString": "- Next milestones (owner: Alex)",
"replaceAll": false
}
}
Response (success):
{
"success": true,
"path": "meeting-notes.md",
"message": "Successfully replaced 1 occurrence",
"matchCount": 1
}
Response (multiple matches with replaceAll=false):
{
"success": false,
"path": "meeting-notes.md",
"message": "Found 3 occurrences of the string. Use replaceAll=true to replace all occurrences, or provide a more specific string to match exactly one occurrence.",
"matchCount": 3
}
list_directoryList files and directories in the vault.
Note: this includes non-note filenames (for example pdf, png, jpg) so AI assistants can see vault structure, but note tools like read_note and write_note still operate on note files only (.md, .markdown, .txt, .base, .canvas).
Request:
{
"name": "list_directory",
"arguments": {
"path": "Projects",
"prettyPrint": false
}
}
Compact response:
{
"dirs": ["AI-Tools", "Web-Development"],
"files": ["project-template.md", "roadmap.md"]
}
delete_noteDelete a note from the vault (requires confirmation for safety).
Request:
{
"name": "delete_note",
"arguments": {
"path": "old-draft.md",
"confirmPath": "old-draft.md",
"trashMode": "local"
}
}
Response (Success):
{
"success": true,
"path": "old-draft.md",
"message": "Successfully moved note to vault trash: old-draft.md"
}
Trash modes:
none (default): permanent deletelocal: move to .trash inside the vault, preserving folder structuresystem: move to the OS trash/recycle binResponse (Confirmation Failed):
{
"success": false,
"path": "old-draft.md",
"message": "Deletion cancelled: confirmation path does not match. For safety, both 'path' and 'confirmPath' must be identical."
}
Confirmation: confirmPath must exactly match path before deletion proceeds.
get_frontmatterExtract only the frontmatter from a note without reading the full content.
Request:
{
"name": "get_frontmatter",
"arguments": {
"path": "project-ideas.md",
"prettyPrint": false
}
}
Compact response, returning frontmatter directly:
{
"title": "Project Ideas",
"tags": ["projects", "brainstorming"],
"created": "2023-01-15T10:30:00.000Z"
}
manage_tagsAdd, remove, or list tags in a note. Tags are managed in the frontmatter and inline tags are detected.
Request (List Tags):
{
"name": "manage_tags",
"arguments": {
"path": "research-notes.md",
"operation": "list"
}
}
Request (Add Tags):
{
"name": "manage_tags",
"arguments": {
"path": "research-notes.md",
"operation": "add",
"tags": ["machine-learning", "ai", "important"]
}
}
Request (Remove Tags):
{
"name": "manage_tags",
"arguments": {
"path": "research-notes.md",
"operation": "remove",
"tags": ["draft", "temporary"]
}
}
Response:
{
"path": "research-notes.md",
"operation": "add",
"tags": ["research", "ai", "machine-learning", "important"],
"success": true,
"message": "Successfully added tags"
}
search_notesSearch for notes in the vault by content or frontmatter with multi-word matching and BM25 relevance reranking.
Request:
{
"name": "search_notes",
"arguments": {
"query": "machine learning",
"limit": 5,
"searchContent": true,
"searchFrontmatter": false,
"caseSensitive": false,
"prettyPrint": false
}
}
Compact response:
[
{
"p": "ai-research.md",
"t": "AI Research Notes",
"ex": "...machine learning...",
"mc": 2,
"ln": 15,
"uri": "obsidian://open?vault=MyVault&file=ai-research.md"
}
]
Field names:
p = patht = titleex = excerpt (21 chars context)mc = match countln = line numberuri = Obsidian deep link for quick openingmove_noteMove or rename a note in the vault (.md, .markdown, .txt, .base, .canvas).
Request:
{
"name": "move_note",
"arguments": {
"oldPath": "drafts/article.md",
"newPath": "published/article.md",
"overwrite": false
}
}
Response:
{
"success": true,
"oldPath": "drafts/article.md",
"newPath": "published/article.md",
"message": "Successfully moved note from drafts/article.md to published/article.md"
}
move_fileMove or rename any file in the vault with binary-safe file operations (file-only; not recursive directory moves). For safety, this tool requires confirmation of both source and destination paths.
Request:
{
"name": "move_file",
"arguments": {
"oldPath": "Miro/attachments/Pasted image 20250812140124.png",
"newPath": "assets/images/Pasted image 20250812140124.png",
"confirmOldPath": "Miro/attachments/Pasted image 20250812140124.png",
"confirmNewPath": "assets/images/Pasted image 20250812140124.png",
"overwrite": false
}
}
Response:
{
"success": true,
"oldPath": "Miro/attachments/Pasted image 20250812140124.png",
"newPath": "assets/images/Pasted image 20250812140124.png",
"message": "Successfully moved file from Miro/attachments/Pasted image 20250812140124.png to assets/images/Pasted image 20250812140124.png"
}
Confirmation: confirmOldPath must match oldPath, and confirmNewPath must match newPath.
read_multiple_notesRead multiple notes in a batch (maximum 10 files).
Request:
{
"name": "read_multiple_notes",
"arguments": {
"paths": ["note1.md", "note2.md", "note3.md"],
"includeContent": true,
"includeFrontmatter": true,
"prettyPrint": false
}
}
Compact response:
{
"ok": [
{
"path": "note1.md",
"frontmatter": { "title": "Note 1" },
"content": "# Note 1\n\nContent here..."
}
],
"err": [{ "path": "note2.md", "error": "File not found" }]
}
Field names:
ok = successful readserr = failed readsupdate_frontmatterUpdate frontmatter of a note without changing content.
Request:
{
"name": "update_frontmatter",
"arguments": {
"path": "research-note.md",
"frontmatter": {
"status": "completed",
"updated": "2025-09-23"
},
"merge": true
}
}
Response:
{
"message": "Successfully updated frontmatter for: research-note.md"
}
get_notes_infoGet metadata for notes without reading full content.
Request:
{
"name": "get_notes_info",
"arguments": {
"paths": ["note1.md", "note2.md"],
"prettyPrint": false
}
}
Compact response, returning an array directly:
[
{
"path": "note1.md",
"size": 1024,
"modified": 1695456000000,
"hasFrontmatter": true
}
]
get_vault_statsGet high-level vault statistics without reading note contents.
Request:
{
"name": "get_vault_stats",
"arguments": {
"recentCount": 5,
"prettyPrint": false
}
}
Compact response:
{
"notes": 1248,
"folders": 76,
"size": 18349210,
"recent": [
{
"path": "Daily/2026-02-27.md",
"modified": 1772188800000,
"size": 2814
}
]
}
MCPVault applies these checks before file operations:
.obsidian, .git, node_modules, and system files are filtered.md, .markdown, .txt, .base, and .canvas files are accessible by default--read-only for sensitive vaults; mutating tools are hidden and rejectedOnly grant write access to clients and conversations you trust. Use --read-only when the client does not need to modify notes.
server.ts - MCP server entry pointsrc/frontmatter.ts - YAML frontmatter handling with gray-mattersrc/filesystem.ts - File operations with path validationsrc/pathfilter.ts - Directory and file filteringsrc/search.ts - Note search functionality with content and frontmatter supportsrc/uri.ts - Obsidian URI generation for deep linkssrc/types.ts - TypeScript type definitionsgit checkout -b feature-namenpm testMaintainers: production publishing is driven by GitHub Releases. See RELEASING.md.
MIT
Overall
Maintained
Code review
Contributors
Latest release
Releases this year
135 followers · starred Mar 2026
189 followers · starred Aug 2026
233 followers · starred Feb 2026
1,452 followers · starred Dec 2025