obsidian-mcp-context
The obsidian-mcp-context server parses Obsidian Markdown vaults and exposes structured, AI-ready context through MCP tools — without running any AI model itself. Every tool accepts a vault_path argument (no hard-coded vault), results include full provenance (source file, heading path, line numbers), and tools fall back to an in-memory warehouse if no dbt-built DuckDB file is available.
Core Vault Tools
list_vault_notes: Retrieve a list of Markdown notes in the vault.search_vault_blocks: Search parsed note blocks by text, heading path, or source path.list_vault_tasks: List tasks with completion state, filterable by text, source path, or checked/unchecked status.get_vault_note_context: Fetch all parsed context (headings, blocks, tasks, links, tags) for a specific note.
Warehouse & Entity Tools (requires DuckDB/dbt)
get_vault_warehouse_summary: Summarize warehouse dimensions, facts, and marts (row counts, table availability).list_vault_entities: List modeled entities (people, projects, companies, etc.) derived from notes, wikilinks, and tags.list_vault_entity_types: List observed entity types from the dbt registry.get_vault_entity_timeline: Return chronological timeline rows connected to a named entity.get_vault_entity_context: Return dbt mart-backed context for any typed entity.list_vault_entity_events: List generic events attached to entities, filterable by type.list_vault_entity_relationships: List relationships between modeled entities, filterable by kind.list_vault_entity_states: List state rows for stateful entities (risks, decisions), filterable by status.list_vault_entity_open_loops: List open/unresolved loops attached to any modeled entity.
Agent & Mart-Backed Tools
search_vault_agent_context: Search curated deterministic context rows optimized for agent use.get_vault_project_context: Full dbt mart-backed project context (decisions, risks, open loops).get_vault_person_context: Full dbt mart-backed person context (decisions, risks, open loops).list_vault_open_loops: List all open loops from unchecked tasks across the vault.list_vault_decisions: List tracked decisions with optional entity and status filters.list_vault_risks: List tracked risks with optional entity and status filters.
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 "Deploy 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-context List 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 generated Obsidian-style vault notes into AI-ready context exposed through MCP, backed by Postgres and dbt marts.
This project uses generated/synthetic vault fixtures only. Do not use Gavin's personal Obsidian vault for this workflow.
Architecture
The supported main-repo workflow is:
completed generated Obsidian vault
-> container-mounted vault at /vault
-> Postgres raw landing tables
-> dbt Postgres marts
-> MCP consumersThe generator repository owns dataset creation and D3 growth visualization. This repository owns the deterministic batch ingest, dbt transformation, inspection surfaces, and MCP serving after a completed vault is handed over manually.
Postgres is the canonical warehouse. DuckDB is not part of the supported project workflow.
Related MCP server: obsidian-mcp
Features
Generated realistic demo vaults under
examples/generated-vaults(small,medium, andlarge).Deterministic parsing of headings, blocks, tasks, wikilinks, tags, semantic lines, and frontmatter.
Postgres/dbt marts for entities, relationships, states, events, timelines, decisions, risks, and open loops.
MCP tools for mart-backed context retrieval and direct parser diagnostics.
Containerized Postgres, dbt, dbt Docs, table browser, and MCP services.
Privacy posture that keeps personal vaults out of the project workflow.
Quickstart
The primary demo is a two-act flow: generate and visualize the dataset in the generator repo with D3, then manually hand the completed vault to this repo for the quiet Postgres/dbt/MCP workflow. See docs/demo-workflow.md for the full runbook.
Install the project:
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,pipeline]"Run the quiet completed-dataset workflow when you want to ingest a completed vault, build/test dbt marts, and start MCP without Obsidian or replay services:
VAULT_PATH=./var/imported-vaults/generated-current \
docker compose --profile workflow -f docker-compose.analytics.yml run --rm dataset-workflowFor checked-in fixture shortcuts, the host helper script is still available:
scripts/run_dataset_workflow.sh small
scripts/run_dataset_workflow.sh medium
scripts/run_dataset_workflow.sh largeThis validates the selected dataset, starts Postgres, ingests the full vault,
runs dbt, runs dbt tests, and starts MCP at http://localhost:8000. It does not
copy data from the generator; pass the generated vault path explicitly after
manually importing or placing it where you want it.
For the manual generator-to-main handoff rules, see docs/dataset-handoff-contract.md.
Start lineage and table inspection views only when you want to show proof:
VAULT_PATH=./var/imported-vaults/generated-current WITH_INSPECTION=1 \
docker compose --profile workflow -f docker-compose.analytics.yml run --rm dataset-workflowThat also opens dbt Docs at http://localhost:8081 and the Postgres table
browser at http://localhost:8082. Use --with-dbt-docs or
--with-table-browser to start only one inspection surface.
Use your MCP client as the primary Q&A surface once the workflow has passed. Parser diagnostic commands remain available for source inspection, and dbt Docs or the table browser can be started explicitly when you need lineage or row-level evidence.
For the current representative prompt set and demo caveats, see docs/retrieval-validation.md.
Prove the same data is available through an agent-ready preset:
POSTGRES_DSN=postgresql://obsidian:obsidian@localhost:5432/obsidian_context \
POSTGRES_WAREHOUSE_SCHEMAS=mart,fact,dim,intermediate,staging \
.venv/bin/obsidian-mcp-context \
--vault examples/generated-vaults/large \
context-preset project_brief \
--entity "Project Atlas 1" \
--limit 5The output includes mode: "mart-backed", the preset name, filters, row count,
and source-linked rows from the dbt marts.
List the preset catalogue:
.venv/bin/obsidian-mcp-context context-presetsLegacy replay scripts still exist for old virtual-time experiments, but replay, Replay Q&A, and replay dashboards are no longer part of the main workflow.
The container MCP endpoint is:
http://localhost:8000Serve dbt lineage and model documentation after building the warehouse:
scripts/run_dataset_workflow.sh large --with-dbt-docsThen open:
http://localhost:8081Inspect live Postgres raw tables and dbt marts in the browser:
scripts/run_dataset_workflow.sh large --with-table-browserThen open http://localhost:8082 and log in to Adminer with server
postgres, database obsidian_context, username obsidian, and password
obsidian. The raw landing tables are in raw; dbt outputs are split across
staging, intermediate, dim, fact, and mart.
For MCP client configuration, see docs/mcp-client-setup.md.
Generated Fixtures
Fixture | Approximate note count | Purpose |
| 232 | Fast smoke and demo runs. |
| 1,200 | Development and dashboard testing. |
| 5,680 | Scale and performance testing. |
The generated-large fixture includes companies, people, projects, decisions, risks, meetings, daily notes, research notes, tasks, links, tags, and lifecycle timestamps.
MCP Tools
Parser diagnostic tools read parsed Markdown directly:
list_vault_notessearch_vault_blockslist_vault_tasksget_vault_note_context
Mart-backed tools read dbt-built Postgres marts:
list_vault_context_presetsget_vault_context_presetget_vault_warehouse_summaryget_vault_profile_metadatalist_vault_entity_typesget_vault_entity_contextlist_vault_entity_eventslist_vault_entity_relationshipslist_vault_entity_stateslist_vault_entity_open_loopsget_vault_project_contextget_vault_person_contextlist_vault_open_loopslist_vault_decisionslist_vault_risks
Use get_vault_context_preset as the normal agent-facing entry point when a
named bundle such as project_brief, entity_brief, decision_log, or
risk_register fits the task. Use lower-level mart tools when a client needs a
specific table-shaped result. Parser tools are diagnostics for source
inspection and troubleshooting.
Useful Docs
Verification
The main completed-dataset verification command is:
VAULT_PATH=./var/imported-vaults/generated-current WITH_INSPECTION=1 \
docker compose --profile workflow -f docker-compose.analytics.yml run --rm dataset-workflowIt validates the completed vault, starts Postgres, ingests the dataset, runs dbt, runs dbt tests, starts MCP, and opens optional dbt lineage and table inspection surfaces.
Before recording a demo or preparing marketing screenshots, run the generated demo workflow and full privacy scan:
VAULT_PATH=./var/imported-vaults/generated-current WITH_INSPECTION=1 \
docker compose --profile workflow -f docker-compose.analytics.yml run --rm dataset-workflow
scripts/privacy_check.sh --allThe privacy scan checks tracked files for blocked runtime artifacts and local
sensitive terms from .privacy-banned-terms.local when that local-only file is
present.
Available Tools
19 toolsget_vault_entity_contextB
Return generic dbt mart-backed context for any typed entity.
Inputs: entity (required), vault_path (required), entity_type (required), limit, +1 more. Returns: result
get_vault_entity_timelineC
Return timeline rows connected to a modeled entity.
Inputs: entity (required), vault_path (required), text, limit, +1 more. Returns: result
get_vault_note_contextA
Fetch all parsed context for one vault-relative note path.
Inputs: vault_path (required), source_path (required). Returns: object
get_vault_person_contextB
Return dbt mart-backed person context, including decisions, risks, and open loops.
Inputs: person (required), vault_path (required), limit, duckdb_path. Returns: result
get_vault_project_contextB
Return dbt mart-backed project context, including decisions, risks, and open loops.
Inputs: project (required), vault_path (required), limit, duckdb_path. Returns: result
get_vault_warehouse_summaryC
Summarize deterministic warehouse dimensions, facts, and marts.
Inputs: vault_path (required), duckdb_path. Returns: object
list_vault_decisionsC
List dbt mart-backed decisions with optional entity and status filters.
Inputs: vault_path (required), limit, entity, status, +1 more. Returns: result
list_vault_entitiesC
List modeled entities derived from notes, wikilinks, and tags.
Inputs: vault_path (required), text, limit, duckdb_path, +1 more. Returns: result
list_vault_entity_eventsB
List generic entity events from the dbt warehouse.
Inputs: vault_path (required), limit, entity, event_type, +2 more. Returns: result
list_vault_entity_open_loopsC
List open loops attached to any modeled entity type.
Inputs: vault_path (required), limit, entity, duckdb_path, +1 more. Returns: result
list_vault_entity_relationshipsC
List generic relationships between modeled entities.
Inputs: vault_path (required), limit, entity, duckdb_path, +2 more. Returns: result
list_vault_entity_statesC
List generic state rows for stateful entities.
Inputs: vault_path (required), limit, entity, status, +3 more. Returns: result
list_vault_entity_typesC
List entity types observed in the dbt entity registry.
Inputs: vault_path (required), limit, duckdb_path. Returns: result
list_vault_notesC
List text notes found in the configured vault.
Inputs: vault_path (required), limit. Returns: result
list_vault_open_loopsC
List dbt mart-backed open loops from unchecked tasks.
Inputs: vault_path (required), limit, entity, duckdb_path. Returns: result
list_vault_risksB
List dbt mart-backed risks with optional entity and status filters.
Inputs: vault_path (required), limit, entity, status, +1 more. Returns: result
list_vault_tasksC
List parsed Markdown tasks with provenance.
Inputs: vault_path (required), text, limit, checked, +1 more. Returns: result
search_vault_agent_contextC
Search curated deterministic context rows for agent use.
Inputs: vault_path (required), text, limit, entity, +2 more. Returns: result
search_vault_blocksB
Search parsed note blocks with file and line provenance.
Inputs: vault_path (required), text, limit, heading, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Each tool targets a specific aspect of the vault context: get operations for different entity types (entity, note, person, project), list operations for distinct entity attributes (decisions, risks, open loops, tasks, etc.), and search operations. There is no meaningful overlap; every tool has a clearly distinct purpose.
All tools follow a consistent verb_vault_noun pattern with snake_case (e.g., get_vault_entity_context, list_vault_entities, search_vault_blocks). The use of 'vault' as a prefix is uniform, and the verbs are limited to get, list, and search. Minor singular/plural variations (entity vs. entities) do not disrupt the predictable structure.
With 19 tools, the server is slightly above the typical well-scoped range (3-15) but still reasonable given the breadth of entity types and operations. Each tool seems justified for the domain of vault context retrieval, so the count is appropriate.
The tool set covers a wide range of read operations: getting specific entity contexts, listing various entity attributes and events, and searching. Minor gaps exist, such as the absence of get operations for individual decisions, risks, or tasks (only list is available). However, agents can still retrieve needed information through filtering, so the surface is nearly complete for a read-only context server.
Maintenance
Related MCP Connectors
Hosted MCP server for Obsidian Sync vaults: read, search, edit notes. Not affiliated with Obsidian.
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to read, search, write, and link notes in an Obsidian vault via MCP tools and resources.MIT
- AlicenseNot gradedqualityBmaintenanceEnables LLM clients to read, search, and write to a local Obsidian vault over MCP, with full-text search, vault analytics, health scoring, and policy-enforced file operations.1MIT
- AlicenseAqualityCmaintenanceEnables natural language interaction with a local Obsidian vault, allowing MCP clients to read, search, create, append, and delete markdown notes securely.7MIT
- AlicenseAqualityCmaintenanceServes a local Obsidian markdown vault over MCP, enabling agents to search, read, build context, verify, and safely propose or apply guarded changes to the knowledge base.12MIT