Enables natural language interaction with Obsidian vaults, providing tools for reading, writing, searching notes, analyzing backlinks and connections, managing note structure, tracking tasks, and discovering patterns across linked notes.
Obsidian MCP Server
A powerful Model Context Protocol (MCP) server for natural language interaction with your Obsidian vault. Built with TypeScript and designed for seamless integration with Claude Code and other MCP clients.
Features
Core Capabilities
Natural Language Queries: Ask questions about your vault in plain English
Advanced Search: Intelligent search with link analysis, tag hierarchies, and structural context
Backlink Analysis: Find and analyze connections between notes
Vault Navigation: Browse directory structure and discover notes
Full CRUD Operations: Read, write, create, append, and update notes
Advanced Intelligence Tools
Guided Story Path: Generate narrative tours through linked notes
Note Auditing: Find recently modified notes missing frontmatter or structure
Contextual Companions: Discover related notes based on links, keywords, and recency
Fresh Energy: Identify recently updated notes needing integration
Initiative Bridge: Track project-specific notes with outstanding tasks
Pattern Echo: Find notes that reuse specific phrasings or patterns
Synthesis Ready: Detect note clusters that need summary notes
Installation
From Source
Clone the repository:
git clone https://github.com/dbmcco/obsidian-mcp.git cd obsidian-mcpInstall dependencies:
npm installBuild the project:
npm run build
Configuration
Claude Code Setup
Add to your Claude Code MCP configuration:
Claude Desktop Setup
Add to your claude_desktop_config.json:
Environment Variables
OBSIDIAN_VAULT_PATH: Required. Absolute path to your Obsidian vault
Available Tools
Basic Operations
query_vault
Process natural language queries about your vault content.
Example: "What are the main themes in my project notes?"
search_notes
Search for notes by filename or content using exact text matching.
intelligent_search
Advanced search with link graph analysis, tag hierarchies, and structural context weighting.
list_directories
Browse vault directory structure with note counts.
get_note
Retrieve the full content of a specific note.
get_backlinks
Find all notes that link to a specific note with context.
Write Operations
write_note
Write or completely overwrite a note.
create_note
Create a new note with frontmatter and content.
append_to_note
Append content to an existing note.
update_note_section
Update a specific section identified by heading.
Advanced Intelligence
guided_path
Generate a narrative tour through linked notes starting from a seed note.
Output: Markdown narrative with introduction, supporting threads, counterpoints, and action items.
audit_recent_notes
Find recently modified notes missing frontmatter or structure.
contextual_companions
Discover notes related to a topic or seed note based on links, keywords, and recency.
Note: Must provide either notePath or topic.
fresh_energy
Find recently updated notes lacking backlinks or outgoing links (needing integration).
initiative_bridge
Track project/initiative-tagged notes with outstanding tasks.
pattern_echo
Find notes that reuse specific phrasings, bullet patterns, or framework fragments.
synthesis_ready
Detect clusters of interlinked notes that lack a summary/synthesis note.
Example Use Cases
Knowledge Discovery
Vault Maintenance
Project Management
Pattern Analysis
Development
Scripts
npm run dev: Watch mode for developmentnpm run build: Build TypeScript to JavaScriptnpm run start: Start the MCP server
Project Structure
Technical Details
Architecture
TypeScript with strict mode enabled
ES Modules (NodeNext)
Zod for runtime type validation
gray-matter for frontmatter parsing
glob for file pattern matching
Search Methods
The intelligent_search tool combines four search strategies:
Direct matching: Exact keyword matches in content/filenames
Link proximity: Notes connected via wiki-links
Tag expansion: Related notes via tag hierarchies
Structural context: Section-aware searching with relevance scoring
Results are merged, deduplicated, and ranked by relevance score.
Performance
No caching - all searches are real-time to avoid staleness
Lazy loading of note content for large vaults
Efficient glob patterns for file discovery
Credits
Built by Braydon with Claude (Anthropic). This MCP server was developed using test-driven development principles and extensive collaboration with Claude Code.
License
MIT License - feel free to use and modify as needed.
Contributing
Contributions welcome! Please:
Fork the repository
Create a feature branch
Make your changes with tests
Submit a pull request
Troubleshooting
"No vault path provided" error
Ensure OBSIDIAN_VAULT_PATH is set in your MCP configuration or environment variables.
MCP server not connecting
Verify the path to
dist/index.jsis absolute, not relativeEnsure the server is built (
npm run build)Check that Node.js can execute the script
Search returns no results
Verify vault path is correct
Check that
.mdfiles exist in the vaultTry using
list_directoriesto explore the vault structure