Project index

Developer

obsidian_MCP

An MCP server for searching Obsidian notes, retrieving project context and maintaining persistent memory, with controlled write access.

TypeScriptNode.jsExpressMCP SDKZodMarkdownDockerVitest

Problem

AI clients need relevant project notes and decisions without repeatedly loading an entire vault or managing files through unrestricted direct access.

Persistent knowledge also needs clear boundaries between reading context, changing notes and maintaining shared memory.

Approach

Provide a shared MCP entry point with focused tools for search, project discovery, context retrieval and guarded updates.

Keep transport, application services, indexing, memory and filesystem safety as separate responsibilities.

Implementation

Indexed project context

  • Built project maps, ranked context bundles, note search and targeted section reads.
  • Kept the note index current with a filesystem watcher and bounded retrieval responses.

Controlled note updates

  • Checked paths against the vault boundary and denied hidden or restricted locations.
  • Applied a server-side write switch and supported content hashes and dry-run previews when editing existing notes.

Shared tools and memory

  • Exposed note and persistent-memory operations through MCP for multiple AI clients.
  • Separated tool adapters from TypeScript services so retrieval and mutation rules can be tested independently.
Implementation highlights
  • Implemented tools for note search, project maps, scoped context bundles and persistent memory.
  • Maintained an in-memory note index with a file watcher instead of scanning the vault for every query.
  • Separated MCP transport adapters from application services and filesystem access.
  • Added vault path restrictions, a write switch, content hashes and dry-run previews for controlled updates.

Result

Built a reusable service for retrieving project context and managing notes through explicit operations. The source repository is private.

Back to all projects