Connecting Claude and Obsidian: Two Integration Paths for a Reusable Writing Workflow
This guide details two ways to integrate Claude with Obsidian—direct MCP connection (about 30 minutes to set up) and a Karpathy‑inspired LLM Wiki workflow (raw→wiki→drafts)—including full configuration steps, a CLAUDE.md template, three core commands, and tips for turning raw notes into structured, publishable drafts.
Overview
The article explains two common integration approaches for using Claude with Obsidian: (1) a direct connection via the Claude desktop client and the MCP plugin, and (2) a repository‑based workflow that follows Karpathy’s LLM Wiki pattern using Claude Code. Both methods enable a closed loop of raw/ → wiki/ → drafts/ for material ingestion, structuring, and writing.
Intended Audience
Technical writers, solo creators, and developers who already use Obsidian as a knowledge base and want Claude to help with retrieval, organization, and drafting.
Difficulty Assessment
The overall difficulty is moderate. Method A (MCP) is generally easier and can be completed within 30 minutes for users comfortable with Obsidian plugins and basic configuration. Method B (LLM Wiki) involves more steps, command‑line work, and optional scripting for image generation, so it may take around two hours.
Comparison of the Two Approaches
Method A – API Integration (MCP)
Tools: Claude desktop client + Local REST API + MCP plugin.
Benefit: Search, create, and insert notes directly from a chat conversation with minimal code.
Trade‑off: Relies on the MCP plugin and operates per‑conversation; less suited for large‑scale, version‑controlled writing.
Method B – Repository Integration (LLM Wiki)
Tools: Claude Code, a structured folder layout ( raw/, wiki/, drafts/), and optional scripts for screenshots.
Benefit: Turns raw material into version‑controlled, structured notes and drafts, ideal for long‑form content and collaborative editing.
Trade‑off: Requires familiarity with the command line, folder conventions, and optional scripting for image handling.
Method A – Step‑by‑Step (MCP)
Install and enable the Local REST API plugin in Obsidian.
Generate or copy an API key in the plugin settings and store it securely.
Locate the Claude desktop configuration file (e.g.,
~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS) and edit it according to the official MCP documentation, adding the mcp‑obsidian entry and the API key.
Fully quit and restart the Claude desktop client.
Note: What MCP can do depends on the specific server implementation and plugin permissions; do not connect confidential notes to untrusted endpoints.
Method B – LLM Wiki Workflow
Prerequisites
Claude Code installed and usable.
A chosen vault root ( VAULT_ROOT), which can be the whole vault or a subfolder such as PKM/.
Optional: Git management of VAULT_ROOT for diffing changes.
Step 1 – Create the Fixed Directory Structure
cd "/your/Obsidian/vault/path" # replace with VAULT_ROOT
mkdir -p raw wiki/sample-topic drafts assets templates
touch index.md log.md CLAUDE.mdThe resulting layout should look like:
VAULT_ROOT/
├── CLAUDE.md # project rules for Claude Code
├── index.md # global index
├── log.md # operation log
├── raw/ # read‑only raw material
├── wiki/
│ └── sample-topic/ # example topic (delete after testing)
├── drafts/ # generated article drafts
├── assets/ # optional PNG images
└── templates/ # optional HTML card templatesStep 2 – Add a Raw Material File
Create a markdown file in raw/ (e.g., raw/2026-04-11-example-inbox.md) with front‑matter and content:
---
source: "example clip"
date: 2026-04-11
---
## Original excerpt
LLM Wiki idea: raw holds raw material, wiki holds structured notes; use index as entry and log to record each transformation.
## My thoughts
I want to connect Obsidian + Claude Code so that article writing pulls from my wiki.Step 3 – Write the CLAUDE.md Command Template
Save the following block as VAULT_ROOT/CLAUDE.md (modify titles as needed):
# Obsidian × Claude Code · LLM Wiki Workspace
## Global Constraints
- **raw/**: read‑only unless the user explicitly allows modification.
- **pages/**: writable; subfolders for entities, concepts, sources, synthesis.
- **drafts/**: writable; used for generated article drafts.
- **index.md**: update after each wiki change.
- **log.md**: append an entry after each "add to wiki" operation.
## Commands
### Command 1: "add to wiki"
1. If a specific file in <code>raw/</code> is mentioned, process that file; otherwise process the most recently modified markdown file.
2. Extract title, key points, terms, verification items, and source info.
3. Create or update notes under <code>pages/</code> (entities, concepts, sources, synthesis).
4. Update <code>index.md</code>.
5. Append a record to <code>log.md</code>.
### Command 2: "write article from these notes"
1. Read <code>index.md</code> then the relevant <code>pages/</code> files (or the top 1‑3 most relevant).
2. Generate a markdown draft in <code>drafts/</code> with title, abstract, sections, and a list of referenced wiki paths.
3. **Do not fabricate** facts that do not exist in <code>raw/</code> or <code>wiki/</code>; mark missing information as "to be added".
### Command 3: "add images" (optional)
1. If <code>scripts/screenshot-card.mjs</code> is missing, generate a sample HTML card in <code>templates/</code> and explain that Playwright or manual screenshots are needed.
2. If the script exists, invoke it as documented.
### Command 4: "lint wiki"
1. Scan all files under <code>pages/</code>.
2. Check for orphan pages, contradictions, outdated info, missing pages, and wikilink format.
3. Output a report and update <code>log.md</code>.Step 4 – Run the First "Add to Wiki" Command
Navigate to VAULT_ROOT in a terminal.
Start Claude Code and ensure it can read CLAUDE.md.
Paste the following prompt into the Claude chat:
Please read the project root CLAUDE.md and execute the command "add to wiki" on raw/2026-04-11-example-inbox.md.Verification: Open wiki/ and confirm that at least one new structured note appears (e.g., wiki/pkm/llm-wiki-workflow.md) and that index.md and log.md have been updated.
Step 5 – Generate an Article Draft
After the wiki contains content, paste the following prompt (adjust paths as needed):
Please execute the command "write article from these notes".
Genre: technical newsletter (≈1500 words).
Reference: index.md and wiki/pkm/llm-wiki-workflow.md.
Output to drafts/ with a date‑prefixed filename, e.g., drafts/2026-04-11-llm-wiki-intro.md.Verification: The draft should end with a "reference wiki path" section, and any uncertain statements must be marked "to be added" rather than fabricated.
Recommended Combined Workflow
Daily clipping or meeting notes → raw/ (read‑only).
Use Method A (MCP) for quick retrieval and insertion.
Periodically run Method B’s "add to wiki" to structure the material.
Maintain index.md and log.md for traceability.
When ready, run "write article from these notes" to produce a draft in drafts/.
Manually verify facts, add images, and publish.
Key Precautions
raw/ is read‑only by default – prevent the agent from unintentionally modifying source material.
Never fabricate facts – missing information should be flagged for later addition.
Copyright & privacy – ensure any third‑party content uploaded to the model is reviewed for compliance.
Tool changes – follow official plugin and MCP documentation for any updates.
Deliverables
Method A: Claude desktop can search, create, and insert Obsidian notes directly.
Method B: A raw/ → wiki/ → drafts/ pipeline with full directory structure. CLAUDE.md: three core commands (add to wiki, write article, add images). index.md + log.md: searchable index and operation log.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Frontend AI Walk
Looking for a one‑stop platform that deeply merges frontend development with AI? This community focuses on intelligent frontend tech, offering cutting‑edge insights, practical implementation experience, toolchain innovations, and rich content to help developers quickly break through in the AI‑driven frontend era.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
