Skip to main content
Glama
DalecB

Obsidian Semantic Search MCP

by DalecB

Your Obsidian vault is useful only if your agent can find the right note.

Keyword search misses context. Full write-capable Obsidian MCP servers expose more power than a retrieval agent needs. Obsidian plugins are great inside Obsidian, but they are not always the right boundary for Codex, Claude Desktop, Cursor, or any other MCP client.

This project is the narrow version:

local Obsidian vault -> read-only scanner -> local SQLite index -> MCP search/read tools

No note writes. No cloud embeddings by default. No Obsidian plugin runtime. No sync service.

Status: 0.3.1 early preview. The server is usable today, but ranking behavior and tool schemas may change before 1.0.

What You Get

Need

What this server does

Find the note an agent should read

Hybrid semantic + keyword search over Markdown notes

Keep the vault safe

Exposes search/read/index/status only; no write, patch, move, rename, or delete tools

Stay local-first

Uses Ollama embeddings and stores the index on your machine

Make results agent-friendly

Returns file-level matches with headings, snippets, and line ranges

Avoid plugin state

Reads the vault directly from the filesystem; Obsidian does not need to be running

Example result shape:

{
  "path": "02_Projects/RealtimeAPI/05_Interview_QA.md",
  "title": "Interview Q&A",
  "score": 0.7431,
  "matched_sections": [
    {
      "heading": "Level 4 > Redis Lua atomicity",
      "lines": [266, 305],
      "reason": "semantic=1, keyword=0.5565, metadata=0.6"
    }
  ]
}

Related MCP server: second-brain-mcp

Quick Start

Requirements:

  • Node.js >= 24

  • Ollama

  • An Obsidian vault

  • An MCP client such as Codex, Claude Desktop, Cursor, or another stdio MCP client

Install the embedding model:

ollama pull bge-m3
curl http://localhost:11434/api/tags

Print setup guidance:

npx -y --package @dalecb/obsidian-semantic-mcp obsidian-semantic-mcp-setup

Codex Setup

Add this to ~/.codex/config.toml:

[mcp_servers.obsidian_semantic]
command = "npx"
args = ["-y", "@dalecb/obsidian-semantic-mcp"]

[mcp_servers.obsidian_semantic.env]
OBSIDIAN_VAULT_ROOT = "/path/to/your/Obsidian Vault"
OBSIDIAN_SEMANTIC_MCP_HOME = "/Users/you/.obsidian-semantic-mcp"
OLLAMA_BASE_URL = "http://localhost:11434"
OBSIDIAN_EMBED_MODEL = "bge-m3"
OBSIDIAN_SEMANTIC_AUTO_INDEX = "true"

Restart Codex, then run:

obsidian_semantic.index_status
obsidian_semantic.search_notes { "query": "Redis Lua atomicity", "limit": 5 }

Claude Code Setup

Add the server at user scope so the personal vault path stays out of project .mcp.json files:

claude mcp add obsidian_semantic --scope user \
  --env OBSIDIAN_VAULT_ROOT="/path/to/your/Obsidian Vault" \
  --env OBSIDIAN_SEMANTIC_MCP_HOME="/Users/you/.obsidian-semantic-mcp" \
  --env OLLAMA_BASE_URL="http://localhost:11434" \
  --env OBSIDIAN_EMBED_MODEL="bge-m3" \
  --env OBSIDIAN_SEMANTIC_AUTO_INDEX="true" \
  -- npx -y @dalecb/obsidian-semantic-mcp

claude mcp get obsidian_semantic

Start a new Claude Code session and run /mcp to confirm the server is connected. On native Windows, use -- cmd /c npx -y @dalecb/obsidian-semantic-mcp after the environment flags.

See Anthropic's Claude Code MCP documentation for scope and command details.

Claude Desktop / JSON MCP Client Setup

In Claude Desktop, open Settings → Developer → Edit Config. This opens ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows. Merge the following server into mcpServers:

{
  "mcpServers": {
    "obsidian_semantic": {
      "command": "npx",
      "args": ["-y", "@dalecb/obsidian-semantic-mcp"],
      "env": {
        "OBSIDIAN_VAULT_ROOT": "/path/to/your/Obsidian Vault",
        "OBSIDIAN_SEMANTIC_MCP_HOME": "/Users/you/.obsidian-semantic-mcp",
        "OLLAMA_BASE_URL": "http://localhost:11434",
        "OBSIDIAN_EMBED_MODEL": "bge-m3",
        "OBSIDIAN_SEMANTIC_AUTO_INDEX": "true"
      }
    }
  }
}

Fully quit and restart Claude Desktop. Cursor and other JSON-style stdio MCP clients can use the same mcpServers entry. On Windows, if npx is not found, use "command": "cmd" and prepend "/c", "npx" to args.

See the official local MCP server guide for Claude Desktop configuration and logs.

Why This Exists

This isn't aiming to be the most powerful Obsidian automation server. It aims to be the safest retrieval tool you can hand an agent.

Here's how it stacks up against the two tools it usually comes down to — a full-permission Obsidian MCP server (Local REST API based) and GBrain (a broader knowledge-compilation platform):

This project

Full-permission Obsidian MCP

GBrain

Access model

Read-only: search / read / index

Read + write + edit + delete

Read + write; compiles notes into its own model

Touches your vault

Never

Yes

Yes — restructures content

Obsidian must run

No — reads files directly

Yes — needs the REST API plugin

No

Required local runtime

Node.js + Ollama

Obsidian + plugin

Standalone platform

Embeddings & data

Local Ollama by default; remote URL is configurable

Local API; embeddings vary by setup

Built-in pipeline; optional sync

Storage

One SQLite file you can delete and rebuild

Plugin-managed

Its own store / migration

Best for

A small read-only retrieval boundary for agents

Full vault automation and editing

Building a compiled knowledge base across sources

That trade is on purpose: give up writing, editing, and running inside Obsidian, and you get fewer moving parts and a smaller blast radius in return.

Use this if your agent should answer:

  • "Which note explains this project decision?"

  • "Find the file where I wrote about idempotency payload mismatch."

  • "Show me the career notes related to this interview topic."

  • "Search my vault, but do not mutate it."

Do not use this if you want an Obsidian UI plugin, automatic note generation, or write-capable vault automation.

Tools

index_status

Returns index metadata and safety settings.

index_vault

Builds or updates the external SQLite index.

{ "mode": "incremental" }

Specific files:

{
  "mode": "incremental",
  "paths": ["02_Projects/My Note.md"]
}

search_notes

Searches notes with hybrid semantic and keyword ranking.

{
  "query": "live coding notes",
  "limit": 8,
  "mode": "hybrid"
}

Modes:

  • hybrid: semantic vector + SQLite FTS5 + metadata boosts

  • semantic: vector-first search

  • keyword: FTS5 keyword search without embedding the query

read_note

Reads a note or line range by vault-relative path.

{
  "path": "02_Projects/My Note.md",
  "start_line": 10,
  "end_line": 40
}

How It Works

index_vault
  -> scan Markdown files under OBSIDIAN_VAULT_ROOT
  -> block denied paths and symlink escapes
  -> split notes by Markdown headings
  -> create one summary chunk per file
  -> embed chunks with Ollama bge-m3
  -> store notes, chunks, FTS rows, and vectors in SQLite

search_notes
  -> incrementally index on first search or first search after a Markdown change
  -> embed the query with Ollama
  -> score vector similarity
  -> score SQLite FTS5 keyword matches
  -> apply title/path/heading metadata boosts
  -> regroup chunk matches into file-level results

Default storage:

~/.obsidian-semantic-mcp/
  data/semantic.sqlite

The vault remains the source of truth. The SQLite database is a derived index and can be deleted/rebuilt.

Safety Model

The server reads your vault and never writes to it. Three layers decide what an agent can see.

1. Always denied (system / tooling). Never indexed, no override:

  • .obsidian/, .smart-env/, .claude/, .codex-*/

  • any hidden folder (name starts with .)

  • node_modules, cache, logs

2. Sensitive — denied by default, unlockable. Stays blocked even when a tool call passes include_sensitive: true, unless the server is started with OBSIDIAN_SEMANTIC_ALLOW_SENSITIVE=true. Defaults to 08_PersonalInfo/. Override the list with OBSIDIAN_SEMANTIC_SENSITIVE_PATHS (comma- or newline-separated folders):

OBSIDIAN_SEMANTIC_SENSITIVE_PATHS = "08_PersonalInfo, 09_Finance"

3. Your own excludes — always denied. Folders you never want indexed, searched, or read. No unlock flag:

OBSIDIAN_SEMANTIC_EXCLUDE = "03_Journal, Private, Clients/Acme"

Which one do you want?

  • "Don't index this at all"OBSIDIAN_SEMANTIC_EXCLUDE

  • "Keep it locked, but I can unlock it with a flag when I need to"OBSIDIAN_SEMANTIC_SENSITIVE_PATHS + OBSIDIAN_SEMANTIC_ALLOW_SENSITIVE

Additional guards:

  • All paths are resolved through realpath.

  • Path traversal and URL-encoded traversal are blocked.

  • Symlinks that escape the vault root or point to a denied in-vault path are blocked.

search_notes and read_note enforce the current exclusion settings on every call. With automatic indexing enabled, the next search also removes excluded stale rows from the index. Confirm the active lists with index_status.

The local index stores snippets and embedding vectors. Treat it as a derived copy of your vault. See PRIVACY.md.

Indexing Strategy

The default is action-driven, not timer-based:

  1. The first search_notes after server start.

  2. The first search_notes after a Markdown create, update, delete, or rename event.

  3. The first search_notes after the embedding model or index format changes; this triggers a full rebuild.

  4. An explicit index_vault call.

The filesystem watcher only marks the index dirty. Indexing runs once, immediately before the next search, and concurrent searches share that work. If recursive watching is unavailable, the server falls back to an incremental scan before every search.

Disable automatic indexing with:

OBSIDIAN_SEMANTIC_AUTO_INDEX = "false"

Then call index_vault { "mode": "incremental" } yourself. The legacy OBSIDIAN_SEMANTIC_STARTUP_INDEX=true remains supported, but is not the default because it does work even when no search follows.

Search Quality Evaluation

Create a JSON file containing queries and expected paths to compare keyword, semantic, and hybrid modes under the same conditions:

[
  { "query": "strong consistency at 1000 TPS", "expected_paths": ["03_Knowledge/QnA/Strong-Consistency-at-1000TPS.md"] }
]
npm run evaluate -- ./queries.json 5

The command reports Recall@K and MRR. Avoid adding ranking complexity or embedding cost unless hybrid search measurably beats the keyword baseline.

Refresh the index with search_notes or index_vault before evaluating.

Development

npm test
npm run pack:check

Before publishing:

npm pack --dry-run

Confirm the package does not include data/, *.sqlite, or private vault files.

License

MIT

Available Tools

4 tools
index_statusA

Return semantic index status and safety settings.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It explicitly states a read-only operation ('Return'), which is transparent. However, it does not disclose error conditions or authentication needs, but for a simple parameterless status check, the clarity is sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no wasted words. It is front-loaded and concise, earning its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While the purpose is clear, the description does not elaborate on the return value's structure or content. Since there is no output schema, more specificity about what 'status and safety settings' includes would be beneficial for a complete understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are 0 parameters, so per guidelines the baseline is 4. No additional parameter info is needed, and the schema coverage is trivially 100%.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Return') and resource ('semantic index status and safety settings'), clearly distinguishing it from sibling tools like search_notes and index_vault, which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It does not mention prerequisites, when-not-to-use, or contrast with sibling tools like index_vault.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

index_vaultB

Index or reindex the Obsidian vault into the external semantic index. Does not modify the vault.

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNoincremental
pathsNo
dry_runNo
include_sensitiveNoRequires OBSIDIAN_SEMANTIC_ALLOW_SENSITIVE=true on the server.

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full burden. It states the tool does not modify the vault, which is helpful. However, it fails to disclose behaviors such as the effect of dry_run, what happens on reindex, or prerequisites like requiring the vault to be open. Partial disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: two sentences with no unnecessary words. It front-loads the core action and a key safety note. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 4 parameters, no output schema, and no annotations, the description lacks completeness. The agent is not informed about the behavior of mode (incremental vs full), paths (what happens if omitted), dry_run effects, or the requirement for include_sensitive. More details are needed for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is low (25%), with only include_sensitive having a description. The tool description adds no information about any parameter semantics, leaving the agent to infer meaning from names only. This is insufficient for 4 parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Index or reindex' and the resource 'Obsidian vault into the external semantic index'. It distinguishes from sibling tools like search_notes, read_note, and index_status by describing a unique operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for creating or updating the semantic index, and states it does not modify the vault, but lacks explicit guidance on when to use this tool versus alternatives like search_notes or index_status. No exclusions or conditions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_noteA

Read-only markdown note reader by vault-relative path and optional line range.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
end_lineNo
start_lineNo
include_sensitiveNoRequires OBSIDIAN_SEMANTIC_ALLOW_SENSITIVE=true on the server.

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description declares 'Read-only' which indicates no mutations, but it lacks details on error handling, behavior for invalid paths, line range specifics, and does not mention the 'include_sensitive' parameter or its implications. With no annotations, the description should provide more behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence with 11 words, no redundancy. Front-loaded with the key action and resource type. Every component is necessary and adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema is present, so the description should hint at the return value (e.g., note content). It does not. Also missing details on line range boundaries, path formatting, and the 'include_sensitive' parameter. Given tool complexity (4 params, no output schema), more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaning to three parameters not documented in the schema: 'path' (vault-relative path), 'start_line' and 'end_line' (optional line range). Schema coverage is low (25%), and the description compensates by clarifying the core parameters, though it does not explain 'include_sensitive' beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it reads markdown notes by vault-relative path with an optional line range. It uses specific verb 'read' and resource 'markdown note', distinguishing it from sibling tools like search_notes (search) and index_vault (index).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when you know the vault-relative path and optionally want a line range, but it does not explicitly compare with siblings or state when not to use this tool. No exclusions or alternatives are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_notesB

Read-only hybrid semantic/keyword search over the Obsidian vault. Returns file-level results with matched sections.

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNohybrid
limitNo
queryYes
folder_excludeNo
folder_includeNo
include_archivedNo
include_sensitiveNoRequires OBSIDIAN_SEMANTIC_ALLOW_SENSITIVE=true on the server.

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description only states 'read-only' but does not disclose behavioral traits like required authentication, rate limits, or consequences of the search. With no annotations, the description carries full burden, yet it is minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise with two sentences, no redundancy, and front-loaded key information. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (7 parameters, hybrid search, no output schema), the description is too brief. It lacks details on result format, pagination, mode semantics, and relationship to indexing status.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 14% (one parameter documented). The description does not add meaning to the 7 parameters, such as explaining folder_exclude, folder_include, or the effect of include_archived. The mode enum is not elaborated.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it is a read-only hybrid semantic/keyword search over the Obsidian vault, returning file-level results with matched sections. This distinguishes it from siblings like read_note (reading a specific note) and index_vault (indexing).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives, when not to use it, or how to choose between modes (hybrid, semantic, keyword). The agent must infer usage from context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv0.2.1
    • First observedindex_status
    • First observedindex_vault
    • First observedread_note
    • First observedsearch_notes

TDQS

A3.7/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: searching, reading, indexing, and checking index status. No overlap or ambiguity between them.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case, e.g., search_notes, read_note, index_vault, index_status.

Tool Count5/5

Four tools is well-scoped for a read-only semantic search server, covering search, reading, indexing, and status without redundancy.

Completeness4/5

Core workflow is covered: search, read, index, status. Minor gaps like missing file listing or vault navigation, but these are not essential for the stated purpose.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables read-only access to Obsidian vaults with semantic search, tag filtering, and metadata queries. Provides secure, intelligent note retrieval and summarization for LLMs without modifying your vault.
    14
    13
    ISC
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides semantic search and keyword search over Obsidian notes, along with direct note retrieval, allowing external AI agents to query and access the vault.
    19
    BSD Zero Clause
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables semantic search over an Obsidian vault using ChromaDB, allowing users to search, read, and list notes via natural language.
    -

Latest Blog Posts

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/DalecB/obsidian-semantic-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server