obsidian-lite-mcp
A tiny MCP server that lets AI agents read an Obsidian vault straight from disk.
- No Obsidian app running, no plugins, no REST API: the vault is just a folder of
.mdfiles. - No shell needed: works in MCP clients that can't run
grepat all, such as Claude Desktop. - Links the way Obsidian sees them: backlinks that match case-insensitively, through
[[Folder/Note]]paths, aliases and Markdown links, and skip links inside code. Plaingrep "[[Name"gets these wrong. - One file, zero dependencies: Python standard library only.
- Read-only by default. Writing is opt-in and limited to creating new notes in one folder.
- Pull only what's needed: every result carries its size (
~N tok), and a big note can be read one section at a time. See Measured for what that buys and where it doesn't.
Tools
| Tool | What it does |
|---|---|
search |
Regex over text and paths, plus tag and frontmatter property filters (key or key=value). Ranked by matches, then recency. links: broken lists notes with unresolved links (attachments excluded), links: orphans notes nothing links to. |
read |
A note by [[link]] name, alias or path, with outgoing links and backlinks. Note#Heading returns one section; outline: true returns headings with the size of each section. Notes over 8000 tokens return their outline unless full: true. |
remember |
Only with --write-dir: creates a new note in that folder, tagged claude. Never edits or overwrites. |
Links resolve the way Obsidian does: exact path first, then note name or aliases, shortest path on ties.
Markdown links ([text](Folder/Note.md)) count too. Tags come from frontmatter and #inline tags outside code.
Folders listed in Obsidian's Excluded files setting are skipped, as are hidden folders like .obsidian and .trash.
Fast on big vaults: files are re-read only when they change, and on a 5000-note vault a read with backlinks
takes about 0.05 s.
Install
uvx obsidian-lite-mcp /path/to/vault
Or skip packaging entirely: download obsidian_lite_mcp.py and run python3 obsidian_lite_mcp.py /path/to/vault.
Claude Code
claude mcp add -s user vault -- uvx obsidian-lite-mcp /path/to/vault
To let the agent save new notes into Inbox/ (date key in their frontmatter: VAULT_DATE_KEY, default created):
claude mcp add -s user vault -- uvx obsidian-lite-mcp /path/to/vault --write-dir Inbox
Other clients
Any MCP client that runs stdio servers works:
{
"mcpServers": {
"vault": { "command": "uvx", "args": ["obsidian-lite-mcp", "/path/to/vault"] }
}
}
Project context at session start
Give a project note a repo property listing the repository folder names:
---
repo:
- my-api
- my-frontend
---
obsidian-lite-mcp context /path/to/vault "$PWD" then prints a short index for whichever repo you are in:
the note's first line, ADRs (notes tagged adr) grouped by status, open - [ ] task counts and the three most
recently changed notes, all from the project note's folder. Measured in a real Claude Code session: about 450 tokens.
Details come from read.
In Claude Code, add it as a SessionStart hook in ~/.claude/settings.json:
{
"hooks": {
"SessionStart": [
{
"matcher": "startup|clear|compact",
"hooks": [
{
"type": "command",
"command": "uvx obsidian-lite-mcp context /path/to/vault \"$CLAUDE_PROJECT_DIR\"",
"timeout": 10
}
]
}
]
}
}
Outside a known repo it prints nothing. VAULT_CONTEXT=off silences it for one run (handy for A/B token measurements).
Measured
Same questions, Claude Code headless (claude -p, Haiku), two runs per setup. grep had only Read, Grep and Glob;
obsidian-lite-mcp had only this server's tools. Tokens are total input tokens for the whole task.
Obsidian's own help vault (obsidianmd/obsidian-help en/,
181 notes): two backlink counts, two answers from sections of a 16k-token note, one alias lookup.
| Setup | Correct | Turns | Input tokens | Output tokens | Cost |
|---|---|---|---|---|---|
| grep | 5/5, 5/5 | 20, 15 | 821k, 510k | 12.6k, 11.6k | $0.084, $0.026 |
| obsidian-lite-mcp | 5/5, 5/5 | 11, 12 | 225k, 277k | 3.7k, 4.3k | $0.014, $0.013 |
Both got everything right, but only because the prompt spelled out Obsidian's link rules; grep needed about
twice the turns and 2-4x the tokens to apply them. Naive grep -rlF "[[Command palette" reports 62 backlinks
instead of 64 (it misses [[command palette]]), and 32 instead of 31 for Properties (it counts [[Properties view]]).
A small personal vault (90 notes, simple links): five lookups (ADR status, backlink count, a section, open tasks, find by topic). Both setups 5/5; input tokens grep 184k and 123k, obsidian-lite-mcp 147k and 247k. No measurable difference: on a small vault with plain links, grep is just as good.
The context hook costs about 450 input tokens per session (A/B with VAULT_CONTEXT=off).
Search stays regex-only on purpose. A plain-words mode (any order, BM25-ranked) was tried on four topic questions
over the personal vault, three runs per setup: both 3/3 correct, regex 6 turns and about 73k input tokens every run,
words 6-8 turns and 77k-116k. Models already write good regexes (PHP 8\.[45], a|b), so it was dropped.
Limits
- Every call checks file timestamps (about 0.04 s for 5000 notes); the first call reads everything (about 1 s).
- Frontmatter parsing covers scalars,
[a, b]and- itemlists; nested YAML is skipped. - Token counts are estimates (characters / 2, measured on Polish notes; English text is cheaper).
.baseand.canvasfiles are not indexed.
Development
python3 -m unittest
License
MIT
Metadata
Release files for obsidian-lite-mcp 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| obsidian_lite_mcp-1.0.0.tar.gz | 11.9 kB | With provenance | Details for obsidian_lite_mcp-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| obsidian_lite_mcp-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for obsidian_lite_mcp-1.0.0-py3-none-any.whl |
Total release size: 24.3 kB
Release files / obsidian_lite_mcp-1.0.0.tar.gz
| Download URL | obsidian_lite_mcp-1.0.0.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13e032ed96f065c9ba9cbe36c47b7a9ffe446f5278a76b0ab143342ec5c02475
|
|
BLAKE2b-256 checksum How to use checksums |
e39f251251c4708d101d8fe1ae21ed6ed0afe85a4f0573f46b4f0f9fbac3cddf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / obsidian_lite_mcp-1.0.0-py3-none-any.whl
| Download URL | obsidian_lite_mcp-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e5ee514ed528a6e4031aab5e569b74a7e3b7c45520030dfade65be463bb3283
|
|
BLAKE2b-256 checksum How to use checksums |
5211d3dabc74d67c473ceaac331dc7a4d8f9944a1e5a4ce57c4526a0327d4ad0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logSecurity for obsidian-lite-mcp 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for obsidian_lite_mcp-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.