Obsidian RAG MCP Server
Provides semantic vector search across an Obsidian vault, plus tools to list indexed notes and retrieve the full markdown content of a specific note.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Obsidian RAG MCP Server ποΈπ§
A Model Context Protocol (MCP) server that provides semantic search capabilities for your Obsidian vault. It allows AI models (like Claude or Cursor) to search and retrieve content from your personal knowledge base using natural language.
Features
Semantic Vector Search: Find notes by meaning, not just keywords, using OpenAI embeddings and LanceDB.
Local Knowledge Base: High-performance local vector storage using LanceDB.
Incremental Indexing: Intelligent indexing that only processes new or modified files using hash-based tracking.
Privacy First: Your data stays local; only text fragments are sent to the embedding provider.
Related MCP server: EzRAG MCP Server
π Tools Provided
The following tools are exposed to the MCP client:
obsidian_search: Performs a semantic search across the vault. Returns relevant document chunks based on a natural language query.obsidian_list_files: Lists all indexed files, with optional pattern filtering.obsidian_get_file: Retrieves the full markdown content of a specific note.
π Installation
Note: These instructions are for macOS and Linux. Windows users might need to use WSL or Git Bash.
Prerequisites
Node.js (v24 or higher)
An Obsidian vault.
An OpenAI-compatible API key (defaulting to OpenRouter).
Setup
Clone the repository: (Recommended for macOS/Linux:
~/.local/opt)mkdir -p ~/.local/opt && cd ~/.local/opt git clone https://github.com/yourusername/obsidian-rag.git cd obsidian-ragInstall dependencies:
pnpm installBuild the project:
pnpm run buildSet environment variables: The server requires two environment variables:
OPENROUTER_API_KEY: Your API key from OpenRouter.OBSIDIAN_VAULT_PATH: Absolute path to your Obsidian vault (e.g.,/Users/you/Documents/Obsidian).
π Initial Indexing
Run the indexer once to create the initial vector database:
pnpm run indexTo force a complete re-index (drops the existing database and indexes from scratch):
pnpm run reindexπ Integration
Claude Desktop
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"obsidian-rag": {
"command": "node",
"args": ["/absolute/path/to/obsidian-rag/dist/server-mcp.js"],
"env": {
"OPENROUTER_API_KEY": "sk-or-your-api-key",
"OBSIDIAN_VAULT_PATH": "/absolute/path/to/vault"
}
}
}
}Cursor
Go to Settings > Cursor Settings > MCP.
Click + Add New MCP Server.
Name:
obsidian-ragType:
commandCommand:
node /absolute/path/to/obsidian-rag/dist/server-mcp.jsAdd environment variables:
OPENROUTER_API_KEYandOBSIDIAN_VAULT_PATH.
π Auto-indexing (macOS)
You can keep your index up to date automatically using the provided plist template.
Copy the template to your LaunchAgents folder:
cp templates/local.obsidian-rag.index.plist.example ~/Library/LaunchAgents/local.obsidian-rag.index.plistEdit the file:
Replace
{HOME}with your home directory path (e.g.,/Users/yourname).Replace
{OBSIDIAN_VAULT_PATH}with your vault path.Replace
{YOUR_API_KEY}with your OpenRouter API key.
Load the agent:
launchctl load ~/Library/LaunchAgents/local.obsidian-rag.index.plist
π§ͺ Development
pnpm run build: Compile the TypeScript code.pnpm run typecheck: Run type checking.pnpm run reindex: Drop the database and re-index the vault from scratch.pnpm test: Run tests using Vitest.
License
MIT License - see the LICENSE file for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Search your Obsidian vault to quickly find notes by title or keyword, summarize related content, aβ¦
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analyβ¦
Search, read, and safely update Markdown notes in your connected Phasoric knowledge vaults.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to read, write, search, and navigate Obsidian vault notes with support for CRUD operations, full-text search, graph navigation, daily notes, and frontmatter management.4,114 npm-
- 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
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage and search Obsidian notes, folders, metadata, and links directly.-
- AlicenseAqualityCmaintenanceEnables AI assistants to read, write, search, navigate, and manage notes in an Obsidian vault using natural language, including metadata, tags, backlinks, and folders.141MIT