obsidian-rag-mcp
Provides semantic search over Obsidian vaults, enabling natural language queries to find relevant notes based on meaning.
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-rag-mcpFind notes about database connection issues"
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 RAG MCP Server
Your notes, searchable by meaning.
An MCP server that gives Claude Code semantic search over your Obsidian vault. Ask questions in natural language, get answers from your own documents.
The Problem
You have 500 notes in Obsidian. You know you wrote something about database timeouts causing customer issues... somewhere. Ctrl+F won't help when you don't remember the exact words.
Related MCP server: Smart Connections MCP Server
The Solution
This server indexes your vault with vector embeddings. Ask for "RCAs where database timeouts caused customer-facing issues" and get results even if your notes use terms like "CosmosDB latency", "connection pool exhaustion", or "query timeout."
Semantic search. Vectors stored locally. Sub-second queries.
Quick Start
# Clone and install (using uv - recommended)
git clone https://github.com/danielscholl/obsidian-rag-mcp.git
cd obsidian-rag-mcp
uv sync
# Set your API key
export OPENAI_API_KEY="sk-..."
# Index the sample vault (or your own)
uv run obsidian-rag index --vault ./vault
# Search it
uv run obsidian-rag search "database connection issues" --vault ./vaultQuery: database connection issues
Found 3 results (searched 1154 chunks)
--- Result 1 (score: 0.480) ---
Source: RCAs/2025-05-17-database-connection-pool-exhaustion.md
Tags: database, p1, rca
# 2025-05-17 - Database Connection Pool Exhaustion in payment-gateway...
--- Result 2 (score: 0.466) ---
Source: RCAs/2025-06-18-database-connection-pool-exhaustion.md
Tags: database, p2, rca
# 2025-06-18 - Database Connection Pool Exhaustion in auth-service...Connect to Claude Code
Add to ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"obsidian-rag": {
"command": "uv",
"args": ["run", "--directory", "/path/to/obsidian-rag-mcp", "obsidian-rag", "serve"],
"env": {
"OBSIDIAN_VAULT_PATH": "/path/to/your/vault",
"OPENAI_API_KEY": "sk-..."
}
}
}
}Then ask Claude things like:
"Search my vault for notes about Kubernetes deployments"
"Find RCAs related to authentication failures"
"What did I write about the Q3 migration?"
MCP Tools
Tool | What it does |
| Semantic search across all content |
| Filter by Obsidian tags |
| Retrieve full note content |
| Find notes similar to a given note |
| Recently modified notes |
| Index statistics |
| Search with extracted conclusions |
| Trace reasoning for a conclusion |
| Find related conclusions |
How It Works
Index: Scans your vault, chunks markdown intelligently (respecting headers, code blocks), generates embeddings via OpenAI
Store: Vectors go into ChromaDB (local, no external database needed)
Query: Your question gets embedded, matched against stored vectors, ranked results returned
Reasoning (optional): Extract conclusions from notes at index time for richer search results
Documentation:
Getting Started - 5-minute tutorial with Claude Desktop setup
Architecture - System design
Development - Local setup (includes Windows)
Integration - Use with other agents/pipelines
Configuration
Variable | Required | Description |
| Yes* | For embeddings (and reasoning if enabled) |
| No* | Azure OpenAI endpoint URL |
| No* | Azure OpenAI API key |
| No | Azure API version (default: |
| No | Azure deployment name (default: |
| No | Default vault path |
| No | Enable conclusion extraction (default: false) |
* Either OPENAI_API_KEY or AZURE_OPENAI_ENDPOINT + AZURE_API_KEY is required. When both Azure variables are set, Azure OpenAI is used automatically.
Cost: ~$0.02 to index 100 notes. Queries are essentially free.
Development
uv sync
# Tests
uv run pytest
# Lint + format
uv run black obsidian_rag_mcp/ tests/
uv run ruff check obsidian_rag_mcp/ tests/See docs/DEVELOPMENT.md for the full guide.
Requirements
Python 3.11+
OpenAI API key
An Obsidian vault (or use
vault/for testing)
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Search your Obsidian vault to quickly find notes by title or keyword, summarize related content, a…
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Search everything you save: YouTube, articles, podcasts, PDFs, Notion, Obsidian. API key or OAuth.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables semantic search and knowledge graph exploration of Obsidian vaults using Smart Connections embeddings. Provides intelligent note discovery, similarity search, and connection mapping through natural language queries.73 npm56MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to perform semantic search across your Obsidian vault using Smart Connections vector database. Provides meaning-based search, related note discovery, and context retrieval for RAG queries instead of basic keyword matching.11-
- AlicenseAqualityAmaintenanceStandalone MCP server for Obsidian vaults - hybrid search (FTS5 + vector + cross-encoder reranking), images and PDFs in agent-readable form, Kanban-aware tasks (Tasks-plugin + Dataview formats), structured memory with topic recall, fine-grained read/write tools for optimal token efficiency, and link graph support. Run locally, self-host, or one-click deploy for remote access. OAuth 2.1.433596 npm19MIT
- AlicenseNot gradedqualityDmaintenanceProvides semantic search and keyword search over Obsidian notes, along with direct note retrieval, allowing external AI agents to query and access the vault.19BSD Zero Clause