Enables dynamic, real-time access to Obsidian vaults for querying, reading, and programmatically managing markdown notes using keyword and semantic search.
Click on "Install 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 Serversearch my vault for notes about the project architecture"
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
Provides real-time Claude AI access to Obsidian vaults via Model Context Protocol (MCP)
Overview
This MCP server enables Claude to query, search, and read notes from Obsidian vaults without token limitations. Unlike Claude Projects which load all documents into context, this server provides dynamic, on-demand access to your knowledge base.
Features
Real-time Vault Access: Query and read notes dynamically without pre-uploading
Automatic Index Updates: File system watcher automatically updates vector index when notes change (v1.3.0)
Vector Search: Semantic search using local embeddings (Transformers.js) or Anthropic API
Hybrid Search: Combines keyword and semantic search for optimal results
Write Operations: Create, update, and delete notes programmatically
Search Tools: Keyword, tag, and folder-based filtering
Multiple Formats: JSON and Markdown response formats
Secure: Path validation and security checks prevent unauthorized access
Token Efficient: No vault size limitations or token constraints
Quick Start
Prerequisites
Node.js 18+ (recommended: 20+)
TypeScript 5.7+
Obsidian vault with markdown notes
Claude Desktop or MCP-compatible client
Installation
Windows (PowerShell):
# 1. Clone or navigate to repository
cd /path/to/obsidian-mcp-server
# 2. Install dependencies
npm install
# 3. Build TypeScript
npm run build
# 4. Verify build succeeded
Test-Path dist\index.js # Should return TruemacOS/Linux (Bash):
# 1. Clone or navigate to repository
cd ~/obsidian-mcp-server
# 2. Install dependencies
npm install
# 3. Build TypeScript
npm run build
# 4. Verify build succeeded
ls dist/index.js # Should existConfiguration
Option 1: Environment Variable (Recommended)
Windows (PowerShell):
# Set vault path (replace with your vault location)
$env:OBSIDIAN_VAULT_PATH = "C:\Users\YourName\Documents\ObsidianVault"
# Test server
node dist\index.jsmacOS/Linux (Bash):
# Set vault path (replace with your vault location)
export OBSIDIAN_VAULT_PATH="/Users/YourName/Documents/ObsidianVault"
# Test server
node dist/index.jsOption 2: Configuration File
Create config.json in the project root:
{
"includePatterns": ["**/*.md"],
"excludePatterns": [".obsidian/**", ".trash/**", "node_modules/**"],
"enableWrite": true,
"vectorSearch": {
"enabled": true,
"provider": "transformers",
"model": "Xenova/all-MiniLM-L6-v2",
"indexOnStartup": "auto"
},
"searchOptions": {
"maxResults": 20,
"excerptLength": 200,
"caseSensitive": false,
"includeMetadata": true
},
"logging": {
"level": "info",
"file": "logs/mcp-server.log"
}
}Choosing the Right Embedding Model:
The default model (Xenova/all-MiniLM-L6-v2) works well for most users. Consider upgrading based on your hardware:
High-end CPU (Ryzen 9+, i9+, M3 Max+): Use
Xenova/bge-base-en-v1.5for best qualityMid-range CPU (Ryzen 5-7, i5-i7, M2): Use
Xenova/bge-small-en-v1.5for improved qualityMultilingual vault: Use
Xenova/paraphrase-multilingual-MiniLM-L12-v2
See Semantic Search Guide for detailed model comparison.
Initial Indexing (Required for Large Vaults)
Important: For vaults with 1,000+ notes or when switching embedding models, run initial indexing standalone before using Claude Desktop.
Quick Start:
# Windows
$env:OBSIDIAN_VAULT_PATH = "X:\Path\To\Your\Vault"
$env:OBSIDIAN_CONFIG_PATH = "D:\repos\obsidian-mcp-server\config.json"
node --expose-gc --max-old-space-size=16384 dist\index.js# macOS/Linux
export OBSIDIAN_VAULT_PATH="/path/to/vault"
export OBSIDIAN_CONFIG_PATH="$HOME/obsidian-mcp-server/config.json"
node --expose-gc --max-old-space-size=16384 dist/index.jsAfter indexing completes, configure Claude Desktop (see below) for daily usage.
π See Indexing Workflow Guide for detailed instructions, troubleshooting, and model switching procedures.
Claude Desktop Integration
Windows
Edit Claude Desktop configuration:
# Config location: %APPDATA%\Claude\claude_desktop_config.json
notepad "$env:APPDATA\Claude\claude_desktop_config.json"Add this configuration:
{
"mcpServers": {
"obsidian": {
"command": "node",
"args": ["/path/to/obsidian-mcp-server/dist/index.js"],
"env": {
"OBSIDIAN_VAULT_PATH": "C:\\Users\\YourName\\Documents\\ObsidianVault"
}
}
}
}macOS
Edit Claude Desktop configuration:
# Config location: ~/Library/Application Support/Claude/claude_desktop_config.json
vi ~/Library/Application\ Support/Claude/claude_desktop_config.jsonAdd this configuration:
{
"mcpServers": {
"obsidian": {
"command": "node",
"args": ["/path/to/obsidian-mcp/dist/index.js"],
"env": {
"OBSIDIAN_VAULT_PATH": "/path/to/your/vault"
}
}
}
}Restart Claude Desktop
After configuration, completely quit and restart Claude Desktop for changes to take effect.
Documentation
Indexing Workflow Guide - Initial setup, model switching, and troubleshooting
Configuration Guide - Complete configuration reference
Semantic Search Guide - Semantic search setup and usage
Usage
In Claude Conversations
Once configured, Claude can automatically access your vault:
User: "Search my vault for notes about Python debugging"
Claude will use: obsidian_search_vault(query="Python debugging")
Returns: Matching notes with excerpts and URIs
User: "Show me the full Getting-Started note"
Claude will read: obsidian://vault/Guides/Getting-Started.md
Returns: Complete note contentAvailable Tools
obsidian_search_vault
Search vault by keywords, tags, or folders.
Parameters:
query(required): Search keywords (space-separated)tags(optional): Filter by tags (must have ALL)folders(optional): Limit to specific folderslimit(optional): Max results (1-100, default: 20)offset(optional): Pagination offset (default: 0)response_format(optional): "markdown" or "json" (default: "markdown")
Examples:
// Find notes about a specific topic
obsidian_search_vault((query = "JavaScript testing"));
// Find active project notes
obsidian_search_vault(
(query = "project"),
(tags = ["active"]),
(folders = ["Projects"])
);obsidian_semantic_search
Search vault using semantic similarity (meaning-based) instead of keyword matching.
Parameters:
query(required): Natural language query (1-500 chars)limit(optional): Max results (1-50, default: 10)min_score(optional): Similarity threshold (0-1, default: 0.5)hybrid(optional): Combine with keyword search (default: false)response_format(optional): "markdown" or "json" (default: "markdown")
Examples:
// Find conceptually related notes
obsidian_semantic_search((query = "machine learning ethics"));
// Hybrid search (semantic + keyword)
obsidian_semantic_search(
(query = "web development best practices"),
(hybrid = true),
(limit = 15)
);obsidian_create_note
Create a new note in the vault.
Parameters:
path(required): Relative path for new note (e.g., "Projects/NewNote.md")content(required): Note content (markdown)frontmatter(optional): YAML frontmatter object
obsidian_update_note
Update an existing note's content or frontmatter.
Parameters:
path(required): Relative path to notecontent(optional): New content (replaces existing)frontmatter(optional): New frontmatter (merges with existing)append(optional): Append content instead of replace (default: false)
obsidian_delete_note
Delete a note from the vault.
Parameters:
path(required): Relative path to noteconfirm(required): Must betrueto confirm deletion
Available Resources
Every note in your vault is exposed as a resource with URI:
obsidian://vault/[relative-path]Claude can list all available notes and read specific notes by URI.
Architecture
Design Philosophy
This server uses a search-tool-only approach rather than pre-registering thousands of individual resources:
Efficient: Claude uses
obsidian_search_vaultto find notes dynamicallyScalable: Works with vaults of any size (tested with 5,000+ notes)
Fast: No startup delay from resource registration
MCP-compliant: Follows best practices for large datasets
Claude discovers notes through search, receives obsidian://vault/ URIs, and can then read specific notes on demand.
Component Diagram
graph LR
A[Claude AI] -->|MCP Protocol| B[MCP Server]
B -->|stdio| A
B --> C[Vault Manager]
C --> D[Search Engine]
C --> E[File Reader]
D --> F[Obsidian Vault]
E --> FComponents
index.ts - Server initialization and transport setup
obsidian-server.ts - MCP request handlers (resources, tools)
search.ts - Search engine with scoring and filtering
utils.ts - Configuration, file operations, security
Security
Path Validation
All file paths are validated to prevent directory traversal attacks:
// Checks that requested path is within vault boundaries
if (!isPathSafe(notePath, vaultPath)) {
throw new Error("Access denied: path outside vault");
}Read-Only Mode
By default, server is read-only. To enable write operations (future feature):
{
"enableWrite": true
}Input Sanitization
Zod schemas validate all tool inputs
Path normalization prevents Windows/Unix path issues
Query limits prevent resource exhaustion (max 500 chars)
Development
Build
npm run buildDevelopment Mode (Hot Reload)
npm run devLinting
npm run lint
npm run formatTesting
npm testTroubleshooting
Server Not Starting
Check vault path:
# Windows
Test-Path "C:\Users\YourName\Documents\ObsidianVault" # Should return True# macOS/Linux
ls -la ~/Documents/ObsidianVault # Should show folder contentsCheck build output:
# Windows
Test-Path .\dist\index.js # Should return True# macOS/Linux
ls dist/index.js # Should existView error logs:
# All platforms
node dist/index.jsClaude Not Finding Server
Verify config file location:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Check JSON syntax: Use a JSON validator
Restart Claude Desktop completely (don't just close window)
Check Claude logs:
Windows:
%APPDATA%\Claude\logs\macOS:
~/Library/Logs/Claude/
Search Returns No Results
Check exclude patterns - Your notes might be excluded
Verify file extension - Only
.mdfiles are indexedCheck query terms - Try broader terms
Permission Errors
Ensure your user has read access to:
Vault directory
All subdirectories
All
.mdfiles
Configuration Options
Full configuration schema:
{
```typescript
{
// Note: vaultPath is set via OBSIDIAN_VAULT_PATH env variable
includePatterns: string[]; // Glob patterns to include
excludePatterns: string[]; // Glob patterns to exclude
enableWrite: boolean; // Enable write operations
vectorSearch?: { // Optional vector search config
enabled: boolean; // Enable semantic search
provider: "transformers"; // Embedding provider
model?: string; // Model name (default: Xenova/all-MiniLM-L6-v2)
indexOnStartup: "auto" | "always" | "never" | boolean; // Smart indexing (default: "auto")
};
searchOptions: {
maxResults: number; // Max search results (default: 20)
excerptLength: number; // Excerpt length (default: 200)
caseSensitive: boolean; // Case-sensitive search (default: false)
includeMetadata: boolean; // Include frontmatter (default: true)
};
logging: {
level: string; // Log level (default: "info")
file: string; // Log file path
};
}Performance
Optimization Strategies
Lazy loading - Only reads files when requested
Pagination - Limits search results
Character limits - Truncates large responses
Exclude patterns - Skips unnecessary files
Recommended Limits
Vault size: < 10,000 notes
Search results: < 100 per query
File size: < 10MB per note
Future Enhancements
Indexing - Pre-build search index for faster queries
Caching - Cache frontmatter and metadata
Vector search - Semantic similarity search
Watch mode - Real-time file system monitoring
MCP Protocol Compliance
This server follows MCP best practices:
β Zod input validation
β Tool annotations (readOnlyHint, destructiveHint, etc.)
β Multiple response formats (JSON/Markdown)
β Character limits (25k) with truncation
β Proper error handling
β Pagination support
β Security validation
β Descriptive tool documentation
β Search-tool pattern for large datasets
Changelog
v1.4.0 (December 2025) - Parallel Batch Processing & Smart Auto-Indexing
Performance Improvements:
π 10x faster indexing: Parallel batch processing with Promise.all (10 concurrent embeddings)
β‘ 65x speedup: 5,681 notes indexed in 5.5 minutes (down from 6+ hours)
πΎ Robust checkpoints: Proper Vectra transaction management (beginUpdate/endUpdate)
π§ Memory optimized: Explicit GC at checkpoints, pipeline refresh every 500 notes
π Production tested: Successfully indexed 5,681/6,056 notes (93.8% coverage)
New Features:
β Smart
indexOnStartupmodes:"auto"(smart detection),"always","never"β Automatic model change detection: No manual config toggling when switching models
β Index validation: Detects missing, corrupted, or incompatible indexes
β Model metadata storage: Stores model info in index for validation
β Seamless model switching: Just change model in config and restart - auto re-indexes
Bug Fixes:
β Fixed checkpoint persistence: Vectra index now properly flushed to disk at checkpoints
β Eliminated index loss: Transaction management prevents progress loss on crashes
β Type safety: Fixed batch processing parameter types for NoteMetadata
Breaking Changes:
β οΈ
indexOnStartupenhanced: Now accepts string values ("auto","always","never") in addition to boolean (backwards compatible)β οΈ Default changed:
indexOnStartupnow defaults to"auto"instead offalse
Migration:
Old config with
true/falsestill works (mapped to"always"/"never")Recommended: Update to
"auto"for best experienceDelete old indexes: If you have incomplete indexes from v1.3, delete
.mcp-vector-store/and let v1.4 rebuild with parallel processing
v1.3.0 (October 2025) - Automatic Index Updates
New Features:
β Automatic file watching: Real-time vector index updates when notes change (chokidar)
β Debounced re-indexing: Smart 2-second delay prevents excessive rebuilds
β Seamless integration: No manual re-indexing required
Breaking Changes:
β οΈ Config property renamed:
autoIndexβindexOnStartup(better reflects that it only controls initial indexing on server startup, not the automatic file watching)
v1.2.0 (October 2025) - Vector Search & Write Operations
New Features:
β Semantic search with vector embeddings (Transformers.js)
β Write operations: Create, update, and delete notes
β Hybrid search: Combine semantic and keyword search (60/40 weighting)
β Incremental indexing: Track file modifications for efficient updates
β Local embeddings: Privacy-first with Xenova/all-MiniLM-L6-v2 model
Bug Fixes:
β Fixed config.json loading to use script directory instead of CWD
β Fixed tags handling for non-array frontmatter tags
β Improved error handling for malformed YAML frontmatter
Performance:
β Tested with 5,457 note vault (5,456 indexed successfully)
β Fast startup with optional auto-indexing
β Vectra-based local vector store (no external server required)
v1.0.0 (January 2025) - Production Release
Architecture:
β Search-tool-only design (no resource pre-registration)
β Fast startup (< 1 second)
β Scalable to vaults of any size
Security:
β Updated all dependencies (0 vulnerabilities)
β ESLint 9.17.0, Rimraf 6.0.1, TypeScript-ESLint 8.18.2
β Eliminated deprecated packages with memory leak risks
MCP SDK:
β Migrated to MCP SDK 1.20+ API
β Updated from old
registerResourceList/registerResourcemethodsβ Clean TypeScript compilation (0 errors)
Testing:
β Verified with 5,453 note vault
β Tested on Windows 11 with Node.js 25.0.0
β Confirmed Claude Desktop integration
License
MIT License - See LICENSE file for details
Contributing
Contributions welcome! Please:
Follow existing code style
Add tests for new features
Update documentation
Follow MCP best practices
References
Built with β€οΈ for the Obsidian + Claude community
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.