vault-mcp-server
MCP server to query and modify an Obsidian vault or any folder of markdown files. It provides search, tag filtering, backlinks, and CRUD operations on notes, with path traversal protection.
README
vault-mcp-server
MCP server genérico pra consultar e alimentar um vault Obsidian (ou qualquer
pasta de arquivos .md). Não sabe nada sobre a estrutura de nenhum vault
específico — isso é responsabilidade do AGENTS.md/convenções de cada vault,
lido pelo agente que usa as tools, não codificado aqui.
Ferramentas
| Módulo | Ferramenta | Descrição |
|---|---|---|
| Busca | search_notes(query, subfolder=None, max_results=None) |
Busca texto (regex, cai pra literal se inválido) em .md, opcionalmente só numa subpasta |
| Busca | search_by_tag(tag, subfolder=None) |
Busca notas com a tag no frontmatter (tags:) ou inline (#tag) |
| Busca | get_backlinks(path) |
Notas que linkam pra essa via [[wikilink]] |
| Leitura | read_note(path) |
Conteúdo bruto de uma nota (frontmatter incluso) |
| Leitura | list_notes(subfolder=None) |
Lista recursiva de .md com frontmatter de preview |
| Leitura | list_folders(subfolder=None) |
Subpastas de um nível |
| Leitura | get_note_metadata(path) |
Só o frontmatter parseado |
| Escrita | write_note(path, content, mode="append") |
Cria (mode="create", falha se já existir) ou concatena (mode="append", cria se não existir) |
| Escrita | rename_note(path, new_filename) |
Renomeia, mesma pasta |
| Escrita | move_note(path, new_path) |
Move/renomeia pra qualquer caminho no vault |
| Escrita | delete_note(path) |
Soft delete — move pra .trash/, não apaga de verdade |
Limitação conhecida: rename_note/move_note não reescrevem
[[wikilinks]] que outras notas tenham pra elas (diferente do Obsidian, que
faz isso automaticamente pela UI). Rode get_backlinks antes de renomear pra
saber o que pode quebrar.
write_note não faz git. Só grava o arquivo — commit/push continua
manual (mesmo fluxo que o AGENTS.md de cada vault já deve documentar pra
agentes com acesso a shell).
Variáveis de ambiente
| Variável | Default | Faz |
|---|---|---|
VAULT_MCP_ROOT |
~/vault |
Raiz do vault a servir — trocar aponta pra qualquer outro vault |
VAULT_MCP_SEARCH_MAX_RESULTS |
50 |
Limite de resultados de busca (1-500) |
VAULT_MCP_SEARCH_CONTEXT_CHARS |
120 |
Tamanho do trecho retornado por match (20-1000) |
VAULT_MCP_WRITE_MAX_CHARS |
20000 |
Limite de tamanho de conteúdo em write_note (1-200000) |
VAULT_MCP_BLOCKED_FOLDERS |
(vazio) | CSV de pastas de topo extras a bloquear pra leitura/escrita, além de .git/.obsidian/.trash (sempre bloqueados) |
Segurança
Todo caminho é resolvido e validado contra escapar da raiz do vault (sem
.., sem caminho absoluto fora do vault). Só arquivos .md são
lidos/escritos. Pastas de topo em VAULT_MCP_BLOCKED_FOLDERS (+ as três
padrão) ficam fora tanto de leitura quanto de escrita.
Registro
Pra este vault específico (~/vault), bloqueando também _scripts/ (é
tooling, não notas):
claude mcp add --scope user vault \
--env VAULT_MCP_ROOT=$HOME/vault \
--env VAULT_MCP_BLOCKED_FOLDERS=_scripts \
-- uv run --directory ~/dev/pessoal/vault-mcp-server server.py
--scope user deixa disponível em qualquer sessão do Claude Code, em
qualquer repo — não só quando se está dentro do vault. O mesmo binário serve
qualquer outro vault só trocando VAULT_MCP_ROOT.
Codex CLI ainda não está instalado nesta máquina; quando estiver, o mesmo
servidor se registra via entrada mcp_servers no config.toml do Codex,
apontando pro mesmo comando (uv run --directory ... server.py) com as
mesmas env vars.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.