A local, privacy-first knowledge management layer for Obsidian vaults. Provides semantic search, automatic tagging, backlink generation, and natural language querying — all running locally with no cloud dependency.
- Search Improvements — Hybrid BM25 + semantic search, metadata filtering (tags, folder, date range), passage-level snippets, query expansion via LLM, diversity penalties, and LRU result caching
- Todo Management System — Full CRUD MCP tools for a
todos.mdfile, smart queries (overdue, blocked, by project), LLM-powered features (natural language creation, priority/due-date suggestion), and reporting (burndown, overdue summary) - Advanced Features — Incremental indexing via file hashes (no more full re-indexes), entity extraction at index time, note summaries, switchable embedding models, performance metrics (
get_index_stats), batch operations, and semantic deduplication
See the full task list for details.
uv pip install -e .ollama pull nomic-embed-text
ollama pull qwen3:8bCreate .env in the project root:
OBSIDIAN_HOST=localhost
OBSIDIAN_PORT=27123
OBSIDIAN_API_KEY=your_api_key_here
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_EMBED_MODEL=nomic-embed-text
OLLAMA_CHAT_MODEL=qwen3:8b
CHROMA_PATH=data/chroma_dbpython -m obsidian_ai.indexerpython -m obsidian_ai.mcp_server| Command | Description |
|---|---|
python -m obsidian_ai.indexer |
One-shot full index of the Obsidian vault |
python -m obsidian_ai.indexer --watch |
Start file watcher (auto-indexes on changes) |
| Command | Description |
|---|---|
python cli.py index |
One-shot full index |
python cli.py watch |
Start file watcher daemon |
python cli.py search <query> |
Semantic search (-n for result count) |
python cli.py tag <query> |
Auto-tag notes (-n for note count) |
python cli.py stats |
Show total notes in index |
| Command | Description |
|---|---|
python -m obsidian_ai.mcp_server |
Start the MCP server (stdio transport) |
| Tool | Parameters | Description |
|---|---|---|
search_notes |
query: str, n: int = 5 |
Semantic search across indexed notes |
read_note |
path: str |
Fetch full note content |
write_note |
path: str, content: str |
Create or overwrite a note |
list_notes |
— | List all note paths in the vault |
add_tags |
path: str, tags: list[str] |
Add tags to YAML frontmatter |
create_backlink |
path_a: str, path_b: str |
Create mutual [[backlinks]] |
sync_index |
— | Re-run the full indexer pipeline |
ask_vault |
question: str, top_k: int = 3 |
Ask a question, get an LLM-powered answer from vault content |
tag_notes |
query: str, top_k: int = 5 |
Auto-suggest tags for notes matching a query |
| Command | Description |
|---|---|
uv pip install -e . |
Install project in editable mode |
ollama pull nomic-embed-text |
Pull/update the embedding model |
ollama list |
List installed Ollama models |
ollama serve |
Start Ollama server manually |
obsidian-ai/
├── src/
│ └── obsidian_ai/
│ ├── __init__.py
│ ├── config.py # Environment variables and settings
│ ├── logger.py # Shared logging module
│ ├── obsidian_client.py # Obsidian REST API wrapper
│ ├── llm_client.py # Ollama embedding wrapper
│ ├── chroma_store.py # ChromaDB vector storage
│ ├── indexer.py # Vault indexing pipeline + file watcher
│ ├── pipelines.py # Query & action pipelines (LLM-powered)
│ └── mcp_server.py # MCP server (9 tools)
├── cli.py # CLI wrapper (index, watch, search, tag, stats)
├── docs/ # User documentation
│ ├── setup.md
│ ├── architecture.md
│ ├── api.md
│ ├── mcp_server.md
│ ├── indexer.md
│ └── troubleshooting.md
├── dev/ # Internal project docs
│ ├── tasks.md
│ ├── description.md
│ └── word_limit_fix.md
├── data/
│ └── chroma_db/ # Vector database (gitignored)
├── logs/ # Log files (gitignored)
│ ├── indexer.log
│ └── mcp_calls.log
├── .env # API keys and config (gitignored)
├── pyproject.toml # Project dependencies
└── README.md
- Setup — Installation and configuration
- Architecture — System design and data flow
- API Reference — Function signatures for all modules
- MCP Server — Tool details and agent configuration
- Indexer — Chunking, sanitization, and indexing details
- Files — Project structure reference
- Troubleshooting — Common errors and fixes
Add this MCP server to any compatible AI agent. The server uses stdio transport.
{
"mcpServers": {
"obsidian-ai": {
"command": "python",
"args": ["-m", "obsidian_ai.mcp_server"],
"cwd": "/path/to/obsidian-ai"
}
}
}Note: Replace
cwdwith your actual project path.
Add to ~/.config/goose/profiles.yaml or use the UI:
{
"mcpServers": {
"obsidian-ai": {
"command": "python",
"args": ["-m", "obsidian_ai.mcp_server"],
"cwd": "/path/to/obsidian-ai"
}
}
}Add to %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"obsidian-ai": {
"command": "python",
"args": ["-m", "obsidian_ai.mcp_server"],
"cwd": "/path/to/obsidian-ai"
}
}
}Add to .cursor/mcp.json in your project root or global settings:
{
"mcpServers": {
"obsidian-ai": {
"command": "python",
"args": ["-m", "obsidian_ai.mcp_server"],
"cwd": "/path/to/obsidian-ai"
}
}
}Add to ~/.windsurf/mcp.json:
{
"mcpServers": {
"obsidian-ai": {
"command": "python",
"args": ["-m", "obsidian_ai.mcp_server"],
"cwd": "/path/to/obsidian-ai"
}
}
}Add to VS Code settings or .vscode/mcp.json:
{
"mcpServers": {
"obsidian-ai": {
"command": "python",
"args": ["-m", "obsidian_ai.mcp_server"],
"cwd": "/path/to/obsidian-ai"
}
}
}Add to opencode.json in your project root:
{
"mcpServers": {
"obsidian-ai": {
"command": "python",
"args": ["-m", "obsidian_ai.mcp_server"],
"cwd": "/path/to/obsidian-ai"
}
}
}Add to ~/.chatgpt/mcp_servers.json:
{
"obsidian-ai": {
"command": "python",
"args": ["-m", "obsidian_ai.mcp_server"],
"cwd": "/path/to/obsidian-ai"
}
}Add to librechat.yaml under mcpServers:
mcpServers:
obsidian-ai:
command: python
args:
- "-m"
- "obsidian_ai.mcp_server"
cwd: "/path/to/obsidian-ai"| Variable | Default | Description |
|---|---|---|
OBSIDIAN_HOST |
localhost |
Obsidian REST API host |
OBSIDIAN_PORT |
27123 |
Obsidian REST API port |
OBSIDIAN_API_KEY |
— | API key from Obsidian Local REST API plugin |
OLLAMA_BASE_URL |
http://localhost:11434 |
Ollama server URL |
OLLAMA_EMBED_MODEL |
nomic-embed-text |
Embedding model name |
OLLAMA_CHAT_MODEL |
qwen3:8b |
Chat/LLM model name |
CHROMA_PATH |
data/chroma_db |
ChromaDB persistent storage path |
| Log file | Contents |
|---|---|
logs/indexer.log |
Indexing errors with timestamps |
logs/mcp_calls.log |
MCP tool calls with timestamps |