obsidian-mcp-server
Provides access to an Obsidian vault for note search, retrieval, and structured summaries, and allows creating flashcards and study plans that integrate with the Decks and Lerntracker plugins.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@obsidian-mcp-serverSearch my notes for signal processing and create flashcards from the results."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
obsidian-mcp-server
An MCP server (Model Context Protocol) for an Obsidian study vault. Gives Claude access to note search, note contents, flashcard creation in the Decks format, and the study planning of the study tracker plugin.
Python, MCP SDK 2.x, stdio transport.
Purpose
So far, the logic lived in two Obsidian plugins:
Decks (third-party plugin) renders flashcards but doesn't create them — the cards were written by hand.
Lerntracker (own plugin) manages study progress and study plan, but deliberately doesn't distribute the material across days automatically.
This server closes both gaps: Claude can create cards directly in the existing
file format and calculate a study plan that is written back into the
Lerntracker's data.json.
Related MCP server: Nexus MCP for Obsidian
Installation
cd ~/Projects/obsidian-mcp-server
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtConfiguration
Both paths come from environment variables — nothing is hardcoded.
Variable | Default | Meaning |
|
| Root of the vault |
|
| Lerntracker database |
The default for the vault path fits an iCloud-synchronized Obsidian;
for a different setup, setting OBSIDIAN_VAULT_PATH is enough.
The Lerntracker path is separately configurable because Obsidian vaults can be
nested: if another vault sits in a subfolder, it has its own
data.json. The default points to the main vault's.
Tools
Tool | Effect |
| Searches case-insensitively in filenames and contents. Name hits are ranked higher; returns path + text passages. Read-only |
| Returns the full content of a note. Read-only |
| Writes. Appends a card to |
| Prepares a note in structured form. Read-only |
| Writes. Creates |
| Writes. Distributes open subtopics across days and enters them into |
All schemas are generated by the SDK from type hints and docstrings — there is no hand-written JSON schema in the code.
Flashcard format
create_flashcard writes exactly the format that the existing cards in the
vault use (header paragraph), extended with a wikilink to the source:
---
tags: [decks]
---
## Was ist ein Signal?
Eine zeitabhängige, messbare physikalische Größe.
Quelle: [[01_Physikalische_Schicht]]The target file results from the course folder of the source note; deck
overrides the filename. If the file doesn't exist, it is created with
tags: [decks]. A card with an identical front is skipped instead of being
created twice.
The study state of Decks lives in a SQLite database, not in the Markdown files. The server doesn't touch it — the FSRS history stays untouched.
Why generate_summary doesn't summarize itself
The server has no language model. It returns the note in structured form
(outline, key figures, full text); the summary is written by the model on the
client side — i.e., Claude Desktop. It is then saved with
save_summary. That's the usual MCP division of roles: the server delivers
context and runs actions, the model formulates.
If the server were to summarize itself instead, it would need to call the Anthropic API and would need its own API key.
Study plan logic
generate_study_plan distributes each open subtopic to concrete days:
Courses are sorted by exam date — the earliest exam first.
Study end =
examDate − bufferDays; the buffer days stay free for review.Study days come from
settings.weeklyHours(0 = Sunday … 6 = Saturday). Days with0hours and allblockedDatesare skipped.Each subtopic costs
hours_per_subtopic(default 1.5 h) and is placed on the earliest day with remaining capacity. If it doesn't fit into one day, it is split across multiple days — the plugin supports multipledates.Already checked-off subtopics and those with existing
datesremain untouched.Anything that no longer fits before the study end is reported as a warning instead of being silently discarded.
Before each write operation, a backup is created next to the file
(data.backup-<Zeitstempel>.json); writing is atomic via a temporary file.
dry_run=True only shows the plan.
After writing in Obsidian, press Cmd+R so the plugin reloads.
Resources
URI | Content |
| Folder tree of the vault with note count per folder |
| Content of a single note, read-only |
The template deliberately uses {+path} (reserved expansion) instead of {path}.
Normal template variables don't match slashes — with {path}, any note in a
subfolder would silently not be found, and in the vault practically every note
sits in a course folder.
Testing locally with the MCP Inspector
The Inspector is started via the SDK's CLI and opens a web interface,
in which tools and resources can be called individually. It needs npx
(Node.js) and uv.
source .venv/bin/activate && mcp dev main.pyThe command outputs a URL like http://localhost:6274 (with an appended
session token). Open it in the browser, click Connect on the left, then:
Tab Tools → List Tools → pick a tool, enter arguments, Run Tool
Tab Resources → List Resources → click
vault://structureFor the templated resource, enter the URI directly, following the pattern
note://<Kursordner>/Flashcards/<Datei>.md
With a different vault:
OBSIDIAN_VAULT_PATH="$HOME/Pfad/zu/deinem/Vault" mcp dev main.pyFor trying out the writing tools, a throwaway vault is worth it:
OBSIDIAN_VAULT_PATH=/tmp/testvault mcp dev main.pyConnecting to Claude Desktop
Configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"obsidian-vault": {
"command": "/Users/DEIN_NAME/Projects/obsidian-mcp-server/.venv/bin/python",
"args": ["/Users/DEIN_NAME/Projects/obsidian-mcp-server/main.py"],
"env": {
"OBSIDIAN_VAULT_PATH": "/Users/DEIN_NAME/Pfad/zu/deinem/Vault"
}
}
}
}Important: use absolute paths — ~ and $HOME are not
expanded here. As command specify the Python from the venv: Claude Desktop
starts the server without an activated environment, a bare "python3" would not
find the mcp package.
If the file already exists, only insert the "obsidian-vault" entry into the
existing mcpServers object. Then fully quit and restart Claude Desktop; the
server then appears in the tool menu of the input field.
Security
Every path from a tool or resource call is checked against the vault:
absolute paths and .. traversal are rejected, and the resolved target must
lie within OBSIDIAN_VAULT_PATH. .obsidian, .git, .trash,
.claude and node_modules are excluded from search and structure
listing — plugin bundles would otherwise flood the results.
save_summary doesn't overwrite an existing file, create_flashcard doesn't
create a duplicate card, and generate_study_plan backs up data.json before
writing.
Tested
Against mcp 2.0.0 on Python 3.14: tool schemas, resource templates,
stdio handshake with a real ClientSession, path guards, and the
writing tools against a throwaway vault (including multi-day split,
blocked days, zero-hour weekdays, and the overflow case).
License
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables interaction with Obsidian vaults through MCP, supporting note creation from templates, link management, backlink analysis, tag operations, and automatic Map of Contents generation.112,4721MIT
- AlicenseNot gradedqualityAmaintenanceTurns your Obsidian vault into an MCP-enabled workspace with tools for reading/writing notes, managing folders, running semantic searches, and maintaining long-term memory—all while keeping data local to your vault.173,522150MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search, read, and append content to notes in an Obsidian vault via the MCP protocol.2,472BSD Zero Clause
- AlicenseBqualityBmaintenanceBridges Obsidian vaults with MCP-compatible AI tools, enabling read/write/search of notes, task management, and vault operations through 34 tools and prompt templates.34571MIT
Related MCP Connectors
Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.
Search your Obsidian vault to quickly find notes by title or keyword, summarize related content, a…
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MzaKhn/obsidian-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server