Borrowing it
Nothing to install: this file belongs to cyanheads/obsidian-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/cyanheads/obsidian-mcp-server/main/AGENTS.mdgit clone --depth 1 https://github.com/cyanheads/obsidian-mcp-serverWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/cyanheads/obsidian-mcp-server/agents-md)<a href="https://agentmods.dev/instructions/cyanheads/obsidian-mcp-server/agents-md"><img src="https://agentmods.dev/badge/instructions/cyanheads/obsidian-mcp-server/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/cyanheads/obsidian-mcp-server/agents-md"><img src="https://agentmods.dev/badge/instructions/cyanheads/obsidian-mcp-server/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.11608 | $0.11608 |
| Opus 5.5 | $0.04643 | $0.04643 |
| Sonnet 5.5 | $0.02322 | $0.02322 |
| Haiku 4.5 | $0.01161 | $0.01161 |
Grade A, and why
obsidian-mcp-server AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 22d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
8 near-identical copies found in the catalogue:
- obsidian-mcp-server CLAUDE.md — 100% identical, 173 lines differ
- obsidian-mcp-server AGENTS.md — 100% identical, 173 lines differ
- obsidian-mcp-server CLAUDE.md — 100% identical, 0 lines differ
- exchange-rates-mcp-server CLAUDE.md — 86% identical, 406 lines differ
- exchange-rates-mcp-server AGENTS.md — 86% identical, 406 lines differ
- openstates-mcp-server CLAUDE.md — 84% identical, 427 lines differ
- smithsonian-mcp-server AGENTS.md — 84% identical, 383 lines differ
- coingecko-mcp-server CLAUDE.md — 84% identical, 396 lines differ
How it starts
The opening of the file, as written. The whole thing — 502 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Protocol
Server: obsidian-mcp-server
Version: 3.9.0
Framework: @cyanheads/mcp-ts-core ^0.13.22
Engines: Bun ≥1.4.4, Node ≥24.0.0
MCP SDK: @modelcontextprotocol/server ^2.4.0
Zod: ^4.6.7
Read the framework docs first:
node_modules/@cyanheads/mcp-ts-core/CLAUDE.mdcontains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
What's Next?
When the user asks what to do next, what's left, or needs direction, suggest relevant options based on the current project state:
- Re-run the
setupskill — ensures CLAUDE.md, skills, structure, and metadata are populated and up to date with the current codebase - Run the
design-mcp-serverskill — if the tool/resource surface hasn't been mapped yet, work through domain design - Add tools/resources/prompts — scaffold new definitions using the
add-tool,add-app-tool,add-resource,add-promptskills - Add services — scaffold domain service integrations using the
add-serviceskill - Add tests — scaffold tests for existing definitions using the
add-testskill - Field-test definitions — exercise tools/resources/prompts with real inputs using the
field-testskill, get a report of issues and pain points - Run
devcheck— lint, format, typecheck, and security audit - Run the
security-passskill — audit handlers for MCP-specific security gaps: output injection, scope blast radius, input sinks, tenant isolation - Run the
polish-docs-metaskill — finalize README, CHANGELOG, metadata, and agent protocol for shipping - Run the
maintenanceskill — investigate changelogs, adopt upstream changes, and sync skills afterbun update --latest
Tailor suggestions to what's actually missing or stale — don't recite the full list every time.
Core Rules
- Logic throws, framework catches. Tool/resource handlers are pure — throw on failure, no
try/catch. PlainErroris fine; the framework catches, classifies, and formats. Use error factories (notFound(),validationError(), etc.) when the error code matters. - Use
ctx.logfor request-scoped logging. Noconsolecalls. - The delete confirmation is opt-in; when on, it is gated on a consent record.
OBSIDIAN_DELETE_ELICITATION(defaultfalse) decides whetherobsidian_delete_noteconfirms throughctx.requestInput. Off is the default for two reasons: a client that declares elicitation but cannot render the form declines every round automatically, which the server cannot tell from a real decline (#151), and the round forces a stateful HTTP session, which locks outMCP_SESSION_MODE=stateless. Off,OBSIDIAN_WRITE_PATHS/OBSIDIAN_DENY_PATHS/OBSIDIAN_READ_ONLYbound what a delete can reach — the same boundobsidian_write_notewithoverwrite: truehas — anddestructiveHintstays for client-side approval. The mode is the operator's choice alone: never derive it fromctx.clientCapabilitiesor from a decline. On, the handler redeems (reads and deletes) thectx.staterecord named byctx.inputs.state()before anything else, checks write scope on the resolved path before it reads the note or asks, and acts on thectx.inputsanswer only when that record deep-equals{ operation, clientId, subject, target, contentHash }for this call; otherwise it stores a fresh record (ttl: 600) andreturn ctx.requestInput(...)with the record id asrequestState. An answer alone is never proof the user was asked. Neverawaituser input mid-handler. - All Obsidian access goes through
getObsidianService(). No directfetch()calls to the Local REST API in tools/resources — the service centralizes auth, TLS, timeouts, andctx.signalpropagation. - Secrets in env vars only.
OBSIDIAN_API_KEYis required; never hardcoded. - Cut noise. Add only what earns its place: no speculative generality, no guards for states the framework already prevents (Zod-validated params, classified errors), no abstraction until a third caller proves it, no option nothing sets.
- Command-palette tools are opt-in.
obsidian_list_commandsandobsidian_execute_commandare callable only whenOBSIDIAN_ENABLE_COMMANDS=true— Obsidian commands are opaque and can be destructive. When the flag is unset, the entry point wraps both withdisabledTool()so they're absent fromtools/list(LLM can't invoke) but visible in the operator-facing manifest with a hint to enable them. - Path-policy gating goes through
PathPolicy. Every path-taking method onObsidianServicecallspolicy.assertReadable/assertWritablebefore the upstream HTTP call;listFilesgates withassertListableand filters entries withfilterListing(readable entries plus folders on the way to the scope), so every listing consumer inherits the scope;obsidian_search_notesfilters hits viasvc.policy.filterReadable.OBSIDIAN_DENY_PATHSwins over every allow rule, and setting it turns onrestrictsReads, so a deny list alone routes listings, tag counts, and JSONLogic through the scoped paths. Underpolicy.restrictsReads,searchJsonLogicnever sends the caller's tree upstream: one/search/guarded byreadScopePatternfetches the readable notes' contexts (plus, when the tree namescontent, oneGET /vault/{path}per readable note through the service-wide#bodyReadspacer, at mostBODY_READ_CONCURRENCY(32) in flight, evaluated in batches of at most 32 MiB),filterReadablegates them, and the note contexts carry nolinks/backlinks/unresolvedLinks(a tree whose fixedvar,missing, ormissing_somekey names one failslink_fields_unavailablebefore any request; a computed key readsnull).createJsonLogicEvaluationruns the tree on a worker thread with the plugin's operators, bounded by depth, a per-note build budget, a per-search kept-result budget, a 10 s evaluation deadline, andSCOPED_SEARCH_DEADLINE_MS(45 s) over the whole search (logic_too_costly; a note too deep to hand to the worker isnote_too_deep), so no hit, result, or error reads a note outside the scope. Text mode underrestrictsReadsnever calls/search/simple/: one guarded/search/names the readable candidates, oneGETper candidate body, andSimpleSearch(simple-search.ts, a port of Obsidian'sprepareSimpleSearch) builds the hits and windows under the same 45 s deadline (text_search_too_costly;context_length_too_largecounts the response the plugin would send for the readable matches alone, every match's offsets and framing with its window, against V8's longest string). A scoped walk evaluates once:pageTextandpageJsonLogicstore the hit list a first page computed in one store (5 min past the last read,WALK_STORE_CHARS(32 Mi characters) across walks, least recently read evicted first), and the walk id ridesnextCursor; a text entry is keyed byquery,contextLength, andmaxMatchesPerHit(never the scope, fixed per process, norpathPrefix, applied per page) and holds copied windows, since a window sliced from a note body keeps the whole body alive. UnderrestrictsReadstheomnisearchmode is withheld (omnisearchAvailability): absent from themodeenum, the description, andinstructions, and nothing reaches the Omnisearch URL, the startup probe included, since Omnisearch ranks and selects its results over the whole vault.listTagsreads per-note tags from the same readable contexts, with no evaluation. Anactive/periodictarget is gated on the path it resolves to, under the target's label:resolveTarget/pinTargetreturn aPathTargetwhoseresolvedFromthe asserts take, so a denial names(active file)ordaily note for 2026-10-01, never a path the caller did not send, and a tool that reads a target then writes it writes to that pinned path rather than resolving the target again. Don't bypass this —OBSIDIAN_READ_PATHS/OBSIDIAN_WRITE_PATHS/OBSIDIAN_DENY_PATHS/OBSIDIAN_READ_ONLYare the single chokepoint, andpath_forbiddenis declared on every path-taking tool'serrors[]contract. Adenied_pathdenial carries noactiveScope, and no agent-facing surface (error data,instructions) names a deny prefix; only the startup log lists them. - Close the loop on issues. When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 22d ago Changed · +2 lines · +606 tokens per session 1f1a30d0fa6e
- 1mo ago Changed · +3 lines · +356 tokens per session 2bad90fc5eca
- 1mo ago Changed · +12 lines · +680 tokens per session 172f55f96fac
- 1mo ago Changed · +8 lines · +494 tokens per session fad6f114e2cc
- 1mo ago Changed · +10 lines · +779 tokens per session a2612afe796c
- 1mo ago Changed · +3 lines · +487 tokens per session 70fafee22348
- 2mo ago Changed · +2 lines · +59 tokens per session 5baed97d2217
- 2mo ago Changed · +4 lines · +163 tokens per session 530b844b3694
- 2mo ago Changed · +37 lines · +730 tokens per session 474226c9efc6
- 2mo ago First seen · 421 lines · 7,254 tokens per session scan A 3d125b057f73
obsidian-mcp-server AGENTS.md is an instructions file published in the GitHub repository cyanheads/obsidian-mcp-server (722 stars, last pushed 23d ago), licensed Apache-2.0. It adds 11,608 tokens to every session, about $0.0464 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
obsidian-mcp-server AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| obsidian-mcp-server AGENTS.mdcyanheads/obsidian-mcp-server | Instructions file | 722 | 23d ago | Apache-2.0 | A | 11,608 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 9,887 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 144k | today | MIT | A | 7,230 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 150k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 3,303 | GitHub Copilot |
| deno copilot-instructions.mddenoland/deno | Instructions file | 109k | today | MIT | A | 3,077 | GitHub Copilot |