Memory
Knowledge graph-based persistent memory system
MOmodelcontextprotocol/servers92k近 7 天新增 200 个 star
Self-hosted agent memory in an Obsidian vault: hybrid search, link graph, tasks, safe writes, OAuth
Your agents' memory, in the vault you already have, reachable from claude.ai, ChatGPT, Claude Code and your phone.
A self-hosted Model Context Protocol server that turns an Obsidian vault into long-term memory for every agent you use. Agents search it by meaning or by exact words, follow its wikilinks, see what changed since their last session and who changed it, keep their to-dos in it, and write back through guarded, atomic edits. 33 tools over plain markdown files that you can open, edit and grep.
What sets it apart:
expected_hash is
refused when the note changed since it was read, and a deployment
can require the hash on every edit
(Guarding edits against stale reads).
Every publish is atomic, a create refuses a path that is already taken,
deletes go to .trash/, and dry_run returns the diff before
anything lands.Connect from Claude Code:
claude mcp add obsidian --transport http \
--url "https://obsidian-mcp.<your-domain>/mcp" \
--header "Authorization: Bearer omcp_..."
In claude.ai, Claude Desktop or ChatGPT, add a custom connector at
https://obsidian-mcp.<your-domain>/mcp and sign in through the OAuth
consent page. Connect a client has the rest.
Stack: Python 3.12, FastAPI, PostgreSQL with pgvector, and an embedding backend of your choice (Ollama, OpenAI or Hugging Face TEI; see Pick an embedding backend).

There are three things going on here, and they're more interesting together than apart.
If you let an agent run for a while, it needs memory. Most setups solve this with an opaque vector store, a SQLite blob, or a managed "memory" service that you can't see into. That works until you want to know what the agent thinks it knows about you, or you need to correct something, or you want to understand why it just made a weird suggestion.
This server gives you a different deal. Agent memory lives as markdown files in your vault. Folder structure, file names, frontmatter, all visible. You can open the file in Obsidian and read it. You can edit it. You can delete it. You can grep it. The agent's "memory" is a human-auditable artifact that sits in the same place as your own notes, with the same tools available.
The home lab is the use case that sold me on this. My vault has notes on the rack, the network, and every Home Assistant integration. I can say "set up a night-light mode in the master bathroom, 1% after 11pm" and a sysadmin agent finds the right config, makes the change, and updates the doc in the same pass. Six months later when I've forgotten how it works, the answer is in the vault, not buried in some chat history I can't search.
The semantic search and wikilink graph still work over that material, so retrieval is fast and conceptual. But the substrate is files you own, not a black box.
To be precise about the scope: what the server supplies is MCP-accessible storage, keyword and semantic search, and graph operations over markdown notes, for whatever MCP clients you connect. The agents direct their own reads and writes. There is no extraction or decay pipeline running behind them, and nothing rewrites a note because a model judged it stale: an agent remembers something because it wrote a note, and forgets it because someone deleted one. By late 2026 that is less of a contrarian position than it sounds. Every vendor's consolidation step (the "dreaming" or "sleep-time" job) has turned into a separate process you can inspect, rather than silent extraction inside the write path. This server keeps the agent as the author. The consolidation help it will grow is a hygiene report that proposes merges and flags duplicates, and never writes (#359), not a pipeline that edits your notes while you are not looking.
The other half runs the other way: the vault isn't only the agents' memory, it's mine. I think of my Obsidian vault as my exocortex. The "big me" that includes notes, calendars, scripts, search, and AI assistants is substantially more capable than the "small me" of the biological brain alone. It's also where I do most of my thinking, because writing something down is itself a form of thought.
The problem is that until recently, the vault was passive. I had to go find things. Agents that wanted to help me had to be briefed from scratch every session, and they had no way to see what I'd already written about a topic.
This server fixes that. Now the same vault feeds my own daily writing and any agent I plug into it. The agent reads what I read, links what I link, follows the same wikilinks, sees the same frontmatter. When I write a project note on Sunday, my Monday-morning briefing agent already knows about it. When the agent leaves notes from a research session, they show up in my normal Obsidian search.
A concrete version of this: I'll spend a session in Claude Code on a project, wrap up, push the commits, and then just say "update Obsidian." The agent reads the vault guide, figures out where project notes live in my structure, picks the right format and frontmatter, and leaves a session log I can later roll into a status report. No path-passing, no telling it what to write — the conventions are already in the vault, and it follows them.
The same goes for commitments. My to-dos are checkbox lines in those notes, and the task tools let an agent read the same list I do: what is overdue, what is due this week, what I am waiting on from someone else. It can add a follow-up from a conversation or tick one off when the work is done, and the change is one line in a file I can see. That part is optional. Plenty of vaults hold no tasks at all, and nothing else depends on it.
That's the exocortex idea made concrete: one place that holds context, and both the human and the agents reading and writing into it on the same terms.
The thing that still surprises me is that this is internet-facing. Same vault, same notes, reachable from anywhere I happen to be talking to an agent — Claude in a browser tab, Claude on my phone on the train, an n8n workflow firing on a schedule, a Claude Code session on whatever laptop is in front of me. All behind OAuth or a bearer key, all hitting the same source of truth.
So when I hear an interesting podcast on a commute and want to think out loud about it with Claude on my phone, the agent isn't starting cold. It can pull up what I've already written on adjacent topics, surface a note I half-finished six months ago, and at the end of the conversation suggest updates and write them in. The vault doesn't have to be near me to be the thing I'm working in. (A session away from the keyboard walks through exactly one of these.)
To make the abstract concrete, a short transcript from a real session. Tool calls inline; the user types in plain English and the agent picks the right tool.
you > find anything I've written about why retrieval-augmented
chat is hard
claude
→ semantic_search(query="why retrieval-augmented chat is hard")
• 2025-12-03 - RAG failure modes.md
• 2025-10-18 - Chunking tradeoffs.md
• 2024-06-22 - Vector recall vs precision.md
the closest hit is your December note on RAG failure modes. let
me see what it's connected to.
→ get_neighborhood(path="2025-12-03 - RAG failure modes.md",
depth=1)
8 connected notes. notable ones:
• "Hybrid search" — a re-ranking design you sketched but
didn't ship
• "Out-of-distribution queries" — a half-finished draft from
October
• "Embedding model choice" — links to bge-m3, your current
model
you have three connected pieces here: a failure-modes catalog,
an unshipped hybrid-search sketch, and an abandoned O-O-D draft.
want me to summarize all three together, or pull up the draft
so you can decide whether to finish it?
you > pull up the draft, and tag it #revisit-2026 in frontmatter
while you're there
claude
→ read_note(path="2025-10-18 - OOD queries (draft).md")
→ set_frontmatter(
path="2025-10-18 - OOD queries (draft).md",
updates={"tags": ["draft", "rag", "revisit-2026"]}
)
here's the draft, and the tag is on. you stopped right before
the section on confidence thresholds; the open question you
left yourself was…
Two things to notice. First, the agent didn't need to be told what
folder to look in or what tools to use — it picked them. Second, the
write at the end is structured (set_frontmatter mutating YAML, not
a regex over the file body), so the note round-trips cleanly. The
self-describing vault and the wikilink graph are doing the work that
makes this feel natural.
The transcript above is the easy case: I'm at a desk, I can see what the agent is doing, and Obsidian is one alt-tab away. The session that actually changed how I think about this server had none of that.
I was out walking with a health podcast in my ears — a long one, two people who clearly disagreed with each other, an hour of it. I had my phone and no intention of going home to a laptop. So I pulled the episode's transcript, handed it to Claude on my phone, and we talked it through while I kept walking: what the actual claim was, which parts I already had notes on, where it cut against something I'd decided months ago and written down at the time.
The agent had the vault the whole way. It surfaced what I'd already written on the topic, flagged that two dates in an older note were wrong, and asked whether a decision I'd recorded last year still stood given what the episode argued. By the time I got back it had written all of it in: the health-related decisions I'd actually landed on during the walk, the date corrections in the old note, a couple of new notes on the episode itself — and, because the conversation kept circling back to it, a durable note on how I decide which experts to trust on medical questions in the first place. That last one is the artifact I keep returning to. It wasn't about the episode at all; it was the reasoning underneath a whole class of decisions, and it now sits in the vault where the next agent will find it.
I never opened Obsidian. Not on the walk, not when I got home. The whole session — retrieval, argument, correction, and the writing that came out of it — went through an agent, and the vault is simply where it landed. Obsidian is how I check the work afterwards, not how the work gets done. That inversion is most of the reason this project looks the way it does.
The server exposes 33 MCP tools across six families, plus the auth and ops layer around them.
Every tool is published with a title and MCP ToolAnnotations, all
four hints set explicitly: readOnlyHint on the nineteen tools that only
read (search, read, list, graph, list_tasks, task_agenda, get_changes, check_upload), destructiveHint on
the eleven that can replace or remove something (edit_note,
move_note, delete_note, set_frontmatter, write_file,
delete_file, import_from_url, complete_task, update_task,
move_task, and request_upload, whose link can overwrite on
redemption),
openWorldHint on import_from_url only. create_note, add_task
and request_download are additive. Clients that honour
annotations run read-only tools without a per-call confirmation (Claude
Code also runs them in parallel) and keep prompting on destructive ones.
They are hints: the server enforces read-only credentials itself,
regardless of what a client does with them. The initialize result also
carries a short instructions paragraph — what the vault is, which tool
to reach for, and the write-safety rules — for clients that load only
tool names at session start. No description exceeds 4,000 characters on
the wire, so none is cut off by a client's description limit.
keyword_search(query, folder?, tags?, frontmatter?, limit=20),
full-text via PostgreSQL tsvector. A note's title and frontmatter
aliases rank above its body, so a query that is a note's title finds
that note first; its tags (frontmatter and inline #tags, a nested
#a/b also as a and b) are indexed below the title and above the
body, and matched_in names which of title, tags and body
matched; bare terms are ANDed, and when the full matches do not
fill the page, partial matches follow tagged match: any; every row
carries a snippet: with the matches highlighted (or head:, the
note's opening words, for a title or tags match). The text-search config(s) are
configurable via FTS_CONFIGS (see
Full-text search language(s))semantic_search(query, folder?, tags?, frontmatter?, limit=15, rerank=false),
vector similarity via pgvector, one one-line preview chunk per note.
Notes are chunked at their headings, and each chunk is embedded under a
Title > Heading > Subheading context prefix. A fresh row names the
section it matched: § "Plan/Risks" (#7) or § (top of note), and
read_note(path, section="#7") reads exactly that section. Previews start
on a word; a section too short to stand alone (under 200 characters) is
grouped with its neighbour, so a preview can include an inner heading line
and its § names the enclosing section. Stale rows,
and rows not yet re-embedded since the upgrade to heading-aware chunks,
carry no locator. While any of your notes is still on the old chunking,
each response says so on an index_transition: line under its headerhybrid_search(query, limit=10, folder?, tags?, frontmatter?, rerank=false), both
of the above fused by reciprocal rank fusion over each arm's top 50, one
line per note with its fused score, each arm's rank and the 1/(k+rank)
terms behind the score. The three are peers, and every description
carries the same routing sentence: exact identifiers, code symbols,
titles or known phrases go to keyword_search; conceptual or
paraphrased questions to semantic_search; unsure which, hybrid_search.
A single arm can beat the fusion on its own kind of query. If the
embedding provider is down, hybrid_search returns the keyword ranking
marked arms: keyword-only (semantic unavailable: …), never silently
degraded: the marker is on every return path, so a keyword-only page
cannot pass for a fused one.semantic_search and hybrid_search carries a
confidence: ok | low header token. low means no keyword note matched
all the terms and the closest semantic candidate is under
SEARCH_LOW_CONFIDENCE_SIMILARITY, with a one-line hint to try
keyword_search or get_neighborhood when it costs no row. Nothing is
filtered. The threshold ships at 0 (off: always ok) until you calibrate
it.rerank=true on either of the last two asks an optional,
operator-configured reranker (RERANK_URL) to reorder the candidates
the call already fetched (at most 50 notes). Each note is scored on the
best of up to four of its fetched chunks, sent as the same text they were
embedded from (title, heading path and tags, then the chunk); a reranked
row's preview and § locator show the chunk that scored. The response is either
fully reranked (reranked: true (candidates: N), a rerank_score per
row) or the unreranked page marked reranked: false (<reason>);
without a reranker it answers reranked: false (not_configured). Its
rows are one-line quoted objects, like hybrid_search'slist_notes(folder?, limit=50, since?, until?, order_by?, cursor?),
sorted by modified timeget_recent(folder?, limit=20, since?, until?, order_by?, cursor?),
recently changed, with each modification time in UTC
(YYYY-MM-DD HH:MM UTC). On both, order_by="content_changed" with
since lists notes whose content changed (a touch or a re-sync that
keeps the bytes does not count); since is inclusive and until
exclusive, each a UTC date (YYYY-MM-DD, the whole day) or an ISO 8601
datetime with an explicit offset. Any of the four switches to keyset
paging with a more: cursor=… footer; a call with none of them is
unchangedget_changes(since, folder?, kinds?, by="any", limit=50), the change
feed: one line per note created, modified, moved or deleted after a
cursor, oldest first, each attributed to the API key or OAuth client
that made it ((you) for your own credential) or human/sync for an
edit the index discovered (Obsidian, a sync client, git). It returns
next_since, an exact ev:<n> cursor an agent stores in its own notes
for the next session; by is any | me | agents | human. Deletions say
why (removed, not_indexable, quarantined); gap and reset lines
say when the view is incompleteget_tags(limit=50), tag and countlist_tasks and task_agenda list checkbox tasks across the vault
from the index; see Tasks (optional)get_vault_guide(), the Obsidian primer plus this vault's
CLAUDE.md, served livemake search-eval against
judgments mined from the operator's own usage log (a search followed by
a read of one of its results); see the
search evaluation harnessread_note(path, section?, offset=0, limit?) returns a structured
result — path, title, tags, frontmatter_yaml and a JSON
frontmatter view, heading (section reads), content, and
truncation as data (truncated, offset, next_offset,
total_chars, outline, notice). Bounded by
MAX_READ_RESPONSE_CHARS (default 40,000) — see
Response size limits. section=<heading>
returns one section's body instead of the whole note; offset
continues a truncated read.create_note(path, content), atomic write, refuses overwriteedit_note(path, …) with four mutually exclusive modes: full
replace (default), append=True, find=… (with optional
replace_all), or section=<heading> (ATX headings, supports
Parent/Child path-style and #N ordinal disambiguation).
dry_run=True returns a unified diff without writing. Legacy clients
may use operation="append"; operation="replace" explicitly selects
full replace.move_note(from_path, to_path, rewrite_links=False), relocates and
optionally rewrites incoming [[Old]], [[Old|alias]],
[[Old#anchor]], ![[Old]], and [[folder/Old]] references in
source notesdelete_note(path, permanent=False), soft-delete to
.trash/<YYYYMMDD-HHMMSS>-<basename>-<8 hex> by default, via a single
non-replacing rename, so it never overwrites an existing trash entry
(a filesystem that cannot do that rename makes the soft delete refuse
with a named error rather than fall back). permanent=True unlinks.set_frontmatter(path, updates, remove?), structured YAML
mutation. Body is byte-identical when only frontmatter changes.An agent that keeps notes usually also keeps commitments: a follow-up it promised, a next action, something to check again on Friday. These five tools let it keep them as checkbox lines in the same vault as its notes, and find, add and close them without reading files. Nobody has to use them. A vault without checkboxes behaves exactly as before, and no other tool depends on them.
What counts as a task. By default, any markdown checkbox list item:
- [ ] Renew the certificate, * [x] …, 1. [/] …, including one inside
a blockquote or callout, or indented under another item. A plain checkbox
is a complete task, and Obsidian does not have to be installed. A vault
whose checkboxes are not all tasks can narrow this with a task rule; see
Which checkboxes are tasks. The optional
fields use the Obsidian Tasks plugin's
emoji format, so the same notes also work in Obsidian, with or without
that plugin:
| Field | Written as |
|---|---|
| due | 📅 2026-11-20 |
| scheduled | ⏳ 2026-11-18 |
| start | 🛫 2026-11-15 |
| priority | 🔺 highest, ⏫ high, 🔼 medium, 🔽 low, ⏬ lowest |
| recurrence | 🔁 every week |
| done | ✅ 2026-11-10 |
| cancelled | ❌ 2026-11-10 |
| created | ➕ 2026-11-01 |
[ ], [/] and every other marker are open, [x] and [X] are done,
and [-] is cancelled. A checkbox inside a code block is not a task, and
a Tasks-plugin query block (```tasks) is text the server does
not evaluate. The server supplies the mechanics (listing, one-line
edits, moving a task between notes, and recurrence for the rules listed
below) and no policy: where
tasks live, what a tag means and what is due when are up to you, your
agents and your vault guide.
Which checkboxes are tasks. A checkbox is not always a task. People use checkboxes for checklists, runbooks, verification steps, acceptance criteria, packing lists, meeting agendas and the step lists inside work tickets. None of those is a commitment someone has to act on, but a tool that treats every unchecked box as an open task reports them all.
This matters more in a vault that AI agents write into. Agents produce
checkbox lists freely: a plan, a step-by-step procedure, the "done when"
criteria of a ticket, a status note. Each list adds open "tasks". An
agent that asks "what is on my plate" then gets an answer made mostly of
procedure steps; a text search for a task also matches the same words
in a runbook; and add_task's duplicate check refuses a new task, or
lists "similar tasks", because of a checklist line that was never a task.
In one real vault, 1,868 checkboxes were open: 314 were tasks and 1,554
(83%) were not. In that vault's dedicated task lists, every open checkbox
carried a date, a priority, a recurrence rule or a workflow tag. The
plain checkboxes sat in the same folders and often the same notes as the
tasks, so excluding folders or note tags could not separate them.
So each user (in single-user mode, the server) has a task rule that says which checkboxes count as tasks:
| Rule | A checkbox is a task when | Choose it when |
|---|---|---|
all (default) | always | Your checkboxes are your tasks, for example a small agent-memory vault. |
fields | it carries a task field (a due, scheduled, start, created, done or cancelled date, a priority or a recurrence rule) or one of your task tags | Your real tasks carry a date, a priority or a tag such as #waiting, and your checklists do not. |
filter | its text contains your global filter text, such as #task | You mark every task with one marker, or you already use the Tasks plugin's "Global task filter". |
Task tags match the way list_tasks(tags=…) does: ignoring case and by
/ segment, so the task tag waiting matches #Waiting/bob but not
#waitingroom. The global filter is the Tasks plugin's own mechanism: a
plain text match that respects case, anywhere on the line. #Task does
not satisfy #task, while #tasks and a #task inside inline code do;
the filter does not have to be a tag (TODO works).
The default stays all for three reasons: plain checkboxes keep working
for a vault whose checkboxes are its tasks; it is what the Tasks plugin
does when no global filter is set; and an existing deployment sees no
change until someone picks another rule (under all every response is
byte for byte what it was before). A vault that agents write into
should choose fields or filter, and say in its vault guide (the
vault's CLAUDE.md, served by get_vault_guide) how a task is
written, for example "every task has a 📅 due date or the #waiting
tag" or "every task line contains #task". Agents then create tasks the
rule recognises. add_task helps: under filter it adds the filter text
itself, and under fields it says when the line it wrote is not a task.
The rule is chosen on the panel's Tasks card, or for
everyone without a choice of their own by TASKS_RULE,
TASKS_RULE_TAGS and TASKS_GLOBAL_FILTER (see
Configuration). It applies to the default scope only:
default listings from list_tasks and task_agenda, and add_task's
duplicate check across the index. Nothing is hidden silently. While
fields or filter is in force, a default-scope response carries one
more header line, for example:
Rule — task rule: filter "#task" — excluded by rule: 2 tasks — kept though unsure (text cut): 1 tasks — pass scope="all" to list every checkbox
It names the rule, counts the checkboxes the rule left out (excluded by rule, apart from excluded by scope, which counts the folder and
note-tag exclusions), and counts the ones kept only because the server
could not judge them: a line whose stored text was cut at 1,000
characters before the filter text appeared, or whose tags were cut past
64. Those are listed rather than hidden. scope="all" lists every
checkbox, whatever the rule. Under fields, while rows still await
the first index pass after an upgrade, the line also says the rule is
approximate for them. A stored rule the server cannot apply (only a
manual database edit can produce one) is treated as all, and the line
says so.
Writes under a rule. The rule never blocks a write: complete_task
and update_task address any checkbox by path and id, including one
that only scope="all" lists.
filter, add_task puts the filter text at the start of the new
task's text when the line does not already contain it, as the Tasks
plugin's own task dialog does, and the response adds
global filter added: "#task". A text that would pass 1,000 characters
with the filter added is refused, with nothing written.fields, add_task writes a line with no field and no task tag
as asked, and the response adds note: not a task under your task rule "fields" …: default listings will not show it. update_task adds the
same note, under fields or filter, when its edit leaves a line that
is not a task by the rule, for example after removing the last date or the filter text.
update_task never adds the filter text back.add_task's check against the note it writes into still compares
every open checkbox in that note: the same words in the same note are
most likely the same thing (update_task can give that line a date;
allow_duplicate=true adds anyway).filter, the duplicate check recognises an existing task whether
its filter text sits in front (where the server puts it) or as a
trailing tag (where people usually put one): add_task(text="Renew passport") is refused as a duplicate of Renew passport #task.A list_tasks cursor is refused (invalid_argument) once the rule
changes in a way that changes the rows (another rule, other task tags
under fields, another filter text under filter); list again.
| Tool | What it does |
|---|---|
list_tasks | Lists tasks from the index without reading a note. Filters: status, folder, path, tags and excluded tags, due / scheduled / done date ranges, undated, priority, words in the text, recurring. Ordered by due date, priority, scheduled date, done date or path, and paged with a cursor. Every row carries the task's id. |
task_agenda | A dated overview from the index: overdue, due today, scheduled and now due, and due in the next days days (default 7). Every section states its count, and a section that is cut short ends with the exact list_tasks call that continues it. |
complete_task | Marks one task done ([x], plus ✅ <date> by default) and, for a recurring task, writes its next occurrence in the same edit. |
update_task | Changes one task's dates, priority, tags, recurrence, status (open, in progress, cancelled) or description, or adds one context line under it. |
add_task | Inserts one new - [ ] line into an existing note, after the last top-level task of the note or of a named section and everything indented under it. |
move_task | Moves one top-level task, with every line indented under it, to another note or section, byte for byte. The destination is written before the source, so an interrupted move leaves the task in both notes, and resume=true completes it; an outside save of an older destination during the move can still lose the task. |
The four write tools need write permission, like every other write.
list_tasks and task_agenda read the same index as the search tools,
and the header of every response counts what the index could not show
(notes not yet scanned, tasks that could not be indexed, notes over the
5,000-task cap), so an empty list never silently means "nothing open".
Task ids. Every listing row prints the task's id, a 12-character
key computed from the task's text. To change a task, pass the note's
path and that id. The server finds the line by recomputing the ids
from the note's current text, never from a stored line number, and
because a write changes the line's text, the response returns the task's
new id. Nothing is ever written into a note to identify a task. Pass the
path as it is on disk: a row escapes unusual characters in a path (a tab
as \t, a backtick as \u0060, a backslash doubled), so undo those
escapes if the row shows any. When a
note holds several identical task lines, their ids carry an occurrence
suffix (3f9a0c1b2d4e.2of3), and a write with such an id also needs
the note's content_hash from read_note as expected_hash.
What a write guarantees.
add_task, or one context line. Each
planned edit is re-parsed and checked before it is written.MCP-REFUSAL line
carrying its code: an id that no longer matches any line
(task_not_found: list again), a bare id that matches several lines
(task_ambiguous), a field the call changes that appears twice on
the line (task_malformed), an unsupported recurrence rule
(recurrence_unsupported), and on add_task an open task with the
same description (duplicate_task; allow_duplicate=true adds it
anyway). add_task also lists up to five similar open tasks, which
never block.dry_run=true returns the diff and the new line(s), and writes
nothing. expected_hash is optional and binds the whole note, as on
edit_note. Without it, a change made by someone else during the call
is retried from a fresh read, at most 3 attempts in total.index: refreshed). If the refresh
cannot run, the write still stands and the response says
index: may lag (<reason>) until the next index pass. edit_note,
set_frontmatter and write_file also try to refresh the task rows
of a note they change, and delete_note removes a deleted note's
tasks; their output does not say whether that worked. A new note
created by create_note, write_file, an import or an upload, links
rewritten by move_note, and any refresh that could not run show up
after the next pass (every 300 s by default).Recurrence: the supported rules. N is a whole number from 2 to
999, weekday and month names are written out in full English, and any
rule may end in when done, which counts the next date from the
completion date instead of the task's own date:
every day, every N daysevery weekday (Monday to Friday)every week, every N weeksevery week on Monday, Thursday or every Monday, Thursdayevery month, every N months (a day the month lacks becomes its
last day: January 31 → February 28)every month on the 15th (for the 29th to 31st, a month without
that day is skipped), every month on the lastevery year, every N yearsevery March on the 3rdEvery other rule is refused with recurrence_unsupported and
nothing written, wherever it appears: completing the task,
update_task(recurrence=…) or add_task(recurrence=…). That includes
every weekend, every 2 weeks on Monday, every month on the last Friday, every 1 day, abbreviated names, until …, for N times, and
a yearly rule on a task dated February 29. A recurring task is never
completed without its next occurrence. To complete one whose rule is
refused, clear the rule first (update_task(clear=["recurrence"])).
The next occurrence keeps the task's text, tags and priority. Its due
date (or scheduled, or start date, if it has no due date) moves by the
rule, and its other dates keep their distance from it. As in the Tasks
plugin, missed occurrences are not skipped: a weekly task completed
three weeks late gets its old date plus 7 days, which may already be
past.
Dates and the timezone. Every date argument accepts YYYY-MM-DD and
relative forms such as today, tomorrow, yesterday, +7d or -1d
(up to 3,660 days either way). "Today" is the current date in the
caller's task timezone: TASKS_DEFAULT_TIMEZONE (default UTC), or the
timezone saved on the panel's Tasks card. Every response that resolved a
relative date states the timezone and the dates it used. A list_tasks
cursor from a relative-date query is refused after midnight in that
timezone, because the dates moved; list again.
The default scope. list_tasks, task_agenda and add_task's
duplicate check across other notes work in the caller's default scope: the whole vault
minus the excluded folders and excluded note tags saved on the panel's
Tasks card, and only the checkboxes that are tasks under the caller's
task rule. With nothing saved, which is
the default, nothing is excluded. scope="all" ignores the exclusions
and the rule, and every listing states its scope and how many tasks the
scope and the rule left out, so an exclusion is never silent.
Not modelled: custom status cycles (completing a task with any open
marker writes [x]), task dependencies, the plugin's "remove scheduled
date on recurrence" setting, and its "remove global filter from
description" display option (the filter text stays part of the task's
text and, when it is a tag, of its tags, so with #task as the filter
list_tasks(tags=["task"]) matches every task). A task with
🏁 delete is refused on completion (on_completion_unsupported)
rather than deleted. The settings are under
Configuration and the panel card under
Tasks settings.
Raw read/write/browse of arbitrary vault files (PDFs, images, skill assets, data files) — distinct peers to the note tools, which stay markdown-only. Pure byte transport: no server-side PDF/text extraction, no embedding or indexing of non-markdown files.
read_file(path, encoding="auto", offset=0, limit?), returns
text-like files as text, images as an inline image block that renders
in-client, and other binaries as a base64 string. text/base64
force the form. Refuses files over MAX_FILE_READ_BYTES (default
10 MB); text results are additionally bounded by
MAX_READ_RESPONSE_CHARS and continue via offset. hash_only=True
returns the whole file's content_hash without content; base64 results
include that hash in their header. Text results remain plain text.write_file(path, content, encoding="base64", overwrite=False),
lands a file in the vault; base64 for binary, text for UTF-8.
No-clobber by default, auto-creates parent dirs, atomic write.
Capped at MAX_FILE_WRITE_BYTES (default 25 MB).list_files(folder=".", pattern="*", recursive=False, limit=200),
ls-style browse of files and subdirectories with size and mtime,
glob-filterable and result-capped.delete_file(path, permanent=False), soft-deletes a non-markdown
file to .trash/<YYYYMMDD-HHMMSS>-<basename>-<8 hex> with a single
atomic rename. Refuses markdown (that is delete_note), directories,
and symlinks.All four reuse the path-traversal guard and exclude any path with a
component starting with . (dot-directories and dot-files)
(.obsidian, .git, .trash, …), matching the indexer's visibility
rule.
Pass a read's content_hash as expected_hash when editing, updating
frontmatter, moving or deleting a note, overwriting a raw file, or deleting
a raw file. The canonical token is sha256:<64 lowercase hex>, computed
over the complete raw file bytes; a section or truncated read_note still
returns the whole-file hash. For raw files, use read_file(hash_only=True)
or the base64 header. Do not hash the returned text yourself.
A stale token refuses the operation before mutation, with a final
MCP-REFUSAL JSON line naming stale_precondition and the current hash.
Re-read and reconsider the edit before retrying. Moves bind the source
note only; moves and deletes still allow an in-place edit after their
preflight comparison. Overwrites retain their separate in-call byte check.
Successful publishing writes report a new hash when available.
The argument is optional by default. WRITE_PRECONDITION_REQUIRED=true
requires it on the supported destructive calls; enable this only after
clients supply tokens. Creation is exempt and refuses a supplied token
as no_incumbent. Files above their read cap cannot be guarded.
The task write tools take the same optional expected_hash. In required
mode, complete_task and update_task with a plain task id need no
hash: the id names exactly one line in the bytes the write replaces,
and the rest of the note is spliced from the current file, so the write
cannot carry a stale copy of the note back. add_task removes nothing
and is exempt. An id with an occurrence suffix (<key>.2of3) needs
expected_hash in every mode. move_task binds each note separately:
expected_hash the source (a plain id satisfies required mode there) and
to_expected_hash the destination, which is exempt like add_task.
No MCP client can hand a tool the bytes of a file the user is looking
at, so write_file is only usable when the agent already has the
content. These tools close that gap with short-lived capability links,
redeemed over the public /transfer/* routes.
request_upload(path, overwrite=False, expires_in?), mints a
single-use link bound to exactly one destination path. The human
opens it, picks a file, and it lands at path — nothing else can be
written with it.check_upload(upload_id), reports pending / uploading /
completed (with path, size, sha256 and MIME) / unknown (a stream
started and the server never recorded how it ended — read the path
before re-minting) / revoked (the credential or vault root changed
under the link) / expired, scoped to the identity that minted it.request_download(path, expires_in?), mints a link the human can
save one vault file from. Usable more than once until it expires, and
bound to the file's exact bytes at mint time.import_from_url(url, path, overwrite=False), fetches a public https
asset straight into the vault under an explicit outbound deny policy
(no private, loopback, link-local, metadata or tunnelled addresses,
in any spelling, re-checked at every redirect).The token travels in the URL fragment, which browsers never send, so
no server-generated request target or access log contains it. Uploads
are claimed before a body byte is read, published atomically with
no-clobber semantics, and bound at mint time to the file state they
were minted against — a link cannot silently undo an edit made while it
was waiting. MCP_HOSTNAME or BASE_URL must be set; without a public
origin the mint tools refuse rather than emit a localhost link.
get_backlinks(path, limit=50), notes linking TO pathget_links(path), outgoing links, both resolved and danglingget_neighborhood(path, depth=1, limit=50), undirected BFS over the
resolved-link graph, capped at depth ≤ 5 and limit ≤ 200find_related(path, limit=10), semantic neighbors via averaged
chunk embeddings and pgvector cosine distance, deduped per note, with
the same section locator and index_transition: line as semantic_searchfind_orphans(folder?, limit=50), notes with zero in or out
resolved linksomcp_ prefix, stored as SHA-256 hashes, with
read and readwrite permission scopes. Write tools refuse on
read-only keys.tools/list (and still refused if
called by name); choose read + write at consent for all 33, and
reconnect the client after changing a grant's scope.usage_logs with name, params
(truncated to 200 chars), duration, response size, and the calling
credential's name — recorded at call time, so the audit trail
survives deleting the key or OAuth client it describes./health is unauthenticated and returns status plus two capability
fields: transfer_mount_check_available (the kernel supports the
mount check transfer writes need) and
vault_named_staging_fallback_active (a write has actually staged
under a name on this process)./health also carries an indexer object (status, task_running,
failing_scopes, embedding_failing_scopes,
max_consecutive_failures, quarantined_notes, last_success_at),
and the top-level status becomes "degraded" when the indexer task
has died, any index, embedding or enumeration failure counter — or a
scope's run of incomplete re-derives — reaches
INDEXER_DEGRADED_AFTER_FAILURES, or a note is quarantined. The HTTP
code stays 200 — a restart cannot repair vault content or a provider
outage, and Kubernetes uses /health for liveness — so monitor the
status field (a keyword or JSON check for "status":"ok"), not
the status code. Counts only: no path, error text or user id.Every write — note tools, write_file, uploads and imports — stages
the new bytes in a temporary inode, fsyncs them, and only then
publishes. Creation publishes with a kernel-atomic hard link that
refuses to clobber; move_note and the soft delete publish with a
single non-replacing rename; an overwrite is a same-directory rename
onto the destination. The destination directory (and any directory the
call created) is fsynced afterwards, so a crash mid-write can neither
truncate a note nor lose one the server reported as written.
Staging happens in an unnamed inode wherever the filesystem supports
one, so no temporary name is ever visible in the vault. On a mount that
refuses that (some NFS exports do), those writes refuse with an error
naming VAULT_ALLOW_NAMED_STAGING_FALLBACK; setting that flag takes
named staging back on both write paths as a declared, weaker guarantee.
See System requirements.
The field has sorted itself into two shapes since this README was first written, and the axis that matters is not "lightweight versus heavy" but where the agent runs relative to the Obsidian app.
Desktop-local. The tool talks to a running Obsidian. The Local
REST API plugin has shipped its own Streamable HTTP MCP server
since 4.0.0 (2026-05-15), and 5.5.0 (2026-10-17) added If-Match
conditional writes and result caps, so it is no longer "glue" but a
real local MCP endpoint. The official Obsidian CLI (1.12)
reads, writes, searches and walks backlinks, and requires the app to
be running. In-app agent plugins sit in the same group. All of these
get the app's own metadata cache for free; none of them work on a
headless box, and none give claude.ai or a phone a way in without you
exposing your desktop.
Headless and remote. The server works on the vault files directly,
wherever they are mounted, with no Obsidian process. This server is one. Vault Cortex (aliasunder,
September 2026) is a single container with OAuth 2.1, SQLite FTS5 plus
sqlite-vec fused by RRF and a local reranker, tasks and daily-note
helpers, and a bundled Obsidian Headless Sync client; one vault per
container, no multi-user. StevenStavrakis/obsidian-mcp v2
(2026-08) is a stdio server with journaled atomic writes,
etag/if_match preconditions and 30-day recovery snapshots, and no
semantic search. jacksteamdev/obsidian-mcp-tools was archived on
2026-05-13 and is dropped from the table.
If Obsidian is open on the machine the agent runs on and you need no remote access, the official CLI or the REST plugin is the lighter choice. This server is for the headless, remote, multi-client and semantic case: nothing on the box but a container and Postgres, and every client you own hitting the same vault.
As of 2026-10-28:
| This server | REST plugin MCP | Obsidian CLI | Vault Cortex | StevenStavrakis v2 | |
|---|---|---|---|---|---|
| Runs without Obsidian | ✅ | — | — | ✅ | ✅ |
| Semantic search | ✅ pgvector | — | — | ✅ sqlite-vec + RRF + reranker | — |
| Wikilink graph | ✅ backlinks, neighborhood, orphans, related | backlinks | backlinks, orphans, dead ends | backlinks, outgoing, orphans | — |
| Atomic / journaled writes | ✅ staged, fsync, no-clobber publish | ? | ? | ✅ temp + rename | ✅ journaled, rollback, snapshots |
| Write preconditions (hash / etag) | ✅ expected_hash | ✅ If-Match (5.5.0) | — | — | ✅ if_match |
| Dry-run diff | ✅ | — | — | — | — |
| Soft-delete to trash | ✅ .trash/ | ? | ✅ | ✅ | ✅ 30-day snapshots |
| Multi-user vault roots | ✅ | — | — | — | — (multi-vault, one user) |
| OAuth for claude.ai / ChatGPT | ✅ 2.0 PKCE + API keys | — (API key) | n/a | ✅ 2.1 PKCE + DCR | n/a (stdio) |
| Audit log | ✅ per call, in the panel | ? | — | server logs | transaction journal |
| Setup tax | Postgres + Docker | Obsidian + plugin | Obsidian 1.12 | one container (Sync subscription for the remote image) | Node 22 |
The table reflects each project's documented features on that date,
read from their READMEs and release notes; a ? means I could not
confirm it either way. Verify the specifics before betting on them.
The comparison that matters more, now that most of my vault traffic is agents rather than me, is against memory as a service: your agent calls an API, the service stores what it's told, and it hands back what it judges relevant later. mem0, Zep and Letta are the names people usually reach for. What follows is about that architecture — memory behind a service boundary — not about any one product's current feature list, which moves faster than a README can track.
One thing has changed since that paragraph was first true: files
plus search is now the mainstream substrate, not the odd one out.
Letta's MemFS is git-backed markdown; Claude Code's auto-memory is a
MEMORY.md index plus topic files; Anthropic's memory tool is a file
directory; OpenClaw and Hermes keep markdown workspaces. "Readable
markdown memory" on its own no longer sets this server apart. The
closest comparables are Basic Memory (markdown plus a SQLite or
Postgres index, hybrid search, an optional reranker, structured
frontmatter filters; its own folder and note format, AGPL, with a paid
cloud) and doobidoo/mcp-memory-service (self-hosted, remote MCP
over OAuth, opaque memory records rather than files). Against those,
the differences are five, and plain:
expected_hash, atomic no-clobber
publish, .trash/, dry-run diffs.The difference from memory-as-a-service is where the memory lives and who can open it.
Health/2026-08 - Trusting expertise.md, in a folder, in your
editor, in grep. There's no gap between what the agent stored and
what you can look at.cp -r.
No export format, no migration script, no question about what you'd
be left holding if a project stopped being maintained. That's a
property of files, not something this server does for you.CLAUDE.md at the vault root tells every agent, on
its first call, where things go and what frontmatter they carry, so
conventions are versioned next to the notes they govern.What the hosted shape buys you in exchange is real, and worth saying plainly. There's no Postgres to run, no pgvector version to keep current, no container to babysit — you get a memory layer by adding a dependency, which is a genuinely better trade for most people. And systems in that class typically do work this server deliberately doesn't attempt: pulling facts out of a conversation automatically, reconciling ones that contradict each other, and scoring relevance or decaying old memories so they stop crowding out new ones. Here an agent remembers something because it decided to write a note, and the judgment about what's worth keeping is the agent's, not the server's. The consolidation help planned here is a report that proposes and never writes (#359). If you want memory that curates itself, that's a fair reason to pick the other shape.
The other baseline isn't an MCP server at all: point Claude Code, a
generic filesystem MCP, or any agent with file tools straight at the
vault folder. That works — until a write goes wrong. An agent
rewriting a whole file from its memory of an earlier read will
eventually clobber a note, follow a symlink somewhere it shouldn't,
or "tidy up" your .obsidian config. Nothing in a raw file API
pushes back. This server's write path is shaped by exactly that kind
of incident, and it assumes the caller will eventually do something
wrong:
edit_note can address a
find-string or a single section rather than replacing the file, and
dry_run=True returns the unified diff before anything lands.
set_frontmatter mutates YAML structurally and leaves the body
byte-identical.create_note and write_file refuse to
overwrite an existing file; replacing one is an explicit opt-in.delete_note and delete_file soft-delete
into .trash/ with a non-replacing rename; permanent=True is the
explicit escape hatch, not the default.openat2(RESOLVE_BENEATH | RESOLVE_NO_SYMLINKS | RESOLVE_NO_MAGICLINKS), writes refuse a symlink as the final
component, and dot-directories (.obsidian, .git, .trash) are
out of reach of every tool.truncated, next_offset, an outline) rather than silent loss,
so one huge note can't flood an agent's context into a bad edit.When an agent misbehaves through this server you get a refused call,
a diff, a trash entry, and a usage-log line. When it misbehaves with
raw file access you get whatever git diff can recover — if the
vault was in git at all.
The server ships with a built-in admin UI for the parts of operations that are easier to look at than to query: minting keys, watching the indexer, eyeballing tool-call traffic, and resetting embeddings when you switch providers.
Per-tool-call audit log with a 14-day request histogram. Every MCP call is recorded with the calling key, tool name, duration, and response size — useful for noticing a misbehaving agent burning tokens on something it shouldn't.

Bearer keys with read / readwrite scopes for API clients, and a
separate OAuth 2.0 PKCE flow for clients like ChatGPT, Claude Desktop,
and claude.ai that expect a proper authorization-code dance. The OAuth
server supports public (none) and confidential (client_secret_post)
token-endpoint authentication plus refresh tokens, and, for metadata-document
clients only, private_key_jwt (RFC 7523 signed client assertions).
Clients identify themselves in one of two ways:
client_id is an https URL to a JSON document it publishes, and
the server fetches it through the same hardened, SSRF-guarded client as
import_from_url. Claude (claude.ai, Desktop, mobile), Claude Code and
ChatGPT use this whenever the server advertises it, which it does by default.
Claude Code's loopback callback (http://localhost:<any port>/callback) works
this way. Claude and Claude Code are public (none) clients. ChatGPT's
document declares private_key_jwt: the server also fetches the document's
same-origin jwks_uri, stores the validated public keys with the client,
and ChatGPT then signs a short-lived, single-use assertion for every token
exchange and refresh (and revocation). The server refetches the key set
from the same pinned URL when an assertion names a key it does not hold,
and before a token request once the stored set is more than a day old./register, RFC 7591, deprecated by MCP but
kept) remains the fallback for any client that sends no URL.The consent page names a CIMD client by the host its document was fetched
from, never by the name the document gives itself. Every authorization
response carries the RFC 9207 iss parameter.
Each client's page lists its grants — one row per /authorize approval,
not per token — with a Revoke control and a permission select per grant,
so revoking really ends the session instead of leaving a refresh token
to mint a replacement. Revoked and expired rows stay listed, dimmed, for
a week.

A read-only file tree of the mounted vault, mostly for sanity-checking that the container sees what you think it sees.

Indexer status, current embedding provider and model, vault path, and the danger zone: Reset embeddings (drops and recreates the embeddings column at the configured dimension — use it when switching providers) and Force re-embed (keeps the column, clears every note's embedded-content hash so the next pass re-embeds the vault). Both pause the indexer while they run.
The dashboard separates two things that used to be conflated: Last
run is the indexer's own heartbeat — the last pass that completed,
whether or not anything had changed — and Last change detected is
the newest indexed_at on any note. A quiet vault makes the second one
old while the indexer is perfectly healthy.

A Tasks card holds the settings of the task tools. In multi-user mode it is on each user's Account page and applies to that user's own calls only. In single-user mode it is on the Settings page and applies to every MCP caller of the server. Nothing is stored until the card is saved, and an unsaved card means the server defaults from Configuration.
all), Only checkboxes with task details or a
task tag (fields) or Only checkboxes that contain the global filter
text (filter); a Task tags list, one per line, at most 32; and a
Global filter text field, at most 64 characters on one line. An
"In use now" line shows the rule in effect and whether it is the server
default or set here. Server default takes the server's whole rule as
one unit (rule, task tags and filter text together) and ignores the
card's two fields, so what the card says is in use is exactly what is
used. Tags or a filter text the chosen rule does not use are kept, so
switching rules to compare loses nothing. The filter rule without a
filter text is refused, with nothing saved.today or +3d, and the date written when a task is completed,
cancelled or added. Any IANA timezone name (the field suggests common
ones); blank uses TASKS_DEFAULT_TIMEZONE. The card shows the zone in
use. A saved zone this server cannot load falls back to UTC, and both
the card and every task response say so.ticket/ops
under ticket), are left out of the default scope: listings, the
agenda and add_task's duplicate check. A caller can still pass
scope="all", and every listing counts what was excluded.Deploying on a VPS from scratch? See
DEPLOYMENT.mdfor the full walkthrough: Postgres setup, Caddy and TLS, vault sync via Nextcloud, and the gotchas that bite first-time deploys. Running Kubernetes? Seedocs/deployment-kubernetes.mdand the kustomize manifests indeploy/kubernetes/.
The bundled Caddy configuration fails closed on /admin, /api, and
/authorize; replace its placeholder basic-auth hash before starting it.
pgvector 0.8.0 or newer installedbge-m3, the
default, or qwen3-embedding:0.6b, which the reference deployment
runs; see Embedding model choice), or an
OpenAI API key. Anything that speaks the OpenAI embeddings protocol
works (Azure OpenAI, OpenRouter, Together, etc.).The server checks these at startup and tells you which one failed rather than misbehaving later.
Linux kernel ≥ 5.6. Every directory below the vault root is opened
with a single openat2(RESOLVE_BENEATH | RESOLVE_NO_SYMLINKS | RESOLVE_NO_MAGICLINKS), which is what makes the kernel — not the
application — prove that a write stayed inside the vault. There is no
fallback: on an older kernel, or under a container seccomp profile that
blocks openat2, the server logs the reason and exits non-zero.
Kernel ≥ 5.8 for file transfer. statx()'s STATX_MNT_ID is how a
publication refuses a destination that sits on a different mount than
the staging directory (a nested bind mount under the vault root would
otherwise fail only after a whole upload body had streamed). Below 5.8
the server logs one warning and starts: request_upload,
import_from_url and PUT /transfer/upload refuse, and everything else
— reads, note writes, search, downloads, the panel, OAuth — is
unaffected. /health reports it as transfer_mount_check_available.
pgvector ≥ 0.8.0. Filtered semantic search needs
hnsw.iterative_scan, which landed in 0.8.0. An older extension accepts
the setting as an unknown placeholder and silently runs a plan that
drops post-filter candidates — silently worse search results — so the
server exits instead. Fix with ALTER EXTENSION vector UPDATE or a
newer database image.
Filesystem. Case-sensitive and non-normalising (ext4, xfs, and the
usual bind mounts). It must support hard links within the vault root and
renameat2(RENAME_NOREPLACE); without those, note creation, move_note
and the soft delete refuse with a named error rather than degrading to a
publish that can clobber. O_TMPFILE is wanted but optional: where it
is unavailable, set VAULT_ALLOW_NAMED_STAGING_FALLBACK=true to accept
named staging instead (see Configuration). macOS and
Windows hosts are out of scope; run the container on a Linux VM.
git clone https://github.com/maxkuminov/obsidian-mcp.git
cd obsidian-mcp
cp .env.example .env
$EDITOR .env
Using a bundled stack (docker-compose.simple.yml or
docker-compose.proxy.yml)? It runs PostgreSQL with two identities: set
OBSIDIAN_DB_PASSWORD in .env (the app's non-superuser role, from
which the compose file builds DATABASE_URL) and copy
postgres.env.example to postgres.env with its own
POSTGRES_PASSWORD (the database superuser, which only the postgres
container sees). make init generates both. See
DEPLOYMENT.md.
In docker-compose.yml, point the /obsidian volume at your vault:
volumes:
- /path/to/your/vault:/obsidian
Option A, OpenAI (zero local infra):
EMBEDDING_PROVIDER=openai
OPENAI_API_KEY=sk-...
EMBEDDING_DIMENSIONS=1024
OPENAI_EMBEDDING_MODEL=text-embedding-3-small
The server validates OPENAI_API_KEY at startup and refuses to boot
if it's missing.
Option B, Ollama (self-hosted, GPU recommended):
EMBEDDING_PROVIDER=ollama
OLLAMA_URL=http://your-ollama-host:11434
EMBEDDING_ALLOW_PLAINTEXT=true
EMBEDDING_MODEL=bge-m3
EMBEDDING_DIMENSIONS=1024
This is the default. Omitting EMBEDDING_PROVIDER falls back to
Ollama. On a new install, consider qwen3-embedding:0.6b (also 1024
dimensions) with a query instruction, which is what the reference
deployment runs; read Embedding model choice
before the first index pass, because changing the model later means a
full re-embed.
Option C, Hugging Face Text Embeddings Inference (TEI, self-hosted):
EMBEDDING_PROVIDER=tei
TEI_URL=http://your-tei-host:80
TEI_EMBEDDING_MODEL=BAAI/bge-m3
EMBEDDING_DIMENSIONS=1024
TEI is the server of Hugging Face's text-embeddings-inference image. The
tei provider uses its native POST /embed API, for servers that do not
expose the OpenAI-compatible route. If your TEI build does serve
/v1/embeddings, you can use the openai provider
instead with OPENAI_BASE_URL=http://your-tei-host:80/v1 and any non-empty
OPENAI_API_KEY. A change of provider
or model needs make reset-embeddings, exactly as for the other options.
TEI_EMBEDDING_MODEL must equal the model_id your server reports at
GET /info, exactly, including for a local path such as /data/model.
The server checks this at startup: a different model_id, or a
TEI_EMBED_BATCH_SIZE above the server's max_client_batch_size, refuses
startup. If TEI is unreachable at startup the server still starts, and no
vector is requested until a check passes (one re-check every 30 s), so
semantic search and indexing fail per call during that window while keyword
search, reads and writes keep working. The check compares the name only;
replaced weights behind one name are not detected.
If your TEI server was started with --api-key (or sits behind a gateway
that wants a bearer token), set TEI_API_KEY. The server sends it as
Authorization: Bearer <key> on /embed, the /info check and the panel's
/health probe, and to no other host. Without it, such a server answers
/info and /embed with 401:
the startup check logs GET /info answered HTTP 401; TEI_API_KEY is not set
(or the server rejected TEI_API_KEY when the key is wrong), the process
keeps serving with embedding withheld, and it never exits over it. TEI
leaves /health public (as of v1.8.3), so the panel can show the server
as reachable even with a wrong key. The key is never logged or shown. The openai provider against TEI's /v1 route
already sends OPENAI_API_KEY as its bearer token.
The provider sends truncate: true, so a chunk or query longer than the
model's limit is embedded from its leading tokens, the rest is not
represented in the vector, and the note is still marked as embedded. Ollama
truncates the same way; CHUNK_SIZE is the control.
The embedding URL must be https, or http to a loopback host
(localhost, 127.x, ::1). Plaintext http to any other host —
another container such as http://ollama:11434 included — refuses to
start unless EMBEDDING_ALLOW_PLAINTEXT=true acknowledges that chunks
and queries cross that hop unencrypted. .env.example ships with it
set for that reason; drop it once the endpoint is https (use
EMBEDDING_CA_FILE for an internal CA). Inside a container, localhost
is the container itself, so an Ollama on the Docker host still needs
the override.
make init # data dirs and .env from template (skip if you've already edited)
make db-init # create database, user, and pgvector extension
make deploy # build, push to local registry, run migrations, recreate container
The first deploy backfills the index, the wikilink graph, and the
embeddings. For a 2 to 3k-note vault on Ollama with a GPU this takes
a few minutes. On text-embedding-3-small it's seconds.
Prebuilt images are public at ghcr.io/maxkuminov/obsidian-mcp
(:v<release> per release tag, :main for the tip), built and scanned
by CI; a release tag is the image CI proved for that commit, retagged,
never rebuilt. docker pull ghcr.io/maxkuminov/obsidian-mcp:v<release>
needs no token. Or build locally as above.
Mint an API key in the control panel, then point your MCP client at:
URL: https://obsidian-mcp.<your-domain>/mcp
Auth: Bearer omcp_...
For Claude Desktop, add to claude_desktop_config.json:
{
"mcpServers": {
"obsidian": {
"url": "https://obsidian-mcp.<your-domain>/mcp",
"headers": { "Authorization": "Bearer omcp_..." }
}
}
}
For Claude Code:
claude mcp add obsidian --transport http \
--url "https://obsidian-mcp.<your-domain>/mcp" \
--header "Authorization: Bearer omcp_..."
The first thing any agent should do in a new session is call
get_vault_guide(). That's how it learns your folder structure,
naming conventions, and YAML schema before it writes anything.
From 1.0 the version number is a promise about the MCP tool contract:
the tools' names (28 at 1.0, 32 since the task tools, 33 since
move_task), their argument
schemas, the shape of their result lines, and the MCP-REFUSAL codes.
An agent written against 1.0 keeps working against every 1.x.
tests/fixtures/tools_list_full_v3.json
is the complete tools/list result an API key or a readwrite OAuth
grant sees (every field of all 33 tools), and
tests/fixtures/tools_list_readonly_oauth.json pins the 20 names a
read-only OAuth grant lists. tools_list_full_v2.json keeps the 1.3
surface, and a test derives it from v3 (move_task removed, every other
entry byte for byte); tools_list_full_v1.json keeps the 1.0 surface,
and a test derives it from v2: the four task tools removed, and
list_tasks differing only by its description and its added optional
arguments. CI fails on any drift; a deliberate change
regenerates the fixture and says so in its spec. Result line shapes
are specified in openspec/specs/ and pinned by each tool's tests,
not by one fixture.MCP-REFUSAL line can
carry is declared in src/services/refusals.py (CODES), and a refusal
with any other code cannot be constructed. That module is the catalogue;
there is no separate list. The transport 429s (failed authentication,
transfer redemption, body_memory) are outside that line by design..env.example.DEPLOYMENT.md documents each one's downgrade (it
does so for every migration from 033 on).Not part of the contract: the control panel and its /api/* endpoints,
log fields, the search-evaluation harness (scripts/search_eval/), the
internal MCP SDK version, and ranking quality. Which notes come back, and
in what order, moves with the index, the embedding model and the
reranker; the harness measures it
(docs/architecture/search.md).
MCP_SANDBOX_MODE, the registry-evaluation switch, is outside the promise
too.
Pull, then make deploy (or rebuild your compose stack); migrations
run on start.
Across the task-move release (#430):
move_task, moves a top-level task with the lines
indented under it to another note or section (see Tasks). The
tool list grows to 33; a read-only OAuth grant still lists 20 (the new
tool needs write permission and is hidden from it). Connectors pick it up
when they next list. No existing tool's name, schema or description
changes; the server instructions gain one clause after their lead.move_task takes one write
token per call, though it publishes two notes.move_task joins the write
class, so CLASS_MAPPING_VERSION moves to 7 and make concurrency-report evidence gathered before the upgrade does not carry
over.task_move_incomplete (a partial outcome: the
destination was written and the source was not, with the exact call that
completes the move), resume_unmatched and block_id_conflict.Across the file-permissions release (1.5.1, #447):
Files the server writes keep their permissions on edit and follow
their folder on create. Before 1.5.1 every file the server wrote,
through any tool, upload or import, got mode 0o666 & ~umask. Under a
folder default ACL that cut a group's access to read-only (mask::r--),
and every edit turned a 0600 file into 0644. Now an edit keeps the file's
permission bits, POSIX access ACL and group, and a new file gets exactly
what any other program creating it in that folder would get: the folder's
default ACL where it has one, otherwise 0o666 & ~umask (one exception:
on a filesystem without POSIX ACLs, an upload into a setgid folder whose
group the server is not in keeps the server's group, so that group gets
only the "other" access, as before 1.5.1). A new note
follows its folder's default ACL exactly, so in a folder whose default
ACL grants write to "other" the note is world-writable, like any other
file created there; tighten that folder's default ACL if you do not want
that.
New folders under a default ACL follow it too (they were created
with mask::r-x, so the group could not create files in them). Folders
outside a default ACL are unchanged (0755).
With umask 022 and no ACLs (the published image), new files and folders look exactly as before; only an edit of a file whose mode or group differs from what a new file would get behaves differently.
When the server cannot give a file its group (a group it is not a
member of), the file keeps the server's group and the original group's
permissions move to a named entry: getfacl shows group::--- and
group:<group>:rw-. On a filesystem without ACLs the group bits are
cleared instead and the "other" bits capped by them. Nobody gains access
by this.
A permission step that fails for any reason other than "no ACLs on
this filesystem" now refuses the write (io_failure, "nothing was
written"; an upload answers 500 and the link can be retried) and logs
one ERROR line, file permissions not applied; nothing was written,
naming the step and the error. An unguarded
write_file(overwrite=True) whose target's permissions change during
the call now answers concurrent_write.
Files earlier versions already narrowed or widened are not repaired. To find files and folders whose ACL mask lost write, and review the list before changing anything:
find <vault> \( -type f -o -type d \) -exec sh -c \
'getfacl -cp "$1" 2>/dev/null | grep -Eqx "mask::r-[-x]" && echo "$1"' _ {} \;
Restore write on one you confirm (rw for a file, rwx for a folder):
setfacl -m m::rw <file>, setfacl -m m::rwx <folder>. A file that was
private before an edit cannot be told apart from one created readable;
find <vault> -type f -perm -o=r lists the world-readable ones, and
chmod 600 <file> (or chmod 640) restores one you know should be
private. No setting, no migration.
Across the task-rule release (migration 040, #434):
all,
keeps every checkbox a task: every response, write and outstanding
list_tasks cursor stays exactly as it was. See
Which checkboxes are tasks.task_rule, task_tags,
global_filter) and two CHECKs to task_settings. It writes no row,
rewrites no table, re-derives and re-embeds nothing, and runs as the
database's non-superuser owner.TASKS_RULE, TASKS_RULE_TAGS or TASKS_GLOBAL_FILTER, or
TASKS_RULE=filter without a filter text, stops the app and the
migration step, since both load the same settings. Set them wherever
the settings are loaded (on Kubernetes, the ConfigMap the migrate
initContainer also reads), and quote a filter text that starts with a
hash sign (see Configuration).list_tasks,
task_agenda and add_task now mention the rule; the tool count and
every schema are unchanged.task_agenda needs a slightly larger response cap while a rule is in
force: 3,121 characters instead of 2,800 (MAX_READ_RESPONSE_CHARS,
default 40,000, so this binds only on a deployment that lowered it).task_settings, which is
already dumped with its rows.alembic downgrade 039 with the
new image. That drops the three columns and both CHECKs, and with
them every saved task rule, task tag and filter text; the previous
image then lists every checkbox again. Details in
DEPLOYMENT.md.Across the task-tools release (migration 039, #428):
TASKS_DEFAULT_TIMEZONE. Unset, it is UTC and
nothing changes. If you set it, it must be an IANA timezone this build
knows (Europe/Berlin, America/New_York); a misspelt name, or a
host-only name such as localtime, stops the app and the migration
step, since both load the same settings. On Kubernetes, put it in the
ConfigMap that the migrate initContainer also loads, not on the app
container alone.note_tasks and
notes_metadata, a constraint, two indexes and one new table,
task_settings. It writes no row and rewrites no table, and runs as the
database's non-superuser owner.list_tasks rows show id pending and the
header counts task ids pending, the text and recurring filters
are approximate and say so, and move_note(rewrite_links=True) answers
index_not_ready. The task write tools work throughout: they read the
note itself, not the index.list_tasks caller now sees. Rows gain
— id <id>; tags= matches nested tags and ignores case (work now
also matches #Work/admin; everything that matched before still does),
and the header's tags: echo is lower-cased; a tags value outside the
tag grammar (["2024"], ["a.b"], a non-ASCII tag), which used to
return an empty page, is now refused invalid_argument; due_by and
scheduled_by also accept relative dates, so the wording of the
malformed-date refusal changed; a path containing a backtick is now
shown with the backtick escaped as \u0060 (it was printed raw); and
the header gains task ids pending. A list_tasks cursor issued before the upgrade is
refused once (invalid_argument): list again without it.task_agenda,
complete_task, update_task and add_task bring the tool list to 32.
A read-only OAuth grant now lists 20 (the three task write tools are
hidden from it). Connectors pick the new tools up when they next list.write class and task_agenda the scan class, so
CLASS_MAPPING_VERSION moves to 6 and make concurrency-report
evidence gathered before the upgrade does not carry over.TASKS_DEFAULT_TIMEZONE, TASKS_SET_DONE_DATE,
TASKS_SET_CANCELLED_DATE, TASKS_SET_CREATED_DATE,
TASKS_NEXT_RECURRENCE_BELOW (see Configuration).
Per-user values are saved on the panel's Tasks card.
The image gains a pinned tzdata package, so timezone names no longer
depend on the operating system's zone files.task_settings is durable and is dumped with its rows;
note_tasks stays derived (schema only).alembic downgrade 038 drops 039's objects, including every saved
task setting. Details in DEPLOYMENT.md.Across the ChatGPT private_key_jwt release (migration 038, #420):
oauth_clients and
replaces or adds three CHECKs, with no backfill, and takes seconds.
Existing DCR and CIMD clients and their grants are untouched. Its
downgrade refuses while any private_key_jwt client exists (delete it
in the panel first; its grants go with it).invalid_client at
/authorize before this release, because its document declares
private_key_jwt. Nothing to configure; there are no new settings.private_key_jwt. It authenticates as a public client, and the token
request is refused (oauth_token_refused reason=invalid_client.assertion_missing). Delete the connector in ChatGPT
and add it again with the same URL. Nothing needs changing on the server.
The same applies after any future change to
token_endpoint_auth_methods_supported.private_key_jwt client's key set (jwks_uri, same origin as
the document) at consent and, when keys rotate or the stored set is a day
old, before a token request. The same SSRF-guarded client and egress
rules apply.private_key_jwt in
token_endpoint_auth_methods_supported and
token_endpoint_auth_signing_alg_values_supported, only while
OAUTH_CIMD_ENABLED is true. /register still does not accept
private_key_jwt.Across the OIDC account-linking release (migration 037, #416):
users, with no backfill, and takes seconds. With
SSO off nothing else changes. Its downgrade drops every link.OIDC_SUBJECT_USER_IDS is retired. A deployment that still sets
it refuses to start. If yours did, do this in order (it is also in
the startup message): (1) on the old release, confirm a local admin
password works; (2) set LOCAL_LOGIN_ENABLED=true; (3) copy the
map's subject-to-user pairs, then remove the OIDC_SUBJECT_USER_IDS
line (delete it; an empty OIDC_SUBJECT_USER_IDS= fails to parse at
startup); (4) deploy and start; (5) sign in with the password and, on each
user's edit page, Single sign-on → Bind subject with their
former subject; (6) verify an SSO sign-in per user and one MCP
client's /authorize consent; (7) optionally set
LOCAL_LOGIN_ENABLED=false again, once the startup log shows no
CRITICAL lockout line. Details:
docs/native-oidc.md, "Upgrading from OIDC_SUBJECT_USER_IDS".client_secret_post via
OIDC_TOKEN_AUTH_METHOD, OIDC_EXTRA_SCOPES, OIDC_DISPLAY_NAME
and OIDC_CA_FILE are new. OIDC_REQUIRED_GROUP is now optional;
set, it works as before. The requested scopes become
openid email profile. A provider that advertises RFC 9207 must now
return iss on the callback.Across the reranker-documents release (#402):
rerank=true now
sends each candidate note's embedding input (title, heading path, tags,
then the chunk) for its cosine-best chunk and up to three more of its
already-fetched chunks, at most RERANK_MAX_DOCUMENTS per call (new,
default 100, 50–200; 50 restores the previous count); a note scores
the best of its documents. rerank=false is byte-identical. The usage
row gains rerank_documents.RERANK_TIMEOUT_MS accepts 100–30000; the default stays 1,500.
Size it with the document budget: RERANK_TIMEOUT_MS ≥ RERANK_MAX_DOCUMENTS × average characters × per-character cost,
doubled when the GPU is shared with the embedding model. The
reference deployment runs 20000
(DEPLOYMENT.md, "Reranker (optional)").
Under MCP_CONCURRENCY_MODE queue or enforce, keep it at or below
MCP_CONCURRENCY_WAIT_SECONDS × 1000 unless make concurrency-report
passes with rerank=true traffic.RERANK_TIMEOUT_MS to 10000 or less first: the previous image's range
ends there and refuses to start above it.Across the Client ID Metadata Documents release (migration 036, #357):
oauth_clients, with no backfill, and takes seconds. Its downgrade refuses while CIMD clients
exist (delete them in the panel first)./register. OAUTH_CIMD_ENABLED=false is the rollback lever.iss (RFC 9207). A client
that compares it does so against the metadata issuer, which is
unchanged.resource (RFC 8707) is logged, not enforced. Each /authorize and
/token request is classified (resource_class) in the security log.
Refusing a foreign resource is a later change, gated on 14 days of these
logs (DEPLOYMENT.md).form-action http://localhost:* http://127.0.0.1:*
for native loopback callbacks.Across the scoped tools/list release (#358):
readwrite
now lists 19 tools: the nine write-required tools (create_note,
edit_note, move_note, delete_note, set_frontmatter,
write_file, delete_file, import_from_url, request_upload) are
left out. API keys of either permission and readwrite grants still
list all 28, byte-identical to before. A read-only client that cached
the 28 and calls a hidden tool gets permission_denied, as before.list_changed is sent. After a grant's scope is changed in the
panel, the connector sees the new list when it reconnects.write_file / delete_file made before their permission check (a
malformed expected_hash, no_incumbent for
write_file(overwrite=false)) are now permission_denied; a
readwrite caller's refusals are unchanged.Across the keyword-tags release (migration 035, #391):
make deploy stops the app before
the migration; on a hand-driven compose stack: stop → alembic upgrade head → start.Recreate that is downtime until the digest is reverted.
DEPLOYMENT.md, "Upgrading across migration 035"
has the statement to run against the live database before merging and
the remedy.alembic downgrade 034 with the new image strips the
tags part, then deploy the previous image.Across the chunk-minimum release (CHUNKING_VERSION 2, #390):
index_transition: N notes not yet re-chunked; … line returns on semantic_search, find_related and
hybrid_search, and /health reads indexer.rechunk: "in_progress",
then "complete". A section that did not change keeps its vector;
each pass logs Embedding complete: N notes, X chunks (S submitted, R reused).Across the search-confidence release (#389):
semantic_search and hybrid_search page gains
one header token: — confidence: ok (at the default threshold 0 that is
the only byte that changes). A parser that matched the old header
exactly needs to allow it. Usage rows gain confidence,
top_similarity and (hybrid) keyword_all. One optional setting,
SEARCH_LOW_CONFIDENCE_SIMILARITY (default 0 = off); leave it at 0 until
the calibration recipe in DEPLOYMENT.md passes for both tools.--depth 50 by default and writes report.json schema_version 2; a
runfile: baseline staged at depth 20 scores a null recall@50, so re-run
it for a delta. It gains a confidence subcommand.Across the reranker release (#367):
semantic_search
and hybrid_search gain an optional rerank argument (default false,
output unchanged), and four optional settings (RERANK_URL,
RERANK_MODEL, RERANK_TIMEOUT_MS, RERANK_ALLOW_PLAINTEXT). Nothing
changes until you set RERANK_URL. The concurrency class mapping is
unchanged, so readiness evidence carries over. A reference setup is in
Reranker reference setup.rerank is then refused by the unknown-argument rule, which is
the normal cost of rolling back a new argument.Across the hybrid-search release (#354):
hybrid_search, and one optional setting, HYBRID_RRF_K (default 60).hybrid_search shares the
embedding class with semantic_search, so CLASS_MAPPING_VERSION
moves to 5 and make concurrency-report evidence gathered before the
upgrade does not carry over.Across the change-feed release (migration 033, #351):
notes_metadata.content_changed_at (backfilled from each note's
modification time) and three change-feed tables. Nothing is re-parsed
or re-embedded. The feed starts with the first pass after the upgrade;
nothing before 033 has events.make db-backup and the Kubernetes
backup Job dump their rows (history, cursors and retention watermarks
cannot be rebuilt from the vault). A restore rolls the feed back to the
dump, so a cursor taken after it is refused and the agent restarts from
a date.get_changes joins the scan
class, so CLASS_MAPPING_VERSION moves to 4 and make concurrency-report evidence gathered before the upgrade does not carry
over.CHANGE_FEED_RETENTION_DAYS, CHANGE_FEED_MAX_EVENTS_PER_SCOPE,
CHANGE_FEED_MAX_EVENTS_PER_PASS, CHANGE_FEED_LOCK_TIMEOUT_MS (see
Configuration).alembic downgrade 032 drops them and loses only the feed's
history.Across the task-listing release (migration 032, #350):
list_tasks tool
— the same cost as the earlier extraction-version bumps. Version 4
shares version 3's embedding cleaner, so nothing is re-embedded and no
provider call is made. Until that pass finishes, list_tasks reports
the notes it has not scanned yet in its header, and
move_note(rewrite_links=True) refuses with index_not_ready as it
does after every bump.list_tasks joins the scan
class, so CLASS_MAPPING_VERSION moves to 3 and
make concurrency-report evidence gathered before the upgrade does not
carry over.semantic_search marking those notes stale until it catches up.
Rolling forward again is one more re-derive pass.Read this first when upgrading across the keyword-ranking release (migration 031, #344):
Knowledge graph-based persistent memory system
MOmodelcontextprotocol/servers92k近 7 天新增 200 个 star
Memory that reasons: continual learning for stateful agents. Better context, fewer tokens.
PLplastic-labs/honcho8.4k近 7 天新增 102 个 star
Semantic search across Sui documentation and knowledge sources, powered by kapa.ai
MYMystenLabs/sui7.8k
Convert scanned PDFs to Markdown or EPUB, and translate PDF and EPUB books via MCP.
OOoomol-lab/pdf-craft6.8k近 7 天新增 35 个 star
命令行和 MCP Server 访问 Gemini Notebook。
JAjacob-bd/gemini-notebook-mcp-cli6.6k近 7 天新增 78 个 star