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.09472 | $0.09472 |
| Opus 5.5 | $0.03789 | $0.03789 |
| Sonnet 5.5 | $0.01894 | $0.01894 |
| Haiku 4.5 | $0.00947 | $0.00947 |
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 12d 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, 138 lines differ
- obsidian-mcp-server CLAUDE.md — 100% identical, 0 lines differ
- obsidian-mcp-server AGENTS.md — 100% identical, 138 lines differ
- exchange-rates-mcp-server AGENTS.md — 86% identical, 367 lines differ
- exchange-rates-mcp-server CLAUDE.md — 86% identical, 367 lines differ
- coingecko-mcp-server AGENTS.md — 84% identical, 379 lines differ
- coingecko-mcp-server CLAUDE.md — 84% identical, 379 lines differ
- smithsonian-mcp-server AGENTS.md — 84% identical, 349 lines differ
How it starts
The opening of the file, as written. The whole thing — 477 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.7.0
Framework: @cyanheads/mcp-ts-core ^0.13.12
Engines: Bun ≥1.4.0, Node ≥24.0.0
MCP SDK: @modelcontextprotocol/server ^2.2.0
Zod: ^4.6.5
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_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_notespost-filters hits viasvc.policy.filterReadable, andlistTagscollects per-note tags through it whenpolicy.restrictsReads. Don't bypass this —OBSIDIAN_READ_PATHS/OBSIDIAN_WRITE_PATHS/OBSIDIAN_READ_ONLYare the single chokepoint, andpath_forbiddenis declared on every path-taking tool'serrors[]contract. - 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.
- 12d ago Changed · +10 lines · +779 tokens per session a2612afe796c
- 13d ago Changed · +3 lines · +487 tokens per session 70fafee22348
- 25d ago Changed · +2 lines · +59 tokens per session 5baed97d2217
- 26d ago Changed · +4 lines · +163 tokens per session 530b844b3694
- 29d ago Changed · +37 lines · +730 tokens per session 474226c9efc6
- 1mo ago Changed · +1 lines · +451 tokens per session 3d125b057f73
- 1mo ago Changed · +1 lines · +78 tokens per session ab106ffa4434
- 1mo ago Changed edd007148091
- 1mo ago First seen · 419 lines · 6,725 tokens per session scan A c702851e6bc6
obsidian-mcp-server AGENTS.md is an instructions file published in the GitHub repository cyanheads/obsidian-mcp-server (697 stars, last pushed 13d ago), licensed Apache-2.0. It adds 9,472 tokens to every session, about $0.0379 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.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.