obsidian-mcp

obsidian-mcp

An MCP server that gives AI agents read and write access to a folder of Markdown notes, supporting full-text search, reading, listing, and writing notes. It is deliberately small, with no dependencies beyond the MCP SDK, and includes proper path traversal protection.

Category
Visit Server

README

obsidian-mcp

An MCP server that gives an AI agent read and write access to a folder of Markdown notes. Point it at an Obsidian vault, a Logseq graph, or any notes directory.

Four tools, no dependencies beyond the MCP SDK, one file.

search_notes   full-text search with surrounding context
read_note      read one note by relative path
list_notes     enumerate notes, optionally under a subfolder
write_note     create a note, or append to an existing one

Setup

pip install -r requirements.txt

Register it with Claude Code by adding a .mcp.json at the root of your project:

{
  "mcpServers": {
    "vault": {
      "command": "python",
      "args": ["/path/to/server.py"],
      "env": { "VAULT_ROOT": "/path/to/your/vault" }
    }
  }
}

Restart your session. You'll be asked to approve the server on first use — it can write files, so that prompt is doing real work.

Configuration

variable default meaning
VAULT_ROOT current directory the folder to expose
VAULT_READONLY unset set to 1 to drop write_note entirely
VAULT_MAX_RESULTS 20 search result cap
VAULT_MAX_BYTES 100000 truncation limit for read_note

VAULT_READONLY=1 removes the write tool from the advertised list rather than just refusing calls, so an agent never sees a capability it can't use.

Two things worth knowing

Path traversal is checked properly. Every caller-supplied path is resolved and compared against the vault root:

p = (VAULT_ROOT / rel).resolve()
if not p.is_relative_to(VAULT_ROOT):
    raise ValueError(...)

Resolve-then-compare, not a string prefix test — .. and symlinks both defeat string comparison, and without this ../../.ssh/id_rsa is a valid note path.

Errors are returned, not raised. A tool that throws takes the server down, and a dead MCP server is a silent one — the agent simply stops having the capability and carries on without mentioning it. Returning the error text means the agent can see what went wrong and tell you.

Scope

Deliberately small. No embeddings, no vector index, no frontmatter parsing, no graph traversal. Full-text search over Markdown covers most of what an agent actually needs, and it has no index to rebuild or fall out of date.

Search returns one hit per note, which keeps results readable when a term appears forty times in one file.

Licence

MIT

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

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.

Official
Featured
Python
graphlit-mcp-server

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.

Official
Featured
TypeScript
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured