obsidian-mcp
Provides semantic search capabilities for an Obsidian vault, including indexing notes, PDFs, and web pages, and searching them from within Obsidian via a plugin.
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-mcpsearch my notes for ideas about project planning"
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
Semantic search for your Obsidian vault. Index notes, PDFs, and web pages — then search them from inside Obsidian or through Claude and other LLMs via the Model Context Protocol.
What it does
Semantic search | Find notes by meaning, not just keywords. Ask "what did I write about attention mechanisms?" and get the right notes back. |
Obsidian plugin |
|
MCP server | Claude (and any MCP-compatible LLM) can search your vault, read notes, and index new URLs on your behalf. |
iCloud sync | The vector database is a single SQLite file stored inside your vault — it syncs automatically across all your Macs. |
Fully local | Embeddings run on-device via Apple MPS (Apple Silicon). No API keys, no data leaving your machine. |
Auto-reindex | A file watcher detects changes as you write and incrementally updates the index in the background. |
Related MCP server: Obsidian MCP Server
Architecture
┌─────────────────────────────────────────────────────────┐
│ Obsidian Vault (iCloud) │
│ ├── Notes/*.md │
│ ├── .obsidian-search/semantic-search.db ← vectors │
│ └── .obsidian/plugins/obsidian-semantic-search/ │
└─────────────────────────────────────────────────────────┘
▲ reads / writes ▲ plugin installed here
│ │
┌─────────┴─────────────────────────┴───────────────────┐
│ Python Backend (local process) │
│ FastAPI :51234 ◄─── Obsidian plugin (HTTP) │
│ FastMCP stdio ◄─── Claude Desktop / LLMs │
│ │
│ nomic-embed-text-v1.5 (sentence-transformers + MPS) │
│ CrossEncoder reranker (ms-marco-MiniLM-L-6-v2) │
└────────────────────────────────────────────────────────┘See docs/userflows.md for detailed Mermaid diagrams of every interaction path.
Features
Indexing
Markdown notes — header-hierarchy chunking with YAML frontmatter stored as metadata; Obsidian tags used for filtering
Tables — kept as atomic chunks; oversized tables split on row boundaries with header repeated
Mermaid diagrams — DSL text indexed as-is with surrounding context
Figure embeds (
![[image.png]]) — surrounding paragraph and caption indexedCallout blocks (
> [!note]) — atomic chunks with callout type in metadataPDFs — converted to structured Markdown via
pymupdf4llm(preserves tables, columns, infers headings)Web pages — fetched with
httpx, cleaned withtrafilatura, chunked the same way as Markdown
Search
Query embedding → ANN search (top-50 candidates) → CrossEncoder rerank → top K results
Filter by source type (
markdown,pdf,web) or Obsidian frontmatter tags~50–120 ms end-to-end on Apple Silicon
Vector storage
sqlite-vec— single.dbfile, no companion WAL/SHM files, safe for iCloud syncStored at
{vault}/.obsidian-search/semantic-search.dbIncremental updates: mtime-based deduplication skips unchanged chunks
Project structure
obsidian-mcp/
├── packages/
│ ├── backend/ # Python — FastAPI + FastMCP server
│ │ └── src/obsidian_search/
│ │ ├── config.py # pydantic-settings (VAULT_PATH, port, …)
│ │ ├── models.py # Chunk, SearchResult, IndexStatus, …
│ │ ├── ingestion/ # chunker_markdown, chunker_pdf, chunker_web
│ │ ├── embedding/ # nomic-embed-text-v1.5 singleton
│ │ ├── store/ # sqlite-vec CRUD + ANN search
│ │ ├── search/ # searcher + CrossEncoder reranker
│ │ ├── watcher/ # watchdog FSEventsObserver
│ │ ├── api/ # FastAPI routes (/search, /ingest/*, /status)
│ │ └── mcp/ # FastMCP tools for Claude
│ └── obsidian-plugin/ # TypeScript — Obsidian plugin
│ └── src/
│ ├── main.ts # Plugin entry, commands, file save hook
│ ├── settings.ts # Settings tab (server URL, top-k, …)
│ ├── api-client.ts # Typed fetch() wrapper
│ ├── search-modal.ts # SuggestModal with debounced search
│ └── types.ts # Shared interfaces
├── docs/
│ ├── userflows.md # Mermaid diagrams for all user flows
│ └── branch-protection.md # GitHub branch protection setup guide
├── .github/workflows/ci.yml # Lint + typecheck + tests gate
└── PLAN.md # Architecture decisions and implementation planPrerequisites
macOS (Apple Silicon recommended for MPS acceleration)
uv — Python package manager
Node.js ≥ 18 — for building the Obsidian plugin
Obsidian desktop app
Setup
1. Install the backend
git clone https://github.com/unnitin/obsidian-mcp.git
cd obsidian-mcp
uv sync --all-extrasThis creates .venv/ and installs all Python dependencies including the embedding model runtime.
2. Configure your vault path
cp .env.example .env
# Edit .env and set VAULT_PATH to the absolute path of your Obsidian vaultIf your vault is in iCloud (the default for Obsidian on macOS), the path contains a space. Find it with:
ls "$HOME/Library/Mobile Documents/iCloud~md~obsidian/Documents/"Then set:
VAULT_PATH=/Users/yourname/Library/Mobile Documents/iCloud~md~obsidian/Documents/YourVaultNameThe backend reads this folder directly from your local iCloud Drive cache — macOS keeps it in sync automatically. No special iCloud configuration is needed.
3. Start the backend
The backend is a local Python process that runs on the same Mac as your vault (or a Mac mini on your local network). It is not a cloud service.
./scripts/start-backend.shThis starts:
FastAPI server on
http://127.0.0.1:51234(used by the Obsidian plugin)File watcher monitoring your vault for changes and updating the index incrementally
4. Install the Obsidian plugin
./scripts/build-plugin.shThen in Obsidian: Settings → Community plugins → Enable Semantic Search.
Set the server URL to http://127.0.0.1:51234 (default) and click Test connection.
Running on a Mac mini (always-on server)
A Mac mini makes an ideal always-on host for this server. The backend process runs on the Mac mini, reads the vault from the Mac mini's local iCloud Drive folder (which macOS keeps in sync), and exposes the search API over your local network. Nothing leaves your home network.
iCloud vault path
Obsidian iCloud vaults are stored in a macOS-managed folder with a space in the path. Find yours:
ls "$HOME/Library/Mobile Documents/iCloud~md~obsidian/Documents/"Your vault path will be:
/Users/yourname/Library/Mobile Documents/iCloud~md~obsidian/Documents/YourVaultNameAlways wrap this path in double quotes in shell commands.
Prevent the Mac mini from sleeping
The server process stops if the machine sleeps. Open System Settings → Energy → Power Adapter and set:
"Prevent automatic sleeping when the display is off" → On
"Wake for network access" → On (optional, for Wake-on-LAN)
Or apply the setting from the terminal:
sudo pmset -c sleep 0 disksleep 0Auto-start with launchd
Create ~/Library/LaunchAgents/com.obsidian-search.backend.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.obsidian-search.backend</string>
<key>ProgramArguments</key>
<array>
<string>/Users/yourname/.local/bin/uv</string>
<string>run</string>
<string>--project</string>
<string>/Users/yourname/obsidian-mcp/packages/backend</string>
<string>obsidian-search-api</string>
</array>
<key>EnvironmentVariables</key>
<dict>
<key>VAULT_PATH</key>
<string>/Users/yourname/Library/Mobile Documents/iCloud~md~obsidian/Documents/YourVaultName</string>
<key>HOME</key>
<string>/Users/yourname</string>
<key>OBSIDIAN_SEARCH_HOST</key>
<string>0.0.0.0</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/obsidian-search.log</string>
<key>StandardErrorPath</key>
<string>/tmp/obsidian-search.err</string>
</dict>
</plist>Replace yourname and the vault name, then load it:
launchctl load ~/Library/LaunchAgents/com.obsidian-search.backend.plistCheck it started:
launchctl list | grep obsidian-search
curl http://localhost:51234/health
tail -f /tmp/obsidian-search.logAccess from other Macs on your network
Setting OBSIDIAN_SEARCH_HOST=0.0.0.0 (shown in the plist above) makes the server listen on all interfaces. You also need to allow the port through the macOS firewall:
Open System Settings → Network → Firewall → Options
Click +, navigate to
/Users/yourname/.venv/bin/uvicorn, and set it to Allow incoming connections
On your other Mac, use the Mac mini's local IP instead of 127.0.0.1:
# Find the Mac mini's IP
# On the Mac mini:
ipconfig getifaddr en0
# On your other Mac, set the plugin server URL to:
# http://192.168.x.x:51234Point the Obsidian plugin and Claude Desktop config to http://192.168.x.x:51234 instead of 127.0.0.1.
5. Connect Claude Desktop (optional)
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"obsidian-search": {
"command": "uv",
"args": [
"run",
"--project", "/path/to/obsidian-mcp/packages/backend",
"python", "-m", "obsidian_search.mcp.server"
],
"env": {
"VAULT_PATH": "/path/to/your/vault"
}
}
}
}Restart Claude Desktop. You'll see the 🔌 icon indicating the MCP server is connected.
Usage
Obsidian plugin
Action | How |
Search notes |
|
Index a URL |
|
Index a PDF |
|
Re-index vault | Settings tab → "Re-index entire vault" |
View index stats | Settings tab → shows total chunks and last indexed time |
Claude
Once connected, Claude can:
"What did I write about the CAP theorem?"
"Summarise my notes on async Rust"
"Index this article for me: https://..."
"How many documents are in my vault index?"Available MCP tools:
Tool | Description |
| Semantic search with optional type/tag filters |
| Read a full note by vault-relative path |
| Fetch, chunk, and index a URL |
| Index a PDF at an absolute path |
| Total chunks, documents, last indexed time |
| All indexed documents with chunk counts |
| Remove a document and all its chunks |
Development
Run tests
uv run pytest packages/backend/tests/ -vRun tests with coverage
uv run pytest packages/backend/tests/ --cov=packages/backend/src --cov-report=term-missingLint and format
uv run ruff check packages/backend/
uv run ruff format packages/backend/Type check
uv run mypy packages/backend/src/Pre-commit hooks run ruff and mypy automatically on every commit.
CI
GitHub Actions runs lint, typecheck, and tests on every PR to main. A PR cannot be merged unless the All checks passed gate job succeeds. See docs/branch-protection.md for setup instructions.
Configuration reference
All settings can be set via environment variables or a .env file in the project root.
Variable | Default | Description |
| (required) | Absolute path to your Obsidian vault |
|
| FastAPI server port |
|
| FastAPI server host |
|
| HuggingFace model ID |
|
| Default number of search results |
|
| Candidates passed to CrossEncoder |
|
| Maximum tokens per chunk |
|
| Minimum tokens before merging |
|
| JSON array of folder names to skip |
|
| Debounce delay for file watcher |
Tech stack
Layer | Technology |
Embeddings |
|
Reranking |
|
Vector store |
|
PDF parsing |
|
Web extraction |
|
Markdown parsing |
|
API server |
|
MCP server |
|
File watcher |
|
Plugin | TypeScript + Obsidian API, bundled with |
Package manager |
|
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/unnitin/obsidian-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server