-
Setup Claude Desktop: Visit this page for details: https://modelcontextprotocol.io/quickstart/user
-
Configure Claude Desktop:
- Open:
%APPDATA%\Claude\claude_desktop_config.json - Add this configuration:
{ "mcpServers": { "obsidian": { "command": "obsidianpilot", "args": [], "env": { "OBSIDIAN_VAULT_PATH": "C:\\Users\\YourName\\Documents\\MyVault" } } } } - Open:
-
Update the vault path in the config above to your actual Obsidian vault location
-
Restart Claude Desktop - You must click file->exit... not just close and reopen. Then ObsidianPilot is now ready!
๐ Key Features:
- โก Ultra-fast search - SQLite FTS5 with boolean operators (AND, OR, NOT) for instant results on large vaults
- ๐ Smart search - Handles multi-word terms, quoted phrases, and complex boolean queries
- ๐ Advanced link management - Find backlinks, analyze outgoing links with resolved paths, identify broken links
- ๐ฆ Efficient API - Enhanced read_note tool fetches content and links in a single call
- ๐ Accurate link resolution - Matches Obsidian's relative path resolution behavior
- ๐ Background indexing - Automatic index updates when notes change
- ๐ Regex search - Find complex patterns with optional directory scoping
- ๐ท๏ธ Property search - Query by frontmatter properties with advanced operators
- ๐ผ๏ธ Image support - View and analyze images from your vault
- ๐ฆ Token-efficient editing - Edit specific sections without rewriting entire notes
ObsidianPilot is an enhanced Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with your Obsidian vault with powerful token-efficient editing capabilities. This server provides tools for reading, creating, searching, and managing notes in Obsidian through direct filesystem access with blazing-fast performance and intelligent indexing.
- ๐ Read & write notes - Full access to your Obsidian vault with automatic overwrite protection
- ๐ Blazing-fast search - SQLite FTS5 full-text search with boolean operators (AND, OR, NOT) for instant results on large vaults
- โก Smart search optimization - Automatically chooses fastest search method based on vault size and query complexity
- ๐ผ๏ธ Image analysis - View and analyze images embedded in notes or stored in your vault
- ๐ Regex power search - Use regular expressions to find code patterns, URLs, or complex text structures
- ๐๏ธ Property search - Query notes by frontmatter properties with operators (=, >, <, contains, exists)
- ๐ Browse vault - List and navigate your notes and folders by directory
- ๐ท๏ธ Tag management - Add, remove, and organize tags (supports hierarchical tags, frontmatter, and inline tags)
- ๐ Advanced link management - Find backlinks, analyze outgoing links with resolved paths, and identify broken links
- ๐ฆ Efficient API - Enhanced read_note tool can fetch content and links in a single call
- โ๏ธ Smart rename - Rename notes with automatic link updates throughout your vault
- ๐ Note insights - Get statistics like word count and link analysis
- ๐ฏ AI-optimized - Clear error messages and smart defaults for better AI interactions
- ๐ Secure - Direct filesystem access with path validation
- โก Performance optimized - Persistent SQLite index, concurrent operations, and streaming for large vaults
- ๐ Bulk operations - Create folder hierarchies and move entire folders with all their contents
- Obsidian vault on your local filesystem
- Python 3.10+ installed on your system
- Node.js (optional, for running MCP Inspector)
Install ObsidianPilot:
uvx ObsidianPilot-
Locate your Obsidian vault:
- Find the path to your Obsidian vault on your filesystem
- Example:
/Users/yourname/Documents/MyVaultorC:\Users\YourName\Documents\MyVault
-
**Configure your AI tool:**Edit your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{ "mcpServers": { "obsidian": { "command": "uvx", "args": ["ObsidianPilot"], "env": { "OBSIDIAN_VAULT_PATH": "/path/to/your/obsidian/vault" } } } }
Add to your Cursor settings:
- Project-specific:
.cursor/mcp.jsonin your project directory - Global:
~/.cursor/mcp.jsonin your home directory
{ "mcpServers": { "obsidian": { "command": "uvx", "args": ["ObsidianPilot"], "env": { "OBSIDIAN_VAULT_PATH": "/path/to/your/obsidian/vault" } } } }
Then: Open Settings โ Cursor Settings โ Enable MCP
Edit your Windsurf config file:
- Location:
~/.codeium/windsurf/mcp_config.json
{ "mcpServers": { "obsidian": { "command": "uvx", "args": ["ObsidianPilot"], "env": { "OBSIDIAN_VAULT_PATH": "/path/to/your/obsidian/vault" } } } }
Then: Open Windsurf Settings โ Advanced Settings โ Cascade โ Add Server โ Refresh
- macOS:
-
Restart your AI tool to load the new configuration.
That's it! The server will now be available in your AI tool with access to your Obsidian vault.
Note: This uses
uvxwhich automatically downloads and runs the server in an isolated environment. Most users won't need to install anything else. If you don't haveuvinstalled, you can also usepipx install ObsidianPilotand change the command to"obsidianpilot"in the config.
Here are some example prompts to get started:
- "Show me all notes I modified this week"
- "Create a new daily note for today with my meeting agenda"
- "Search for all notes about project planning"
- "Read my Ideas/startup.md note"
-
Clone the repository:
git clone https://github.com/that0n3guy/ObsidianPilot cd ObsidianPilot
-
Set up Python environment:
# Using pyenv (recommended) pyenv virtualenv 3.12.9 ObsidianPilot pyenv activate ObsidianPilot # Or using venv python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
export OBSIDIAN_VAULT_PATH="/path/to/your/obsidian/vault"
-
Run the server:
python -m obsidian_mcp.server
-
**Add to Claude Desktop (for development):**Edit your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{ "mcpServers": { "obsidian": { "command": "/path/to/python", "args": ["-m", "obsidian_mcp.server"], "cwd": "/path/to/ObsidianPilot", "env": { "PYTHONPATH": "/path/to/ObsidianPilot", "OBSIDIAN_VAULT_PATH": "/path/to/your/obsidian/vault" } } } }
- macOS:
obsidian-mcp/ โโโ obsidian_mcp/ โ โโโ server.py # Main entry point with rich parameter schemas โ โโโ tools/ # Tool implementations โ โ โโโ note_management.py # CRUD operations โ โ โโโ search_discovery.py # Search and navigation โ โ โโโ organization.py # Tags, moves, metadata โ โ โโโ link_management.py # Backlinks, outgoing links, broken links โ โโโ models/ # Pydantic models for validation โ โ โโโ obsidian.py # Note, SearchResult, VaultItem models โ โโโ utils/ # Shared utilities โ โ โโโ filesystem.py # Direct filesystem access โ โ โโโ validators.py # Path validation, sanitization โ โ โโโ validation.py # Comprehensive parameter validation โ โโโ constants.py # Constants and error messages โโโ tests/ โ โโโ run_tests.py # Test runner โ โโโ test_filesystem_integration.py # Integration tests โโโ docs/ # Additional documentation โโโ requirements.txt # Python dependencies โโโ CLAUDE.md # Instructions for Claude Code โโโ README.md
Read the content and metadata of a specific note.
Parameters:
path: Path to the note (e.g., "Daily/2024-01-15.md")include_outgoing_links(default:false): Include all links from this note with resolved file pathsinclude_backlinks(default:false): Include all notes that link to this note
Returns:
{ "path": "Daily/2024-01-15.md", "content": "# Daily Note\n\nContent here...", "metadata": { "tags": ["daily", "journal"], "aliases": [], "frontmatter": {} }, "outgoing_links": [...], // If include_outgoing_links=true "backlinks": [...] // If include_backlinks=true }
Create a new note or update an existing one.
Parameters:
path: Path where the note should be createdcontent: Markdown content of the note (consider adding tags for organization)overwrite(default:false): Whether to overwrite existing notes
Best Practices:
- Add relevant tags when creating notes to maintain organization
- Use
list_tagsto see existing tags and maintain consistency - Tags can be added as inline hashtags (
#tag) or in frontmatter
Update the content of an existing note.
Parameters:
path: Path to the note to updatecontent: New markdown content (REPLACES existing content unless using append)create_if_not_exists(default:false): Create if doesn't existmerge_strategy(default:"replace"): How to handle content"replace": Overwrites entire note content (default)"append": Adds new content to the end of existing content
Safe Update Pattern:
- ALWAYS read first to preserve content
- Modify the content as needed
- Update with the complete new content
- Or use append mode to add content to the end
Edit a specific section of a note identified by a markdown heading.
Parameters:
path: Path to the note to editsection_identifier: Markdown heading that identifies the section (e.g., "## Tasks", "### Status")content: Content to insert, replace, or appendoperation(default:"insert_after"): How to edit the section"insert_after": Add content after the section heading"insert_before": Add content before the section heading"replace_section": Replace entire section including heading"append_to_section": Add content at the end of the section"edit_heading": Change just the heading text while preserving section content
create_if_missing(default:false): Create section if it doesn't exist
Example usage:
await edit_note_section( "Daily/2024-01-15.md", "## Tasks", "- [ ] Review PR\n- [ ] Update docs", operation="append_to_section" )
await edit_note_section( "Projects/Website.md", "### Current Status", "### Current Status\n\nPhase 2 completed!", operation="replace_section" )
await edit_note_section( "Projects/Website.md", "## Old Heading", "## New Heading", operation="edit_heading" )
Use cases:
- Adding items to task lists without rewriting the whole note
- Updating status sections in project notes
- Building up notes incrementally by section
- Inserting content at precise locations
Edit specific text content in a note using precise search and replace.
Parameters:
path: Path to the note to editsearch_text: Exact text to search for and replacereplacement_text: Text to replace the search_text withoccurrence(default:"first"): Replace "first" occurrence only or "all" occurrences
Example usage:
await edit_note_content( "Projects/Website.md", "Status: In Progress", "Status: Completed" )
await edit_note_content( "Notes/Research.md", "recieve", "receive", occurrence="all" )
await edit_note_content( "Daily/2024-01-15.md", "priority: low", "priority: high" )
Use cases:
- Updating specific values or references
- Fixing typos or correcting text
- Modifying frontmatter properties
- Changing URLs or links
- Updating dates or numbers
Delete a note from the vault.
Parameters:
path: Path to the note to delete
๐ Performance Note: v2.1.x introduces blazing-fast SQLite FTS5 search that automatically optimizes for large vaults. Search tools that previously timed out on 1800+ note vaults now complete in under 0.5 seconds!
Lightning-fast full-text search using SQLite FTS5 indexing with boolean operators and advanced search capabilities.
Performance Features:
- 100-1000x faster: SQLite FTS5 indexing replaces slow SQL LIKE queries
- Boolean operators: Support for AND, OR, NOT for complex searches
- Phrase search: Automatic phrase detection for multi-word queries
- Proper ranking: Results ranked by relevance with scoring
- Background indexing: Index builds automatically without blocking AI interactions
- Legacy compatibility: Supports tag:, path:, and property: prefixes for backward compatibility
Parameters:
query: Search query with boolean operators and special prefixesmax_results(default:50): Maximum number of results to return (1-500)context_length(default:100): Number of characters to show around matches
Search Syntax:
Boolean Search (New):
"python AND tutorial"- Find notes containing both terms"Eide Bailly OR CPA OR accounting"- Find notes with any of these terms"machine learning NOT snake"- Exclude irrelevant results"(python OR ruby) AND tutorial"- Complex nested queries"exact phrase search"- Phrase matching for multi-word terms
Legacy Syntax (Still Supported):
- Text search:
"machine learning" - Tag search:
tag:projectortag:#project- Hierarchical tags:
tag:project/web(exact match) - Parent search:
tag:project(finds project, project/web, project/mobile) - Child search:
tag:web(finds project/web, design/web)
- Hierarchical tags:
- Path search:
path:Daily/ - Property search:
property:status:activeorproperty:priority:>2
Returns:
{ "results": [...], // Array of matched notes "total_count": 150, // Total matches found "limit": 50, // max_results used "truncated": true // More results available }
Property Search Examples:
property:status:active- Find notes where status = "active"property:priority:>2- Find notes where priority > 2property:author:*john*- Find notes where author contains "john"property:deadline:*- Find notes that have a deadline propertyproperty:rating:>=4- Find notes where rating >= 4property:tags:project- Find notes with "project" in their tags arrayproperty:due_date:<2024-12-31- Find notes with due dates before Dec 31, 2024
Search for notes by creation or modification date.
Parameters:
date_type(default:"modified"): Either "created" or "modified"days_ago(default:7): Number of days to look backoperator(default:"within"): Either "within" (last N days) or "exactly" (exactly N days ago)
Returns:
{ "query": "Notes modified within last 7 days", "count": 15, "results": [ { "path": "Daily/2024-01-15.md", "date": "2024-01-15T10:30:00", "days_ago": 1 } ] }
Example usage:
- "Show me all notes modified today" โ
search_by_date("modified", 0, "within") - "Show me all notes modified this week" โ
search_by_date("modified", 7, "within") - "Find notes created in the last 30 days" โ
search_by_date("created", 30, "within") - "What notes were modified exactly 2 days ago?" โ
search_by_date("modified", 2, "exactly")
Search for notes using regular expressions with smart timeout protection for large vaults.
v2.1.x Improvements:
- Timeout protection: 20-30s timeouts prevent hanging on large vaults
- Smart suggestions: Detects simple patterns and suggests faster alternatives
- Auto-optimization: Reduces result limits and applies timeouts based on vault size
- Helpful errors: When timeouts occur, suggests specific fast search alternatives
Parameters:
pattern: Regular expression pattern to search forflags(optional): List of regex flags ("ignorecase", "multiline", "dotall")context_length(default:100): Characters to show around matchesmax_results(default:50): Maximum number of results (auto-limited for large vaults)
Performance Tips: For better performance on large vaults, consider these alternatives:
- Simple text: Use
search_notes("your text") - Boolean queries: Use
search_notes("term1 AND term2") - Field search: Use
search_notes("tag:tagname")orsearch_notes("path:foldername")
When to use regex:
- Finding code patterns (functions, imports, syntax)
- Searching for structured data
- Complex text patterns that simple search can't handle
Common patterns:
# Find Python imports "(import|from)\\s+fastmcp" # Find function definitions "def\\s+\\w+\\s*\\([^)]*\\):" # Find TODO comments "(TODO|FIXME)\\s*:?\\s*(.+)" # Find URLs "https?://[^\\s)>]+" # Find code blocks "```python([^`]+)```"
Returns:
{ "pattern": "def\\s+search\\w*", "count": 2, "results": [ { "path": "code/utils.py", "match_count": 3, "matches": [ { "match": "def search_notes", "line": 42, "context": "...async def search_notes(query)..." } ] } ] }
Search for notes by their frontmatter property values with advanced filtering.
Parameters:
property_name: Name of the property to search forvalue(optional): Value to compare againstoperator(default:"="): Comparison operatorcontext_length(default:100): Characters of note content to include
Operators:
"=": Exact match (case-insensitive)"!=": Not equal">","<",">=","<=": Numeric/date comparisons"contains": Property value contains the search value"exists": Property exists (value parameter ignored)
Supported Property Types:
- Text/String: Standard text comparison
- Numbers: Automatic numeric comparison for operators
- Dates: ISO format (YYYY-MM-DD) with intelligent date parsing
- Arrays/Lists: Searches within array items, comparisons use array length
- Legacy properties: Automatically handles
tagโtags,aliasโaliasesmigrations
Returns:
{ "property": "status", "operator": "=", "value": "active", "count": 5, "results": [ { "path": "Projects/Website.md", "matches": ["status = active"], "context": "status: active\n\n# Website Redesign Project...", "property_value": "active" } ] }
Example usage:
- Find all active projects:
search_by_property("status", "active") - Find high priority items:
search_by_property("priority", "2", ">") - Find notes with deadlines:
search_by_property("deadline", operator="exists") - Find notes by partial author:
search_by_property("author", "john", "contains")
List notes in your vault with optional recursive traversal.
Parameters:
directory(optional): Specific directory to list (e.g., "Daily", "Projects")recursive(default:true): List all notes recursively
Returns:
{ "directory": "Daily", "recursive": true, "count": 365, "notes": [ {"path": "Daily/2024-01-01.md", "name": "2024-01-01.md"}, {"path": "Daily/2024-01-02.md", "name": "2024-01-02.md"} ] }
List folders in your vault with optional recursive traversal.
Parameters:
directory(optional): Specific directory to list fromrecursive(default:true): Include all nested subfolders
Returns:
{ "directory": "Projects", "recursive": true, "count": 12, "folders": [ {"path": "Projects/Active", "name": "Active"}, {"path": "Projects/Archive", "name": "Archive"}, {"path": "Projects/Ideas", "name": "Ideas"} ] }
Create a new folder in the vault, including all parent folders in the path.
Parameters:
folder_path: Path of the folder to create (e.g., "Research/Studies/2024")create_placeholder(default:true): Whether to create a placeholder file
Returns:
{ "folder": "Research/Studies/2024", "created": true, "placeholder_file": "Research/Studies/2024/.gitkeep", "folders_created": ["Research", "Research/Studies", "Research/Studies/2024"] }
Note: This tool will create all necessary parent folders. For example, if "Research" exists but "Studies" doesn't, it will create both "Studies" and "2024".
Move a note to a new location, optionally with a new name.
Parameters:
source_path: Current path of the notedestination_path: New path for the note (can include new filename)update_links(default:true): Update links if filename changes
Features:
- Can move to a different folder:
move_note("Inbox/Note.md", "Archive/Note.md") - Can move AND rename:
move_note("Inbox/Old.md", "Archive/New.md") - Automatically detects if filename changes and updates all wiki-style links
- No link updates needed for simple folder moves (Obsidian links work by name)
- Preserves link aliases when updating
Returns:
{ "success": true, "source": "Inbox/Quick Note.md", "destination": "Projects/Project Plan.md", "renamed": true, "details": { "links_updated": 5, "notes_updated": 3 } }
Rename a note and automatically update all references to it throughout your vault.
Parameters:
old_path: Current path of the notenew_path: New path for the note (must be in same directory)update_links(default:true): Automatically update all wiki-style links
Returns:
{ "success": true, "old_path": "Projects/Old Name.md", "new_path": "Projects/New Name.md", "operation": "renamed", "details": { "links_updated": 12, "notes_updated": 8, "link_update_details": [ {"note": "Daily/2024-01-15.md", "updates": 2}, {"note": "Ideas/Related.md", "updates": 1} ] } }
Features:
- Automatically finds and updates all
[[wiki-style links]]to the renamed note - Preserves link aliases (e.g.,
[[Old Name|Display Text]]โ[[New Name|Display Text]]) - Handles various link formats:
[[Note]],[[Note.md]],[[Note|Alias]] - Shows which notes were updated for transparency
- Can only rename within the same directory (use
move_noteto change directories)
Move an entire folder and all its contents to a new location.
Parameters:
source_folder: Current folder path (e.g., "Projects/Old")destination_folder: New folder path (e.g., "Archive/Projects/Old")update_links(default:true): Update links in other notes (future enhancement)
Returns:
{ "source": "Projects/Completed", "destination": "Archive/2024/Projects", "moved": true, "notes_moved": 15, "folders_moved": 3, "links_updated": 0 }
Add tags to a note's frontmatter.
Parameters:
path: Path to the notetags: List of tags to add (without # prefix)
Supports hierarchical tags:
- Simple tags:
["project", "urgent"] - Hierarchical tags:
["project/web", "work/meetings/standup"] - Mixed:
["urgent", "project/mobile", "status/active"]
Update tags on a note - either replace all tags or merge with existing.
Parameters:
path: Path to the notetags: New tags to set (without # prefix)merge(default:false): If true, adds to existing tags. If false, replaces all tags
Perfect for AI workflows:
User: "Tell me what this note is about and add appropriate tags" AI: [reads note] "This note is about machine learning research..." AI: [uses update_tags to set tags: ["ai", "research", "neural-networks"]]
Remove tags from a note's frontmatter.
Parameters:
path: Path to the notetags: List of tags to remove
Get metadata and statistics about a note without retrieving its full content.
Parameters:
path: Path to the note
Returns:
{ "path": "Projects/AI Research.md", "exists": true, "metadata": { "tags": ["ai", "research"], "aliases": [], "frontmatter": {} }, "stats": { "size_bytes": 4523, "word_count": 823, "link_count": 12 } }
View an image from your vault. Images are automatically resized to a maximum width of 800px for optimal display in Claude Desktop.
Parameters:
path: Path to the image file (e.g., "Attachments/screenshot.png")
Returns:
- A resized image object that can be viewed directly in Claude Desktop
Supported formats:
- PNG, JPG/JPEG, GIF, BMP, WebP
Extract and view all images embedded in a note.
Parameters:
path: Path to the note containing images
Returns:
{ "note_path": "Projects/Design Mockups.md", "image_count": 3, "images": [ { "path": "Attachments/mockup1.png", "alt_text": "Homepage design", "image": "" } ] }
Use cases:
- Analyze screenshots and diagrams in your notes
- Review design mockups and visual documentation
- Extract visual information for AI analysis
List all unique tags used across your vault with usage statistics.
Parameters:
include_counts(default:true): Include usage count for each tagsort_by(default:"name"): Sort by "name" or "count"
Returns:
{ "total_tags": 25, "tags": [ {"name": "project", "count": 42}, {"name": "project/web", "count": 15}, {"name": "project/mobile", "count": 8}, {"name": "meeting", "count": 38}, {"name": "idea", "count": 15} ] }
Note: Hierarchical tags are listed as separate entries, showing both parent and full paths.
Performance Notes:
- Fast for small vaults (<1000 notes)
- May take several seconds for large vaults
- Uses concurrent batching for optimization
โก Performance Note: Link management tools have been heavily optimized in v1.1.5:
- 84x faster link validity checking
- 96x faster broken link detection
- 2x faster backlink searches
- Includes automatic caching and batch processing
Find all notes that link to a specific note.
Parameters:
path: Path to the note to find backlinks forinclude_context(default:true): Whether to include text context around linkscontext_length(default:100): Number of characters of context to include
Returns:
{ "target_note": "Projects/AI Research.md", "backlink_count": 5, "backlinks": [ { "source_path": "Daily/2024-01-15.md", "link_text": "AI Research", "link_type": "wiki", "context": "...working on the [[AI Research]] project today..." } ] }
Use cases:
- Understanding which notes reference a concept or topic
- Discovering relationships between notes
- Building a mental map of note connections
List all links from a specific note.
Parameters:
path: Path to the note to extract links fromcheck_validity(default:true): Whether to check if linked notes exist and get resolved file paths
Returns:
{ "source_note": "Projects/Overview.md", "link_count": 8, "links": [ { "target": "AI Research", "display_text": "AI Research", "type": "wiki", "exists": true, "file_path": "Projects/AI Research.md" } ] }
Use cases:
- Understanding what a note references
- Checking note dependencies before moving/deleting
- Exploring the structure of index or hub notes
Find all notes that link to a specific note (incoming links).
Parameters:
path: Path to the target noteinclude_context(default:true): Include surrounding text contextcontext_length(default:100): Characters of context to include
Returns:
{ "target_note": "Projects/My Project.md", "backlink_count": 3, "backlinks": [ { "source_path": "Daily/2024-01-15.md", "target": "My Project", "display_text": "My Project", "link_type": "wiki", "context": "...working on [[My Project]] today..." } ] }
Use cases:
- Understanding which notes reference a concept or topic
- Discovering relationships between notes
- Building a mental map of note connections
Find all broken links in the vault, a specific directory, or a single note.
Parameters:
directory(optional): Specific directory to check (defaults to entire vault)single_note(optional): Check only this specific note for broken links
Returns:
{ "directory": "/", "broken_link_count": 3, "affected_notes": 2, "broken_links": [ { "source_path": "Projects/Overview.md", "broken_link": "Projects/Old Name.md", "display_text": "Old Project", "link_type": "wiki" } ] }
Use cases:
- After renaming or deleting notes
- Regular vault maintenance
- Before reorganizing folder structure
# Run all tests python tests/run_tests.py # Or with pytest directly pytest tests/
Tests create temporary vaults for isolation and don't require a running Obsidian instance.
-
Set your vault path:
export OBSIDIAN_VAULT_PATH="/path/to/your/vault"
-
Run the MCP Inspector:
npx @modelcontextprotocol/inspector python -m obsidian_mcp.server
-
Open the Inspector UI at
http://localhost:5173 -
Test the tools interactively with your actual vault
For development installations, see the Development Installation section above.
The server provides detailed, actionable error messages to help AI systems recover from errors:
Invalid Path:
Invalid note path: '../../../etc/passwd'. Valid paths must: 1) End with .md or .markdown, 2) Use forward slashes (e.g., 'folder/note.md'), 3) Not contain '..' or start with '/', 4) Not exceed 255 characters. Example: 'Daily/2024-01-15.md' or 'Projects/My Project.md'
Empty Search Query:
Search query cannot be empty. Valid queries: 1) Keywords: 'machine learning', 2) Tags: 'tag:#project', 3) Paths: 'path:Daily/', 4) Combined: 'tag:#urgent TODO'
Invalid Date Parameters:
Invalid date_type: 'invalid'. Must be either 'created' or 'modified'. Use 'created' to find notes by creation date, 'modified' for last edit date
- Ensure the OBSIDIAN_VAULT_PATH environment variable is set correctly
- Verify the path points to an existing Obsidian vault directory
- Check that you have read/write permissions for the vault directory
- Ensure tags are properly formatted (with or without # prefix)
- Tags in frontmatter should be in YAML array format:
tags: [tag1, tag2] - Inline tags should use the # prefix:
#project #urgent - Tags inside code blocks are automatically excluded
- The server has a 10MB limit for note files and 50MB for images
- This prevents memory issues with very large files
- Consider splitting large notes into smaller ones
- Ensure your virtual environment is activated
- Run from the project root:
python -m obsidianpilot.server - Verify all dependencies are installed:
pip install -r requirements.txt
- Specify a directory when using
list_notes(e.g., "Daily", "Projects") - Root directory listing requires recursive implementation
- Check if notes are in subdirectories
- Ensure notes have YAML frontmatter section for frontmatter tags
- Frontmatter must include a
tags:field (even if empty) - The server now properly reads both frontmatter tags and inline hashtags
- Always read before updating: The
update_notetool REPLACES content by default - Use append mode for additions: When adding to existing notes, use
merge_strategy="append" - Check note existence: Use
read_noteto verify a note exists before modifying - Be explicit about overwrites: Only use
overwrite=truewhen intentionally replacing content
Safe note editing:
- Read the existing note first
- Modify the content as needed
- Update with the complete new content
Adding to daily notes:
- Use
merge_strategy="append"to add entries without losing existing content - Use
edit_note_sectionto add content to specific sections (like "## Tasks" or "## Notes")
Creating new notes:
- Use
create_notewithoverwrite=false(default) to prevent accidental overwrites - Add relevant tags to maintain organization
- Use
list_tagsto see existing tags and avoid creating duplicates
Organizing with tags:
- Check existing tags with
list_tagsbefore creating new ones - Maintain consistent naming (e.g., use "project" not "projects")
- Use tags to enable powerful search and filtering
- Vault path access - The server only accesses the specified vault directory
- The server validates all paths to prevent directory traversal attacks
- File operations are restricted to the vault directory
- Large files are rejected to prevent memory exhaustion
- Path validation prevents access to system files
- Uses FastMCP framework for MCP implementation
- Pydantic models for type safety and validation
- Modular architecture with separated concerns
- Comprehensive error handling and user-friendly messages
- Create tool function in appropriate module under
src/tools/ - Add Pydantic models if needed in
src/models/ - Register the tool in
src/server.pywith the@mcp.tool()decorator - Include comprehensive docstrings
- Add tests in
tests/ - Test with MCP Inspector before deploying
- โ๏ธ Token-efficient section editing - New
edit_note_sectiontool for precise content insertion and updates - ๐ฏ Five edit operations - Insert before/after headings, replace sections, append to sections, or edit headings only
- ๐ Smart section detection - Case-insensitive markdown heading matching with hierarchy support
- ๐ง Create missing sections - Optionally create sections if they don't exist
- ๐ Preserve note structure - Edit specific parts without rewriting entire notes
- ๐ Precise text replacement - New
edit_note_contenttool for exact text search and replace - ๐ก๏ธ Frontmatter preservation - Automatically detects and maintains YAML frontmatter during all edits
- ๐ FastMCP compatibility - Fixed deprecated import warnings and updated dependencies
- ๐ Windows setup guide - Comprehensive installation instructions for Windows environments
- ๐ฏ Simplified architecture - Removed memory index, SQLite is now the only search method
- ๐ Search transparency - Added metadata to search results (total_count, truncated, limit)
- โ๏ธ Configurable search limits - Exposed max_results parameter (1-500, default 50)
- ๐งน Reduced tool clutter - Removed unnecessary index management tools
- ๐ Reasoning-friendly improvements - Enhanced all tools with proper Field annotations and comprehensive docstrings
- ๐ Better AI reasoning - Added "When to use" and "When NOT to use" sections to all tools
- โก Performance notes - Added explicit performance guidance for expensive operations
- ๐ง Cleaner codebase - Removed ~500 lines of memory index code, reducing maintenance burden
- ๐ Complete architecture overhaul - Migrated from REST API to direct filesystem access
- โก 5x faster searches with persistent SQLite indexing that survives between sessions
- ๐ผ๏ธ Image support - View and analyze images from your vault with automatic resizing
- ๐ Regex power search - Find complex patterns with optimized streaming
- ๐๏ธ Property search - Query notes by frontmatter properties with advanced operators
- ๐ฏ One-command setup - Auto-configure Claude Desktop with
uvx --from ObsidianPilot ObsidianPilot-configure - ๐ฆ 90% less memory usage - Efficient streaming architecture
- ๐ No plugins required - Works offline without needing Obsidian to be running
- โจ Incremental indexing - Only re-indexes changed files
- ๐ง Migration support - Automatically detects and migrates old REST API configs
- ๐ท๏ธ Enhanced hierarchical tag support - Full support for Obsidian's nested tag system
- Search parent tags to find all children (e.g.,
tag:projectfindsproject/web) - Search child tags across any hierarchy (e.g.,
tag:webfindsproject/web,design/web) - Exact hierarchical matching (e.g.,
tag:project/web)
- Search parent tags to find all children (e.g.,
- ๐ Improved metadata handling - Better alignment with Obsidian's property system
- Automatic migration of legacy properties (
tagโtags,aliasโaliases) - Array/list property searching (find items within arrays)
- Date property comparisons with ISO format support
- Numeric comparisons for array lengths
- Automatic migration of legacy properties (
- ๐ AI-friendly tool definitions - Updated all tool descriptions for better LLM understanding
- Added hierarchical tag examples to all tag-related tools
- Enhanced property search documentation
- Clearer parameter descriptions following MCP best practices
- ๐ง Fixed FastMCP compatibility issue that prevented PyPI package from running
- ๐ฆ Updated to FastMCP 2.8.1 for better stability
- ๐ Fixed Pydantic V2 deprecation warnings (migrated to @field_validator)
- โจ Changed FastMCP initialization to use 'instructions' parameter
- ๐ Improved compatibility with uvx and pipx installation methods
- ๐ Changed default API endpoint to HTTP (
http://127.0.0.1:27123) for easier setup - ๐ Updated documentation to reflect HTTP as default, HTTPS as optional
- ๐ง Added note about automatic trailing slash handling in URLs
- โจ Improved first-time user experience with zero-configuration setup
- ๐ Fixed timeout errors when creating or updating large notes
- โก Added graceful timeout handling for better reliability with large content
- ๐ง Improved error reporting to prevent false failures on successful operations
- โก Massive performance optimization for link management:
- 84x faster link validity checking
- 96x faster broken link detection
- 2x faster backlink searches
- Added automatic caching and batch processing
- ๐ง Optimized concurrent operations for large vaults
- ๐ Enhanced documentation for performance considerations
- ๐ Added link management tools for comprehensive vault analysis:
get_backlinks- Find all notes linking to a specific noteget_outgoing_links- List all links from a note with validity checkingfind_broken_links- Identify broken links for vault maintenance
- ๐ง Fixed URL construction to support both HTTPS (default) and HTTP endpoints
- ๐ Enhanced link parsing to handle both wiki-style and markdown links
- โก Optimized backlink search to handle various path formats
- ๐ Fixed search_by_date to properly find notes modified today (days_ago=0)
- โจ Added list_folders tool for exploring vault folder structure
- โจ Added create_folder tool that creates full folder hierarchies
- โจ Added move_folder tool for bulk folder operations
- โจ Added update_tags tool for AI-driven tag management
- ๐ Fixed tag reading to properly handle both frontmatter and inline hashtags
- โจ Added list_tags tool to discover existing tags with usage statistics
- โก Optimized performance with concurrent batching for large vaults
- ๐ Improved documentation and error messages following MCP best practices
- ๐ฏ Enhanced create_note to encourage tag usage for better organization
- Fixed PyPI package documentation
- Initial PyPI release
To publish a new version to PyPI:
# 1. Update version in pyproject.toml # 2. Clean old builds rm -rf dist/ build/ *.egg-info/ # 3. Build the package python -m build # 4. Check the package twine check dist/* # 5. Upload to PyPI twine upload dist/* -u __token__ -p $PYPI_API_KEY # 6. Create and push git tag git tag -a v2.0.2 -m "Release version 2.0.2" git push origin v2.0.2
Users can then install and run with:
# Using uvx (recommended - no installation needed) uvx ObsidianPilot # Or install globally with pipx pipx install ObsidianPilot ObsidianPilot # Or with pip pip install ObsidianPilot ObsidianPilot
The server now includes a persistent search index using SQLite for dramatically improved performance:
- Instant startup - No need to rebuild index on every server start
- Incremental updates - Only re-indexes files that have changed
- 60x faster searches - SQLite queries are much faster than scanning all files
- Lower memory usage - Files are loaded on-demand rather than all at once
Set these environment variables to customize behavior:
# Set logging level (default: INFO, options: DEBUG, INFO, WARNING, ERROR) export OBSIDIAN_LOG_LEVEL=DEBUG
The search index is stored in your vault at .obsidian/mcp-search-index.db.
- Search indexing - With persistent index, only changed files are re-indexed
- Concurrent operations - File operations use async I/O for better performance
- Large vaults - Incremental indexing makes large vaults (10,000+ notes) usable
- Image handling - Images are automatically resized to prevent memory issues
If you were using a previous version that required the Local REST API plugin:
- You no longer need the Obsidian Local REST API plugin - This server now uses direct filesystem access
- Replace
OBSIDIAN_REST_API_KEYwithOBSIDIAN_VAULT_PATHin your configuration - Remove any
OBSIDIAN_API_URLsettings - The new version is significantly faster and more reliable
- All features work offline without requiring Obsidian to be running
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-tool) - Write tests for new functionality
- Ensure all tests pass
- Commit your changes (
git commit -m 'Add amazing tool') - Push to the branch (
git push origin feature/amazing-tool) - Open a Pull Request
MIT License - see LICENSE file for details
- Nate Strong for creating the original obsidian-mcp foundation that made ObsidianPilot possible
- Anthropic for creating the Model Context Protocol
- Obsidian team for the amazing note-taking app
- coddingtonbear for the original Local REST API plugin (no longer required)
- dsp-ant for the FastMCP framework