Obsidian MCP Server
Enables seamless interaction with Obsidian vaults to perform file operations, search content, manage metadata, and execute UI commands such as opening the graph view or specific files via the Local REST API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Obsidian MCP Server search for all notes tagged with #research in my personal vault"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Obsidian MCP Server
Enables MCP clients (e.g., Claude Desktop) to interact with Obsidian vaults seamlessly.
Features
Multi-Vault Support: Access unlimited Obsidian vaults without per-vault configuration
Auto-Discovery: Automatically discovers REST API credentials from plugin configuration
Concurrent-Safe: File locking prevents data corruption during simultaneous access
Hybrid Access: Filesystem operations (always available) + REST API integration (optional)
Security-First: Path validation, rate limiting, command allowlist, and secure credential handling
Zero-Config: Works immediately with filesystem access; REST API features activate when plugin is installed
Related MCP server: obsidian-cli-mcp
Installation
From Source (Current)
Currently, installation from source is required:
git clone <repository-url>
cd obsidian-mcp-server
npm install
npm run buildVia NPM (Coming Soon)
Once published to npm, you'll be able to install globally:
npm install -g obsidian-mcp-serverNote: The package is not yet published. Use "From Source" installation for now.
Quick Start
1. Basic Setup (Filesystem Access Only)
The server automatically detects and configures your Obsidian vaults on first run! No manual configuration needed.
What happens automatically:
Config file is created at
~/.config/mcp-obsidian/config.json(macOS/Linux) or%APPDATA%/mcp-obsidian/config.json(Windows)Server scans common locations (Documents, Dropbox, iCloud, etc.) for Obsidian vaults
Discovered vault paths are automatically added to the configuration
Ready to use immediately!
Common locations scanned:
~/Documents/Obsidian~/Dropboxand subdirectories~/Library/CloudStorage/Dropbox(macOS)~/Library/Mobile Documents/iCloud~md~obsidian(macOS)~/OneDrive/Documents/Obsidian(Windows)
Note: You can override the config location by setting the MCP_OBSIDIAN_CONFIG environment variable.
This enables immediate access to all discovered vaults using filesystem operations.
2. Enable REST API Features (Optional)
Install the Obsidian Local REST API plugin in your vault:
Open Obsidian Settings → Community Plugins
Browse and install "Local REST API"
Enable the plugin
The plugin will generate an API key automatically
No additional configuration needed - the server will auto-discover the credentials.
3. Connect to Claude
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"obsidian": {
"command": "node",
"args": ["/path/to/obsidian-mcp-server/dist/index.js"]
}
}
}Note: The env section is optional. If omitted, the server uses the default config location (~/.config/mcp-obsidian/config.json). Only add it if you want to use a custom config path:
{
"mcpServers": {
"obsidian": {
"command": "node",
"args": ["/path/to/obsidian-mcp-server/dist/index.js"],
"env": {
"MCP_OBSIDIAN_CONFIG": "/custom/path/to/config.json"
}
}
}
}Restart Claude Desktop.
Configuration
Most users don't need to configure anything! The server auto-detects your vaults on first run.
Manual Configuration (Optional)
If you need to customize settings or add vaults in non-standard locations, edit ~/.config/mcp-obsidian/config.json:
Minimal Configuration:
{
"defaultVaultPath": "/Users/yourname/Documents/Obsidian"
}Full Configuration:
See config.example.json for a complete configuration with all options:
defaultVaultPath: Base directory containing your vaults
vaults: Named vault mappings for easy access
security: Path restrictions, rate limits, allowed hosts/ports
features: File locking, caching, file watching settings
logging: Log level and sensitive data sanitization
Named Vaults
For easier access, define named vaults in your config:
{
"defaultVaultPath": "/Users/yourname/Documents/Obsidian",
"vaults": {
"personal": "PersonalVault",
"work": "WorkVault"
}
}Then reference them by name in Claude: "vault": "personal" instead of full paths.
Available Tools
File Operations
list_vaults: List all accessible vaults
get_vault_info: Get vault metadata (file count, plugin status)
list_files: List files in a vault (supports recursive, hidden files)
get_file: Read file content with optional frontmatter parsing
write_file: Write or update files with conflict detection
append_content: Append content to existing files
search_files: Search with regex, case sensitivity, context
get_metadata: Extract frontmatter, tags, links, word count
Obsidian Integration (Requires REST API Plugin)
execute_command: Execute whitelisted Obsidian commands
open_file: Open files in Obsidian UI
get_active_file: Get currently active file
open_graph: Open graph view
Allowed Commands
For security, only these Obsidian commands are allowed:
graph:open,graph:open-localeditor:toggle-sourceapp:go-back,app:go-forwardglobal-search:openworkspace:new-file,file-explorer:reveal-active-fileworkspace:split-vertical,workspace:split-horizontal
Testing
Test with Claude Desktop
Restart Claude Desktop after configuration
Open a conversation and try:
List my Obsidian vaultsExpected response: List of discovered vaults with metadata.
Read the file "Daily Notes/2026-01-14.md" from my Personal vaultExpected response: File content with metadata.
Search for "project" in my Work vaultExpected response: Search results with context.
Test with MCP Inspector
npx @modelcontextprotocol/inspector dist/index.jsThis opens a web interface to test all tools interactively.
Verify File Locking
Open a file in Obsidian and simultaneously have Claude read/write it. The server will handle concurrent access safely with file locking.
Verify Auto-Discovery
Install the REST API plugin in a vault, then:
Get info about my Personal vaultExpected response should include "hasRestApi": true and "pluginVersion": "1.x.x".
Architecture
Hybrid Provider System
Operation Request
↓
Router Decision
↓
┌───┴───┐
↓ ↓
Filesystem REST API
Provider Provider
↓ ↓
Direct Plugin
File I/O CommandsFilesystem Provider: Always available, handles read/write/search
REST API Provider: Optional, handles UI integration and commands
Operation Router: Intelligently selects the appropriate provider
Security Layers
Path Validation: Prevents directory traversal, validates symlinks
Rate Limiting: Global, per-vault, and per-operation limits
Command Allowlist: Only whitelisted Obsidian commands allowed
Credential Security: Memory-only cache, no disk serialization
Concurrent Access Handling
File Locking: Read locks (shared) and write locks (exclusive)
Conflict Detection: Timestamp verification before writes
Atomic Writes: Write to temp file, then rename
Lock Timeout: Automatic cleanup of expired locks
Troubleshooting
Vaults Not Found
Problem: list_vaults returns empty array
Solutions:
First check: Restart Claude Desktop to trigger auto-detection
Verify
defaultVaultPathin config points to correct directoryEnsure vaults have
.obsidiandirectory (valid Obsidian vaults)Check
security.allowedVaultPathsincludes the vault locationIf your vaults are in a non-standard location, manually add the path to
allowedVaultPathsin the config
REST API Features Not Working
Problem: "REST API required but plugin not installed"
Solutions:
Install "Local REST API" plugin in Obsidian
Enable the plugin in Obsidian settings
Verify plugin created
data.jsonin.obsidian/plugins/obsidian-local-rest-api/Clear credential cache: restart the MCP server
File Lock Timeout
Problem: "Could not acquire write lock"
Solutions:
Close files in Obsidian that are being edited
Wait for ongoing operations to complete
Increase
features.fileLocking.timeoutin configCheck for stuck locks: restart the server
Rate Limit Exceeded
Problem: "Rate limit exceeded"
Solutions:
Wait before retrying
Increase rate limits in config if legitimate usage
Check for loops in your Claude interactions
Permission Denied
Problem: "Vault path not in allowed directories"
Solutions:
First try: Delete
~/.config/mcp-obsidian/config.jsonand restart to trigger auto-detectionManually add vault path to
security.allowedVaultPathsin the configUse absolute paths, not relative paths
Check symlink targets are also in allowed paths
Ensure the path exists and is accessible
Security Considerations
Threat Model
This server operates locally and assumes:
The local machine is trusted
Claude Desktop is trusted
Only you have access to the MCP server process
Protections Implemented
Path Traversal Prevention: Rejects
..and~patterns, validates all pathsAPI Key Security: Credentials stored only in memory, never logged
Command Injection Prevention: Explicit allowlist of safe commands only
Rate Limiting: Prevents abuse and DoS scenarios
Symlink Validation: Resolves and validates symlink targets
Host/Port Validation: Only localhost connections allowed
What This Does NOT Protect Against
Malicious code in your Obsidian vault (markdown files can't execute code)
Attacks on Obsidian itself
Physical access to your machine
Compromised Claude Desktop application
Development
Build
npm run buildWatch Mode
npm run watchRun Tests
npm testLint
npm run lintContributing
Contributions welcome! Please:
Follow existing code style (TypeScript, ESLint, Prettier)
Add tests for new features
Update documentation
Ensure security best practices
License
MIT
Support
For issues, questions, or feature requests, please open an issue on the repository.
Credits
Built with:
gray-matter for frontmatter parsing
axios for HTTP requests
Available Tools
12 toolsappend_contentC
Append content to an existing file
Inputs: vault (required), filepath (required), content (required).
execute_commandC
Execute an Obsidian command (requires REST API plugin)
Inputs: vault (required), commandId (required), args.
get_active_fileB
Get the currently active file in Obsidian (requires REST API plugin)
Inputs: vault (required).
get_fileC
Read a file from a vault
Inputs: vault (required), filepath (required), parseFrontmatter.
get_metadataB
Get metadata for a file (frontmatter, tags, links, word count)
Inputs: vault (required), filepath (required).
get_vault_infoC
Get information about a specific vault
Inputs: vault (required).
list_filesC
List files in a vault
Inputs: vault (required), path, recursive, includeHidden.
list_vaultsB
List all accessible Obsidian vaults
Inputs: no named parameters.
open_fileC
Open a file in Obsidian UI (requires REST API plugin)
Inputs: vault (required), filepath (required).
open_graphC
Open graph view in Obsidian (requires REST API plugin)
Inputs: vault (required).
search_filesC
Search for text in vault files
Inputs: vault (required), query (required), path, caseSensitive, +2 more.
write_fileC
Write or update a file in a vault
Inputs: vault (required), filepath (required), content (required), frontmatter, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Every tool has a clearly distinct purpose with no ambiguity. For example, 'get_file' reads file content while 'get_metadata' extracts structured data, and 'list_files' enumerates files whereas 'search_files' finds specific content. The actions (append, execute, get, list, open, search, write) are well-differentiated and target specific Obsidian operations.
All tool names follow a consistent verb_noun pattern using snake_case throughout, such as 'append_content', 'execute_command', 'get_active_file', and 'write_file'. This predictable naming convention makes it easy for agents to understand and select the right tool based on the intended action and target resource.
With 12 tools, the count is well-scoped for managing Obsidian vaults and files. Each tool earns its place by covering distinct aspects like file operations (read, write, append), metadata handling, vault management, UI interactions, and search capabilities, without being overly broad or sparse for the domain.
The tool set provides complete CRUD/lifecycle coverage for Obsidian vault and file management, including create (write_file), read (get_file, get_metadata), update (append_content, write_file), delete (implied via write/overwrite), and utility operations like listing, searching, and UI control. No obvious gaps exist for core workflows in this domain.
Maintenance
Related MCP Connectors
Hosted MCP server for Obsidian Sync vaults: read, search, edit notes. Not affiliated with Obsidian.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.
Notes and memory assistant: one Markdown vault that Claude, ChatGPT and any MCP client can share.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables comprehensive access to Obsidian vaults through MCP, supporting multi-vault management, knowledge graph analysis, canvas manipulation, dataview queries, template rendering, and periodic notes creation. Provides both local filesystem and remote API connectivity for complete Obsidian integration.2922MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to interact with an Obsidian vault through the official Obsidian CLI, supporting search, notes, tasks, files, links, and native Canvas operations while the Obsidian desktop app is running.48 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and development tools to interact with Obsidian vaults via MCP, providing direct filesystem access for reading, writing, searching, and managing notes without requiring Obsidian to be running.Apache 2.0
- AlicenseAqualityBmaintenanceEnables MCP clients to safely read, search, create, edit, delete, and move notes in an Obsidian vault, with automatic link repair and reversible deletes.10MIT