obsidian-knowledge-mcp
Provides read-only tools for searching, reading, listing, backlink navigation, and stats within a local Obsidian vault.
Click on "Deploy 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-knowledge-mcpsearch my vault for notes about the 2026 automation project"
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 Knowledge MCP
A private-by-default MCP server that lets AI clients search, read, and traverse a local Obsidian vault without uploading it to an external index.
Status: public-safe prototype · Role: independent design and implementation · Origin: sanitized reconstruction of a knowledge-retrieval component built during a 2026 summer automation project.
中文说明 · Bilingual docs index · Architecture · Evaluation · Failure analysis
What it demonstrates
Five read-only MCP tools for discovery, evidence reading, graph navigation, and vault health.
Transparent ranking: exact phrase + title/heading boosts + English tokens + Chinese 2-grams.
Source-grounded results with vault-relative paths, headings, excerpts, scores, and pagination.
Local privacy boundary: no cloud index, no API key, hidden folders excluded, path traversal rejected.
MCP Python SDK 2.x, structured output, annotations, in-memory integration tests, and a synthetic demo vault.
Related MCP server: Obsidian MCP Server
Tools
Tool | Workflow role |
| Find relevant note sections with filters and pagination |
| Read one note or an exact heading as evidence |
| Browse by folder prefix or tag |
| Follow Obsidian |
| Inspect vault size, link count, and top tags |
All tools are declared read-only and closed-world. The server never edits the vault.
Quick start
Requirements: Python 3.10+ and uv.
git clone <your-repository-url>
cd obsidian-knowledge-mcp
uv sync --extra dev
export OBSIDIAN_VAULT_PATH="/absolute/path/to/your/Obsidian Vault"
uv run obsidian-knowledge-mcpThe process uses stdio and waits for an MCP client. For an interactive inspection UI:
uv run mcp dev src/obsidian_knowledge_mcp/server.pyRun the included sample vault (English demo · 中文演示):
export OBSIDIAN_VAULT_PATH="$PWD/examples/sample_vault"
uv run mcp dev src/obsidian_knowledge_mcp/server.pyClient configuration
Use an absolute path to the repository and vault:
{
"mcpServers": {
"obsidian-knowledge": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/obsidian-knowledge-mcp",
"run",
"obsidian-knowledge-mcp"
],
"env": {
"OBSIDIAN_VAULT_PATH": "/absolute/path/to/your/Obsidian Vault"
}
}
}
}Test and lint
uv run pytest
uv run ruff check .The tests cover ranking, Chinese retrieval, filters, pagination, section reads, backlink resolution, hidden-folder exclusion, traversal prevention, tool discovery, and structured MCP responses.
Privacy and security
Keep private vaults local; do not commit them to this repository.
Only Markdown under
OBSIDIAN_VAULT_PATHis scanned..obsidian,.git,.trash,node_modules, andattachmentsare excluded by default.Returned paths are vault-relative, not absolute.
The project contains only synthetic sample notes. It does not contain employer data, chat exports, credentials, or production identifiers.
Current limitations
Ranking is lexical, not embedding-based; distant paraphrases may need query reformulation.
Wiki-link resolution does not implement every Obsidian alias or duplicate-title edge case.
The index is rebuilt per tool call in v0.1; a watched incremental cache is a future optimization.
The server trusts the local OS user who launches it. It is not a multi-tenant remote service.
Project map
src/obsidian_knowledge_mcp/ search engine and MCP adapter
tests/ unit and in-memory MCP integration tests
examples/sample_vault/ synthetic, reproducible demo data
eval/ stable evaluation questions
docs/ architecture, case, PRD, evaluation, failuresLicense
MIT. See LICENSE.
Available Tools
5 toolsobsidian_find_backlinksFind Obsidian backlinksARead-only
Find notes that link to a target through Obsidian [[wikilinks]].
Use after reading a note to discover related decisions, meetings, or follow-up pages. Matching supports note names, vault-relative paths, aliases, and heading anchors. It never edits the graph.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum backlinks to return. | |
| offset | No | Pagination offset. | |
| relative_path | Yes | Target vault-relative note path. | |
| response_format | No | markdown |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, and the description reinforces with 'It never edits the graph.' It adds behavioral detail on matching (note names, paths, aliases, heading anchors) which is not in annotations. No contradiction; the description adds context beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two compact paragraphs. The purpose is front-loaded, followed by usage, matching capabilities, and a behavioral note. Every sentence adds value with no redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists (covering return format), annotations cover read-only, and the description covers purpose, usage, matching, and behavior, nothing essential is missing for an agent to call this correctly. The tool is simple and fully documented.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is high (75%+), so baseline is 3. The description adds meaning for relative_path by stating matching supports aliases and heading anchors, implying the parameter can accept more than just a path. This clarifies parameter usage beyond schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Find notes that link to a target through Obsidian [[wikilinks]]'. It clearly distinguishes from siblings (read, search, list, stats) by focusing on backlinks and even mentions matching capabilities (aliases, heading anchors) which differentiate it further.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides clear usage context: 'Use after reading a note to discover related decisions, meetings, or follow-up pages.' It implies a workflow but does not explicitly name alternatives or when not to use, though the distinct purpose makes it unambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
obsidian_list_notesList Obsidian notesARead-only
Browse note titles and paths with optional folder and tag filters.
Use when you know the folder or tag but not the exact note name. Results are sorted by path and
paginated; continue with next_offset when has_more is true.
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | Optional tag filter. | |
| limit | No | Maximum notes to return. | |
| offset | No | Pagination offset. | |
| prefix | No | Optional vault-relative folder prefix. | |
| response_format | No | markdown |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses sorting ('sorted by path') and pagination ('continue with next_offset when has_more is true'), which is not present in the annotations. With readOnlyHint=true already carrying the safety profile, the added behavioral details exceed the minimum required.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three compact sentences with no filler: purpose first, usage condition second, behavioral mechanics third. Every sentence earns its place and the key selection signal is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With readOnly annotations, an output schema, and 80% schema coverage, the description adds exactly the missing context: when to use the tool and how pagination works. Nothing an agent needs to choose and invoke this tool correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 80%, so the schema already documents tag, limit, offset, and prefix. The description adds conceptual mapping by mentioning 'folder and tag filters' and the pagination flow, but it does not add syntax or format details, so the schema-heavy baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Browse note titles and paths', a specific verb and resource, and specifies optional 'folder and tag filters'. This clearly differentiates it from siblings like obsidian_read_note (content retrieval) and obsidian_search_notes (search by content) by targeting browsing over exact lookup.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Use when you know the folder or tag but not the exact note name' provides an explicit triggering condition. It stops short of naming alternative tools or explicit when-not-to-use cases, but the stated condition gives enough context for an agent to select this over exact-lookup or search siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
obsidian_read_noteRead an Obsidian noteARead-only
Read one note or one heading after discovering its path.
Paths are resolved inside the configured vault, and traversal outside it is rejected. Use an exact heading to keep long notes concise. Returns content, tags, truncation state, and source path.
| Name | Required | Description | Default |
|---|---|---|---|
| heading | No | Optional exact heading to read. | |
| max_chars | No | Maximum returned characters. | |
| relative_path | Yes | Vault-relative Markdown path. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already mark the operation read-only and closed-world; the description adds a concrete security behavior (path traversal outside the vault is rejected) and enumerates the return fields (content, tags, truncation state, source path). This goes beyond the structured annotations and helps the agent predict side effects and output.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four short sentences, each with a distinct job: what it reads, where paths resolve, how to keep results concise, and what is returned. There is no filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read tool with no output schema, the description covers the essential invocation details: required path, optional heading and max_chars, return contents, and vault confinement. It doesn't describe error cases or the exact shape of truncation state, but those are not necessary for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already documents all three parameters with 100% coverage, so the baseline is 3. The description adds minor usage nuance around exact headings and truncation, but no new parameter semantics beyond what the schema describes.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Read') and resource ('one note or one heading') and frames the prerequisite ('after discovering its path'), which clearly separates it from sibling discovery tools. It also names the main return payload components, leaving no ambiguity about the tool's function.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly instructs that the tool is for reading a note after its path has been discovered, implying search/list are the preceding steps. The tip to use an exact heading for long notes provides condition-specific guidance. It does not explicitly name alternatives or when not to use, but the context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
obsidian_search_notesSearch Obsidian notesARead-only
Search Markdown notes using deterministic phrase, token, and Chinese 2-gram ranking.
Use this first for topical discovery or paraphrased questions. Results include vault-relative
paths, headings, excerpts, tags, scores, and pagination metadata. The tool is local and
read-only.
If results are broad, add prefix or tag; if has_more is true, request next_offset.
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | Optional tag, with or without #. | |
| limit | No | Maximum chunks to return. | |
| query | Yes | Topic, phrase, or question to search for. | |
| offset | No | Pagination offset. | |
| prefix | No | Optional vault-relative folder prefix. | |
| response_format | No | markdown |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the readOnlyHint annotation, the description adds substantial behavioral detail: the tool is 'local and read-only,' uses a deterministic ranking algorithm, and returns paths, headings, excerpts, tags, scores, and pagination metadata. It also explains paging behavior via 'has_more' and 'next_offset', which annotations do not cover.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded: it opens with the core capability, then gives when-to-use guidance, then result contents, then refinement/pagination advice. Every sentence contributes actionable information with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity, the 83% schema coverage, and the existence of an output schema, the description covers the essential operational context: selection, scoping, return fields, pagination, and safety. The agent has enough to invoke it correctly without guessing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 83%, so the baseline is 3, but the description adds operational meaning beyond the schema: it tells the agent to use 'prefix' or 'tag' to narrow broad results and explains the pagination contract between 'has_more' and 'next_offset'. This is useful coupling information the schema alone does not provide.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Search Markdown notes' using deterministic phrase, token, and Chinese 2-gram ranking. It differentiates from siblings by explicitly framing itself as the tool to 'Use this first for topical discovery or paraphrased questions.'
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It clearly tells the agent when to use the tool ('Use this first for topical discovery or paraphrased questions') and how to refine broad results ('add prefix or tag'). It does not explicitly name sibling alternatives or state when to avoid this tool, but the guidance is strong enough for an agent to select it correctly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
obsidian_vault_statsSummarize Obsidian vaultARead-only
Return a compact health snapshot of the configured vault.
The response includes note count, wikilink count, distinct tag count, and top tags. Use it to understand vault size before browsing; do not use it for note content retrieval.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare readOnlyHint=true and openWorldHint=false, so the read-only safety profile is covered. The description adds useful behavioral context by defining the response as a 'compact health snapshot' and enumerating what it returns, plus scoping it to 'the configured vault.' No contradictions or hidden side effects are indicated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences: the first states the operation and output fields, the second gives usage guidance and an exclusions. Every sentence earns its place with no redundant wording or restating of the title.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter, read-only statistics tool with no output schema, the description is complete. It explains what the tool returns, when to use it, and what not to use it for, making the tool fully callable without inspecting sibling tools or schemas.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters and schema description coverage is 100%, so the schema carries no burden. The baseline for zero-param tools is 4, and the description appropriately does not invent parameter-related detail. It could have explained the meaning of 'top tags' limits, but that is not required given the simple scope.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Return a compact health snapshot of the configured vault.' It lists concrete output fields (note count, wikilink count, distinct tag count, top tags) and explicitly distinguishes itself from content-retrieval tools, which is enough to differentiate it from siblings like obsidian_read_note or obsidian_search_notes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit usage context: 'Use it to understand vault size before browsing' and a clear exclusion: 'do not use it for note content retrieval.' However, it does not name the sibling alternatives that should be used for content retrieval, so the guidance stops short of the most explicit 5-level standard.
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.
5 tool updates
v0.1.0- First observed
obsidian_find_backlinks - First observed
obsidian_list_notes - First observed
obsidian_read_note - First observed
obsidian_search_notes - First observed
obsidian_vault_stats
TDQS
Scored across 5 tools
Each tool serves a clearly distinct purpose: reading a specific note, searching content, browsing by folder/tag, finding backlinks, and viewing vault stats. There is no meaningful overlap between tools, and the descriptions reinforce when to use each one.
Tool names follow a consistent snake_case pattern with the common `obsidian_` prefix, using clear action-noun combinations like `read_note`, `search_notes`, and `list_notes`. `vault_stats` is the only name that deviates from the verb-object pattern, but the convention remains predictable overall.
Five tools is a well-scoped set for an Obsidian knowledge retrieval server. Each tool adds a distinct capability without redundancy, and the count is neither too thin nor bloated for the domain.
For a read-only knowledge retrieval surface, the tool set covers discovery, browsing, targeted reading, relationship exploration via backlinks, and vault-level stats. Search and list together handle navigation, while backlinks cover knowledge graph traversal; no obvious retrieval workflow is missing.
Maintenance
Related MCP Connectors
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Search your Obsidian vault to quickly find notes by title or keyword, summarize related content, a…
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Personal context for every AI: search, read, and write back to your private Markdown library.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to read, search, and manage Obsidian vault markdown files, including YAML frontmatter, wikilinks, and graph operations through a secure stateless I/O layer.-
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to read, write, search, and navigate Obsidian vault notes with support for CRUD operations, full-text search, graph navigation, daily notes, and frontmatter management.2,547 npm-
- AlicenseAqualityDmaintenanceEnables AI assistants to search, read, and traverse Markdown note vaults (Obsidian-compatible) with full-text search, backlinks, knowledge graphs, and a persistent memory system for cross-session context.168 npm2MIT
- -licenseNot gradedqualityNot gradedmaintenanceProvides AI agents with comprehensive access to Obsidian vaults, enabling reading, writing, searching, tagging, linking, canvas manipulation, and semantic search through 41 tools.-