← Reddit

How can I make Claude Code automatically write to Obsidian

Reddit · naijah24 · April 7, 2026
A user seeks to automate bidirectional synchronization between Claude Code and Obsidian so the vault updates automatically during coding sessions. Currently the relationship is one-way, with Claude Code reading from Obsidian but requiring manual writes back to the vault. The user asks whether existing tools or hooks provide this automation or if a simpler approach exists.

Detailed Analysis

A Reddit user's question on r/ClaudeAI highlights a growing interest in bidirectional integration between Claude Code — Anthropic's AI-powered coding assistant — and Obsidian, the popular local-first Markdown note-taking application. The user correctly identifies a key limitation in their current setup: using the `modelcontextprotocol/server-filesystem` with an Obsidian vault as the target directory enables Claude Code to read from the vault, but does not automatically trigger writes back to it as sessions progress. The post reflects a broader desire among power users to move beyond passive context retrieval and toward an active, synchronized knowledge loop where Claude Code both consumes and contributes to a living vault in real time.

The most direct solution to this problem involves replacing the generic filesystem MCP server with a dedicated Obsidian MCP plugin, which exposes the vault over a local SSE (Server-Sent Events) endpoint — typically at `http://localhost:27123/sse`. Once the plugin is installed within Obsidian, Claude Code can be pointed to it with a single terminal command (`claude mcp add obsidian-vault --transport sse http://localhost:27123/sse`), granting it native read and write access. This approach is architecturally cleaner than a raw filesystem mount because the Obsidian-aware plugin understands vault structure, internal links, and Markdown conventions, allowing Claude Code to manipulate notes in contextually appropriate ways rather than treating them as opaque text files. An optional "Claude Sidebar" plugin for Obsidian further tightens the loop by embedding Claude Code directly in the application interface, eliminating context-switching entirely.

Achieving true automation — where Claude Code updates the vault continuously without explicit user prompting — requires a layer beyond simple MCP connectivity. Claude Code's hooks system, combined with custom "skills" or shell scripts, can be configured to trigger vault writes on session events such as task completion, file saves, or time intervals. Practical examples include auto-generating backlinks across notes, creating session summaries saved as new Markdown files, tagging notes by topic, or building structured project plans derived from active work. Pairing these automations with Obsidian's Git plugin adds an auditable, version-controlled record of every AI-generated change, which is critical for users who want to review or roll back Claude's contributions to their knowledge base.

This integration pattern sits at the intersection of two significant trends in AI tooling: the rise of the Model Context Protocol as a standardized interface for giving language models structured, persistent access to external data sources, and the growing adoption of personal knowledge management systems as "second brains" that AI agents can read, reason over, and actively maintain. Obsidian's plain-Markdown, local-file architecture makes it unusually well-suited to this role — its vault is essentially a codebase of human knowledge, and Claude Code was purpose-built to navigate, synthesize, and edit exactly that kind of file structure. The combination effectively transforms a static note collection into a dynamic, self-updating knowledge graph that reflects both the user's intentions and the AI's ongoing synthesis.

The broader implication is that the distinction between a "notes app" and an "AI memory system" is rapidly collapsing. As Anthropic continues developing Claude Code's agentic capabilities — including long-horizon task execution and persistent context — workflows like this will become less of a technical curiosity and more of a standard productivity pattern for developers, researchers, and knowledge workers. The user's instinct to seek synchronization rather than one-way retrieval anticipates a near-term norm in which AI assistants do not merely reference personal knowledge bases but continuously contribute to them, making the human-AI knowledge loop genuinely reciprocal.

Read original article →