# Markdown Vault MCP

Lets an agent search, read and write a folder of Markdown notes. An Obsidian vault works without changes.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 35
- Author: pvliesdonk
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/pvliesdonk/markdown-vault-mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/markdown-vault-mcp

## What it does

Point the server at a notes folder and your agent gets tools to read and write inside it. Search runs two ways: keyword matching through SQLite FTS5, and — once you set up an embedding provider — matching by meaning, with Reciprocal Rank Fusion merging the two. Vectors can live in files, SQLite or PostgreSQL. You get short snippets back; `read` pulls the full section.

YAML frontmatter fields turn into search filters, and long notes get split at their headings. Write tools (`write`, `edit`, `append`, `delete`, `rename`, `move_folder`, `fetch`, `git_sync`, the `okf_*` set, `create_upload_link`) ship enabled and disappear when `MARKDOWN_VAULT_MCP_READ_ONLY=true`. Overwriting a file needs the etag from the read that preceded it, and per-folder `_conventions.md` rules reach the client while it writes. Optional git support commits each write with a delayed push, plus pull or webhook sync, history and diffs.

One server handles one vault, so several vaults mean several instances, each with its own `MARKDOWN_VAULT_MCP_SERVER_NAME`. Only Markdown gets indexed — PDFs and images can be read or written as attachments, but their contents stay out of search. Embeddings sit in memory, so RAM runs out before query time does. Leave `MARKDOWN_VAULT_MCP_INDEX_PATH` unset and the index and change-tracking file stay in memory, rebuilt on every start.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `MARKDOWN_VAULT_MCP_KV_STORE_URL`, `MARKDOWN_VAULT_MCP_TOOLS_ALLOW`, `MARKDOWN_VAULT_MCP_TOOLS_DENY`, `MARKDOWN_VAULT_MCP_SERVER_NAME`, `MARKDOWN_VAULT_MCP_INSTANCE_DESCRIPTION`, `MARKDOWN_VAULT_MCP_INSTRUCTIONS_EXTRA`, `MARKDOWN_VAULT_MCP_INSTRUCTIONS`, `MARKDOWN_VAULT_MCP_LOG_LEVEL`, `MARKDOWN_VAULT_MCP_LOG_FORMAT`, `OLLAMA_HOST` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: Obsidian

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env MARKDOWN_VAULT_MCP_KV_STORE_URL=<MARKDOWN_VAULT_MCP_KV_STORE_URL> --env MARKDOWN_VAULT_MCP_TOOLS_ALLOW=<MARKDOWN_VAULT_MCP_TOOLS_ALLOW> --env MARKDOWN_VAULT_MCP_TOOLS_DENY=<MARKDOWN_VAULT_MCP_TOOLS_DENY> --env MARKDOWN_VAULT_MCP_SERVER_NAME=<MARKDOWN_VAULT_MCP_SERVER_NAME> --env MARKDOWN_VAULT_MCP_INSTANCE_DESCRIPTION=<MARKDOWN_VAULT_MCP_INSTANCE_DESCRIPTION> --transport stdio markdown-vault-mcp -- uvx markdown-vault-mcp
```
Replace <…> with your own values. 105 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from markdown-vault-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add markdown-vault-mcp --env MARKDOWN_VAULT_MCP_KV_STORE_URL=<MARKDOWN_VAULT_MCP_KV_STORE_URL> --env MARKDOWN_VAULT_MCP_TOOLS_ALLOW=<MARKDOWN_VAULT_MCP_TOOLS_ALLOW> --env MARKDOWN_VAULT_MCP_TOOLS_DENY=<MARKDOWN_VAULT_MCP_TOOLS_DENY> --env MARKDOWN_VAULT_MCP_SERVER_NAME=<MARKDOWN_VAULT_MCP_SERVER_NAME> --env MARKDOWN_VAULT_MCP_INSTANCE_DESCRIPTION=<MARKDOWN_VAULT_MCP_INSTANCE_DESCRIPTION> -- uvx markdown-vault-mcp
```
Replace <…> with your own values. 105 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from markdown-vault-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "markdown-vault-mcp": {
            "command": "uvx",
            "args": [
                "markdown-vault-mcp"
            ],
            "env": {
                "MARKDOWN_VAULT_MCP_KV_STORE_URL": "<MARKDOWN_VAULT_MCP_KV_STORE_URL>",
                "MARKDOWN_VAULT_MCP_TOOLS_ALLOW": "<MARKDOWN_VAULT_MCP_TOOLS_ALLOW>",
                "MARKDOWN_VAULT_MCP_TOOLS_DENY": "<MARKDOWN_VAULT_MCP_TOOLS_DENY>",
                "MARKDOWN_VAULT_MCP_SERVER_NAME": "<MARKDOWN_VAULT_MCP_SERVER_NAME>",
                "MARKDOWN_VAULT_MCP_INSTANCE_DESCRIPTION": "<MARKDOWN_VAULT_MCP_INSTANCE_DESCRIPTION>"
            }
        }
    }
}
```
Replace <…> with your own values. 105 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from markdown-vault-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "markdown-vault-mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "markdown-vault-mcp"
            ],
            "env": {
                "MARKDOWN_VAULT_MCP_KV_STORE_URL": "<MARKDOWN_VAULT_MCP_KV_STORE_URL>",
                "MARKDOWN_VAULT_MCP_TOOLS_ALLOW": "<MARKDOWN_VAULT_MCP_TOOLS_ALLOW>",
                "MARKDOWN_VAULT_MCP_TOOLS_DENY": "<MARKDOWN_VAULT_MCP_TOOLS_DENY>",
                "MARKDOWN_VAULT_MCP_SERVER_NAME": "<MARKDOWN_VAULT_MCP_SERVER_NAME>",
                "MARKDOWN_VAULT_MCP_INSTANCE_DESCRIPTION": "<MARKDOWN_VAULT_MCP_INSTANCE_DESCRIPTION>"
            }
        }
    }
}
```
Replace <…> with your own values. 105 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from markdown-vault-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e MARKDOWN_VAULT_MCP_KV_STORE_URL=<MARKDOWN_VAULT_MCP_KV_STORE_URL> -e MARKDOWN_VAULT_MCP_TOOLS_ALLOW=<MARKDOWN_VAULT_MCP_TOOLS_ALLOW> -e MARKDOWN_VAULT_MCP_TOOLS_DENY=<MARKDOWN_VAULT_MCP_TOOLS_DENY> -e MARKDOWN_VAULT_MCP_SERVER_NAME=<MARKDOWN_VAULT_MCP_SERVER_NAME> -e MARKDOWN_VAULT_MCP_INSTANCE_DESCRIPTION=<MARKDOWN_VAULT_MCP_INSTANCE_DESCRIPTION> markdown-vault-mcp uvx markdown-vault-mcp
```
Replace <…> with your own values. 105 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from markdown-vault-mcp <command>

## When to use it
- find a note by meaning instead of an exact word
- pull one section out of a long file
- write an edit back and get a git commit
- filter notes by frontmatter fields
- spot links in a note that do not resolve

## Example prompts
- Search the vault for notes about deployment and show me the snippets
- Append a rollback section to `notes/deploy.md` and commit it
- Which links in this note point nowhere?

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
