obsidian-mcp-context
Provides tools for listing notes, searching blocks, listing tasks, and fetching note context from an Obsidian vault, allowing AI agents to interact with Obsidian notes programmatically.
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-contextList my unchecked tasks related to renewal."
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-context
Turn textual Obsidian vault notes into AI-ready context exposed through MCP.
This project does not run an AI model itself. It parses an Obsidian vault and exposes structured context to an MCP-aware AI client. The AI client provides the model; this server provides the vault tools.
Features
Obsidian Markdown files (
.md) by default.Optional plain
.txtparsing as generic text blocks only.Synthetic demo vault under
examples/synthetic-vault.Deterministic parsing of headings, heading paths, blocks, tasks, wikilinks, tags, and semantic lines.
File, block, heading, and line-level provenance.
CLI and MCP tools for listing notes, searching blocks, listing tasks, and fetching note context.
Related MCP server: Obsidian MCP Server
How The Pipeline Works
The intended workflow is:
You have an Obsidian vault on disk.
You install this package locally.
You run the MCP server from this repo.
Your MCP client connects to that server.
The AI client calls tools such as
search_vault_blocksandlist_vault_tasks.Each tool call includes a
vault_path, so the server knows which vault to parse.The server returns structured JSON with source paths, headings, line numbers, blocks, links, tags, and tasks.
The AI client uses that returned context to answer questions or help you work with the vault.
The model can be OpenAI, Anthropic, a local model, or anything else supported by your MCP client. This repo does not currently ask for an API key, configure a model, create embeddings, or talk to a local LLM directly.
Install For Local Development
Clone the repo and install it into a virtual environment:
git clone https://github.com/gavinsomers/obsidian-mcp-context.git
cd obsidian-mcp-context
python3 -m venv .venv
.venv/bin/python -m pip install -e ".[dev]"After installation, the local commands are available at:
.venv/bin/obsidian-mcp-context
.venv/bin/obsidian-mcp-context-mcpTry The Synthetic Vault
The repo includes a small synthetic Obsidian vault at
examples/synthetic-vault. Use it first to confirm the parser works before
pointing the tools at your own notes.
List notes:
.venv/bin/obsidian-mcp-context --vault examples/synthetic-vault notesSearch parsed blocks:
.venv/bin/obsidian-mcp-context --vault examples/synthetic-vault blocks --text renewalList unchecked tasks:
.venv/bin/obsidian-mcp-context --vault examples/synthetic-vault tasks --uncheckedThe output is JSON. It is intentionally verbose enough for an AI client to cite where each piece of context came from.
Use Your Own Obsidian Vault
Find the absolute path to your vault. For example:
/Users/gavin/Documents/Obsidian/Main Vaultor:
/home/gavman/notes/main-vaultThen run the same CLI commands with your vault path:
.venv/bin/obsidian-mcp-context --vault "/absolute/path/to/your/vault" notes
.venv/bin/obsidian-mcp-context --vault "/absolute/path/to/your/vault" blocks --text "renewal"
.venv/bin/obsidian-mcp-context --vault "/absolute/path/to/your/vault" tasks --uncheckedMCP Server
Start the MCP server manually with:
.venv/bin/obsidian-mcp-context-mcpAvailable tools:
list_vault_notessearch_vault_blockslist_vault_tasksget_vault_note_context
Each MCP tool accepts a vault_path argument. That means you do not hard-code a
single vault into the server. Your client asks the tool to operate on a specific
vault path.
Configure An MCP Client
Add this server to your MCP client configuration. Use absolute paths for both
command and cwd.
{
"command": "/absolute/path/to/obsidian-mcp-context/.venv/bin/obsidian-mcp-context-mcp",
"args": [],
"cwd": "/absolute/path/to/obsidian-mcp-context"
}For this repo checked out at /home/gavman/code/obsidian-mcp-context, the
configuration would be:
{
"command": "/home/gavman/code/obsidian-mcp-context/.venv/bin/obsidian-mcp-context-mcp",
"args": [],
"cwd": "/home/gavman/code/obsidian-mcp-context"
}Once the client is connected, ask it to use the tools with your vault path. For example:
Use the Obsidian MCP context tools with vault_path "/home/gavman/notes/main-vault".
List my unchecked tasks related to renewal.or:
Use vault_path "/home/gavman/notes/main-vault".
Search my vault for blocks about Project Atlas and return the source note and line numbers.Tool Inputs
list_vault_notes
vault_path: path to the Obsidian vault.limit: maximum notes to return. Defaults to100.
search_vault_blocks
vault_path: path to the Obsidian vault.text: optional case-insensitive search text.source_path: optional filter for vault-relative source paths.heading: optional filter for heading paths.limit: maximum blocks to return. Defaults to25.
list_vault_tasks
vault_path: path to the Obsidian vault.checked: optional completion filter. Usefalsefor open tasks.text: optional case-insensitive search text.source_path: optional filter for vault-relative source paths.limit: maximum tasks to return. Defaults to50.
get_vault_note_context
vault_path: path to the Obsidian vault.source_path: vault-relative note path, such asProjects/Atlas.md.
Current AI Boundary
This repo is deliberately model-agnostic right now.
It does:
Parse local Markdown notes.
Preserve provenance.
Return structured context through CLI and MCP tools.
Let an MCP client decide how to use that context.
It does not:
Ask for an OpenAI API key.
Ask for an Anthropic API key.
Connect to Ollama or another local model.
Generate embeddings.
Store vectors.
Chat with your notes by itself.
If you want OpenAI, Anthropic, or local LLM support, configure that in your MCP client. The client supplies the model; this package supplies the Obsidian vault context.
Development
.venv/bin/python -m pytestMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/gavinsomers/obsidian-mcp-context'
If you have feedback or need assistance with the MCP directory API, please join our Discord server