MCP server for semantic search over Obsidian notes using local RAG
Project description
obsidian-notes-rag
MCP server for semantic search over your Obsidian vault. Uses OpenAI embeddings by default (or Ollama for local processing) with ChromaDB for vector storage.
What it does
Ask natural language questions about your notes:
- "What did I write about project planning?"
- "Find notes similar to my meeting notes from last week"
- "What's in my daily notes about the API refactor?"
Requirements
Quick Start
The easiest way to get started is with uvx (no installation required):
# Run the setup wizard
uvx obsidian-notes-rag setup
Add to Claude Code (CLI)
claude mcp add -s user obsidian-notes-rag -- uvx obsidian-notes-rag serve
Add to Claude Desktop (JSON config)
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"obsidian-notes-rag": {
"command": "uvx",
"args": ["obsidian-notes-rag", "serve"]
}
}
}
Alternative: Clone and install
git clone https://github.com/ernestkoe/obsidian-notes-rag.git
cd obsidian-notes-rag
uv sync
uv run obsidian-notes-rag setup
claude mcp add -s user obsidian-notes-rag -- uv run --directory /path/to/obsidian-notes-rag obsidian-notes-rag serve
The setup wizard will:
- Ask for your embedding provider (OpenAI, Ollama, or LM Studio)
- Configure your API key (for OpenAI) or local server URL
- Set your Obsidian vault path
- Choose where to store the search index
- Optionally run the initial indexing
- Optionally install the watcher service (macOS) for auto-indexing
Manual Setup (alternative)
# Set your API key and index directly
export OPENAI_API_KEY=sk-...
uv run obsidian-notes-rag index --vault /path/to/your/vault
Using Ollama (local, offline)
# Install Ollama and pull the embedding model
ollama pull nomic-embed-text
# Run setup with Ollama, or index directly:
uv run obsidian-notes-rag --provider ollama index --vault /path/to/your/vault
Using LM Studio (local, offline)
# Start LM Studio and load an embedding model
# The server auto-detects available models
uv run obsidian-notes-rag --provider lmstudio index --vault /path/to/your/vault
MCP Tools
Once connected, these tools are available to Claude:
| Tool | What it does |
|---|---|
search_notes |
Find notes matching a query |
get_similar |
Find notes similar to a given note |
get_note_context |
Get a note with related context |
get_stats |
Show index statistics |
reindex |
Update the index |
Keeping the Index Fresh
Option 1: Manual reindex
uv run obsidian-notes-rag index
Option 2: Watch for changes (all platforms)
Run the watcher in a terminal to auto-index when files change:
uv run obsidian-notes-rag watch
Option 3: Background service (macOS only)
Install as a launchd service that starts on login:
uv run obsidian-notes-rag install-service
The service appears as obsidian-notes-rag-watcher in System Settings > Login Items & Extensions > App Background Activity, making it easy to identify and manage.
Note: The setup wizard offers to install this service automatically on macOS. Linux/Windows users can run
watchmanually or configure their own systemd/Task Scheduler jobs.
CLI Reference
obsidian-notes-rag setup # Interactive setup wizard
obsidian-notes-rag serve # Start MCP server (for Claude Code)
obsidian-notes-rag index [--clear] # Index vault (--clear to rebuild)
obsidian-notes-rag search "query" # Search from command line
obsidian-notes-rag watch # Watch for file changes
obsidian-notes-rag stats # Show index stats
obsidian-notes-rag install-service # Install macOS launchd service
obsidian-notes-rag uninstall-service # Remove service
obsidian-notes-rag service-status # Check service status
Configuration
Set your vault path and provider via CLI options or environment variables:
# CLI options
uv run obsidian-notes-rag --vault /path/to/vault index
uv run obsidian-notes-rag --provider ollama index
uv run obsidian-notes-rag --provider lmstudio index
# Environment variables
export OBSIDIAN_RAG_VAULT=/path/to/vault
export OBSIDIAN_RAG_PROVIDER=ollama # or "openai" (default) or "lmstudio"
| Variable | Description |
|---|---|
OPENAI_API_KEY |
OpenAI API key (required for default provider) |
OBSIDIAN_RAG_PROVIDER |
Embedding provider: openai (default), ollama, or lmstudio |
OBSIDIAN_RAG_VAULT |
Path to Obsidian vault |
OBSIDIAN_RAG_DATA |
Where to store the index (default: platform-specific) |
OBSIDIAN_RAG_OLLAMA_URL |
Ollama API URL (default: http://localhost:11434) |
OBSIDIAN_RAG_LMSTUDIO_URL |
LM Studio API URL (default: http://localhost:1234) |
OBSIDIAN_RAG_MODEL |
Override embedding model |
How it works
- Parses your markdown files and splits them by headings
- Generates embeddings using OpenAI API (or Ollama for local processing)
- Stores vectors in ChromaDB (local, persistent)
- MCP server provides semantic search to Claude
Contributing
See CONTRIBUTING.md for development setup.
Support
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file obsidian_notes_rag-0.4.0.tar.gz.
File metadata
- Download URL: obsidian_notes_rag-0.4.0.tar.gz
- Upload date:
- Size: 181.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d58301fd00e61f0e94a17938e637843edf09686a0b85de72b1cfc2b650cf00b
|
|
| MD5 |
f802da5c68714683b309b25a455e873d
|
|
| BLAKE2b-256 |
827dacf2310258e2b693416a0f3e5add1b76179848d9cb31f6d1295927cbe619
|
Provenance
The following attestation bundles were made for obsidian_notes_rag-0.4.0.tar.gz:
Publisher:
release.yml on ernestkoe/obsidian-notes-rag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
obsidian_notes_rag-0.4.0.tar.gz -
Subject digest:
2d58301fd00e61f0e94a17938e637843edf09686a0b85de72b1cfc2b650cf00b - Sigstore transparency entry: 844238524
- Sigstore integration time:
-
Permalink:
ernestkoe/obsidian-notes-rag@eac6a7785872a15eeaa88fb96953bfa880510dd0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ernestkoe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eac6a7785872a15eeaa88fb96953bfa880510dd0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file obsidian_notes_rag-0.4.0-py3-none-any.whl.
File metadata
- Download URL: obsidian_notes_rag-0.4.0-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcb6ffd709db4b0a932114c8e2bf38a9e2231e7eb6f611341747464f93fff422
|
|
| MD5 |
854d54f39290ca458550e14738910bc8
|
|
| BLAKE2b-256 |
ec94989d75bd40031d38d4a9ae6ebc1798acb9ed21464a7a121d07d1850a4585
|
Provenance
The following attestation bundles were made for obsidian_notes_rag-0.4.0-py3-none-any.whl:
Publisher:
release.yml on ernestkoe/obsidian-notes-rag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
obsidian_notes_rag-0.4.0-py3-none-any.whl -
Subject digest:
dcb6ffd709db4b0a932114c8e2bf38a9e2231e7eb6f611341747464f93fff422 - Sigstore transparency entry: 844238526
- Sigstore integration time:
-
Permalink:
ernestkoe/obsidian-notes-rag@eac6a7785872a15eeaa88fb96953bfa880510dd0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ernestkoe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eac6a7785872a15eeaa88fb96953bfa880510dd0 -
Trigger Event:
push
-
Statement type: