obsidian-mcp-server AGENTS.md

obsidian-mcp-server AGENTS.md is an instructions file for Codex, OpenCode from Vasallo94/obsidian-mcp-server. It costs 2,447 tokens per session, scanned A, original, MIT.

Repository instructions for developing and testing an Obsidian MCP server, a program that lets an AI tool interact with Obsidian notes. They specify using uv, a Python project and package manager, instead of pip.

In plain words
What is it for?
Use them to install dependencies, run the server, execute tests, check code quality, format files, and run pre-commit checks.
Why use it?
They provide the project's approved commands and prevent inconsistent dependency installation, testing, linting, or formatting.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/vasallo94/obsidian-mcp-server/agents-md
Clone the repo
git clone --depth 1 https://github.com/Vasallo94/obsidian-mcp-server

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for obsidian-mcp-server AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/vasallo94/obsidian-mcp-server/agents-md.svg)](https://agentmods.dev/instructions/vasallo94/obsidian-mcp-server/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/vasallo94/obsidian-mcp-server/agents-md"><img src="https://agentmods.dev/badge/instructions/vasallo94/obsidian-mcp-server/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,447 This file is loaded in full into every session.
When invoked 2,447 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.02447 $0.02447
Opus 5 $0.01223 $0.01223
Sonnet 5 $0.00489 $0.00489
Haiku 4.5 $0.00245 $0.00245

Measured 5d ago against content hash a284ac20b894, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 5d 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.

AGENTS.md · 221 lines

How it starts

The opening of the file, as written. The whole thing — 221 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Context file for AI coding agents working on this repository.

Essential Commands

# Install dependencies (ALWAYS uv, NEVER pip)
make install          # uv sync

# Run MCP server locally
make dev              # uv run obsidian-mcp-server

# Testing
make test             # uv run pytest tests/
make coverage         # uv run pytest --cov=obsidian_mcp --cov-report=term-missing tests/

# Linting & formatting
make lint             # uv run ruff check . && uv run pyright .
make format           # uv run ruff check --fix . && uv run ruff format .

# Pre-commit hooks (ruff, pyright, pylint, bandit + general checks)
make hooks            # uv run pre-commit install
make check            # uv run pre-commit run --all-files

Package Management — CRITICAL

  • ONLY use uv, NEVER pip or uv pip install
  • Add dependencies: uv add package
  • Add dev dependencies: uv add --dev package
  • Add optional RAG deps: uv sync --extra rag
  • Run tools: uv run tool
  • FORBIDDEN: pip install, uv pip install, @latest syntax

Testing

  • Framework: pytest with anyio for async tests (NOT asyncio)
  • Single test: uv run pytest tests/test_basic.py::TestClassName::test_name -v
  • Coverage: uv run pytest tests/ --cov=obsidian_mcp
  • CI minimum coverage: 25%
  • All async tests must use anyio fixtures, not asyncio

Architecture

Core Concept

MCP (Model Context Protocol) server built with FastMCP that exposes Obsidian vault operations as tools, resources, and prompts. Acts as a bridge between AI assistants (Claude Desktop, Cursor, Claude Code, Cline, etc.) and a user's Obsidian knowledge base.

Key Principles

  1. Vault-Agnostic: Auto-detects vault structure. User config lives in {vault}/.agents/vault.yaml, not here.
  2. Skills System: AI personas loaded from the user's vault at {vault}/.agents/skills/. Each skill has SKILL.md with YAML frontmatter.
  3. Separation of Concerns: Tool registration (tools/*.py) → Business logic (tools/*_logic.py) → Utilities (utils/*.py).
  4. Security Model: Path validation via .forbidden_paths and vault config. All file ops go through utils/security.py.
  5. Optional RAG: Semantic search requires extra deps (uv sync --extra rag). ChromaDB-based vector indexing in semantic/.

Read the full file on GitHub · 221 lines

Changes

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.

  1. 5d ago First seen · 221 lines · 2,447 tokens per session scan A a284ac20b894

Subscribe to this mod's changes

obsidian-mcp-server AGENTS.md is an instructions file published in the GitHub repository Vasallo94/obsidian-mcp-server (9 stars, last pushed 3d ago), licensed MIT. It adds 2,447 tokens to every session, about $0.0122 per session on Opus 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-31.