mcp-obsidian-index

MCP.Pizza Chef: tcsavage

The mcp-obsidian-index is an MCP server designed to provide semantic search capabilities over Obsidian vaults. It exposes recently modified notes as resources accessible via a custom obsidian:// URL scheme, supporting markdown content. The server includes a search-notes tool that performs semantic searches across indexed notes, enabling efficient retrieval of relevant information. It supports multiple vaults, local database storage, and real-time updates through watch mode, making it ideal for integrating Obsidian knowledge bases into AI workflows and copilots.

Use This MCP server To

Perform semantic search over Obsidian vault notes Expose recently modified notes as MCP resources Integrate Obsidian notes into AI-assisted workflows Enable real-time indexing and updates of vault content Access markdown notes via obsidian:// URL scheme

README

Obsidian Index MCP server

An MCP server that provides a semantic search over an Obsidian vault and exposes recent notes as resources.

Components

Resources

The server exposes recently modified notes in your vaults as resources to MCP clients.

  • Notes are addressed by an obsidian://<VAULT_NAME>/<NOTE_PATH> URL scheme
  • Notes have the text/markdown media type

Tools

The server implements one tool:

  • search-notes: Performs semantic search over indexed notes

Run the server

uv run obsidian-index mcp --vault <VAULT_PATH> --database <DATABASE_PATH> --reindex --watch
  • --vault: Path to the Obsidian vault (can be specified multiple times)
  • --database: Path to the local database file (will be created if it doesn't exist)
  • --reindex: Reindex all notes in the vault (you probably want this every time right now)
  • --watch: Watch for changes in the vault and update the index accordingly

Quickstart

Install

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

Development/Unpublished Servers Configuration ``` "mcpServers": { "obsidian-index": { "command": "uv", "args": [ "--directory", "", "run", "obsidian-index", "--database", "", "--vault", "", "--reindex", "--watch" ] } } ```
Published Servers Configuration ``` "mcpServers": { "obsidian-index": { "command": "uvx", "args": [ "obsidian-index", "--database", "", "--vault", "", "--reindex", "--watch" ] } } ```

Development

Building and Publishing

To prepare the package for distribution:

  1. Sync dependencies and update lockfile:
uv sync
  1. Build package distributions:
uv build

This will create source and wheel distributions in the dist/ directory.

  1. Publish to PyPI:
uv publish

Note: You'll need to set PyPI credentials via environment variables or command flags:

  • Token: --token or UV_PUBLISH_TOKEN
  • Or username/password: --username/UV_PUBLISH_USERNAME and --password/UV_PUBLISH_PASSWORD

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.

You can launch the MCP Inspector via npm with this command:

npx @modelcontextprotocol/inspector uv --directory <PATH_TO_PROJECT> run obsidian-index

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

mcp-obsidian-index FAQ

How do I start the mcp-obsidian-index server?
Run `uv run obsidian-index mcp --vault <VAULT_PATH> --database <DATABASE_PATH> --reindex --watch` to start the server with your vault and database paths, enabling reindexing and watch mode.
Can I index multiple Obsidian vaults simultaneously?
Yes, you can specify multiple `--vault` options to index several vaults at once.
What format are the notes exposed in?
Notes are exposed as resources with the `text/markdown` media type, accessible via the `obsidian://<VAULT_NAME>/<NOTE_PATH>` URL scheme.
How does the server handle updates to notes?
Using the `--watch` flag, the server monitors vault changes and updates the index in real time.
What is the purpose of the `--reindex` flag?
The `--reindex` flag forces the server to reindex all notes in the vault, useful for initial setup or after major changes.
Which tool does the server provide for searching?
The server provides the `search-notes` tool to perform semantic searches over the indexed notes.
Is the server compatible with different LLM providers?
Yes, it can be integrated with models from OpenAI, Claude, Gemini, and others via MCP clients.
How are notes addressed within the MCP ecosystem?
Notes use a custom URL scheme `obsidian://<VAULT_NAME>/<NOTE_PATH>` for unique identification and access.