MCP server for Obsidian
Memory server
Created by Markus Pfundstein
Published in MarkusPfundstein/mcp-obsidian. Publisher page
4,531 GitHub stars
What it is
MCP server that interacts with Obsidian via the Obsidian rest API community plugin
AutoGineer overview, from the brain’s own files
mcp-obsidian is a Model Context Protocol (MCP) server designed to bridge the gap between AI agents and Obsidian, a popular personal knowledge management tool. By leveraging the Obsidian Local REST API community plugin, this server allows agents to interact with a user's vault as a persistent memory store. It provides a suite of tools for file management, content retrieval, and document modification, enabling agents to perform tasks like summarizing meeting notes, searching for specific technical context across a knowledge base, or appending new information directly into existing notes.
How it works
Memory model: Not stated
AutoGineer overview, from the brain’s own files
The server acts as a bridge between an MCP-compatible client (such as Claude Desktop) and an Obsidian vault. It requires the Obsidian Local REST API plugin to be active in the user's Obsidian instance. Once configured with the necessary API key, host, and port, the server exposes various tools to the agent. These tools allow the agent to list files, retrieve content, perform text searches, and update notes by appending or patching content based on headings or frontmatter.
| Folder | Role | Files |
|---|---|---|
| .github | agent-config | 1 |
| src | source-code | 4 |
| tests | tests | 11 |
Requirements
Apps: Docker
Runtimes: Python >=3.11
API keys (by name): OBSIDIAN_API_KEY, YOUR_OBSIDIAN_API_KEY
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Google Antigravity, Kiro, OpenCode, Amp, Roo Code, Cline, JetBrains Junie, Devin (ex-Windsurf)
Set it up
- Not scanned by AutoGineerThe author’s MCP configuration (README.md) also starts it in a way AutoGineer does not offer. Read that file: AutoGineer did not scan that path; what it runs is listed under “This brain runs”. https://github.com/MarkusPfundstein/mcp-obsidian/blob/5ee0b84fa8319fd2fdf0db0ee1febb065e712a15/README.md
- Not scanned by AutoGineerIts dependencies are installed by the package manager when you run it and were not scanned by AutoGineer (3 declared). https://github.com/MarkusPfundstein/mcp-obsidian/tree/5ee0b84fa8319fd2fdf0db0ee1febb065e712a15
Created by Markus Pfundstein. Published in MarkusPfundstein/mcp-obsidian. Licence: MIT License.
Usage
AutoGineer overview, from the brain’s own files
- Connect Obsidian as a knowledge base for AI agents.
- Enable agents to summarize or synthesize information from existing notes.
- Automate the creation and organization of meeting notes or project documentation.
- Perform cross-vault searches to retrieve context for complex queries.
- “Get the contents of the last architecture call note and summarize them.”
- The agent retrieves the specified note from the vault and provides a concise summary of the architecture discussion.
- “Search for all files where Azure CosmosDb is mentioned and explain the context.”
- The agent performs a vault-wide search and synthesizes the findings to explain how the technology is referenced in the user's notes.
- “Summarize the last meeting notes and put them into a new note 'summary meeting.md'.”
- The agent reads the latest meeting file, generates a summary, and creates a new note in the vault with the summarized content.
Documentation by Markus Pfundstein
MCP server for Obsidian
MCP server to interact with Obsidian via the Local REST API community plugin.
<a href="https://glama.ai/mcp/servers/3wko1bhuek"><img width="380" height="200" src="https://glama.ai/mcp/servers/3wko1bhuek/badge" alt="server for Obsidian MCP server" /></a>
Components
Tools
The server implements multiple tools to interact with Obsidian:
list_files_in_vault: Lists all files and directories in the root directory of your Obsidian vault
list_files_in_dir: Lists all files and directories in a specific Obsidian directory
get_file_contents: Return the content of a single file in your vault.
search: Search for documents matching a specified text query across all files in the vault
patch_content: Insert content into an existing note relative to a heading, block reference, or frontmatter field.
append_content: Append content to a new or existing file in the vault.
delete_file: Delete a file or directory from your vault.
Example prompts
Its good to first instruct Claude to use Obsidian. Then it will always call the tool.
The use prompts like this:
Get the contents of the last architecture call note and summarize them
Search for all files where Azure CosmosDb is mentioned and quickly explain to me the context in which it is mentioned
Summarize the last meeting notes and put them into a new note 'summary meeting.md'. Add an introduction so that I can send it via email.
Requirements
Python >= 3.11
mcpPython SDK>=1.1.0,<2.0.0(pinned inpyproject.toml).mcp-obsidiancurrently registers its tool handlers via themcp1.x low-levelServerAPI (@app.list_tools()/@app.call_tool()), which was removed inmcp2.0. Installing with an unconstrainedmcp>=2.0will crash at import withAttributeError: 'Server' object has no attribute 'list_tools'.
Configuration
Obsidian REST API Key
There are two ways to configure the environment with the Obsidian REST API Key.
Add to server config (preferred)
{
"mcp-obsidian": {
"command": "uvx",
"args": [
"mcp-obsidian"
],
"env": {
"OBSIDIAN_API_KEY": "<your_api_key_here>",
"OBSIDIAN_HOST": "<your_obsidian_host>",
"OBSIDIAN_PORT": "<your_obsidian_port>"
}
}
}Sometimes Claude has issues detecting the location of uv / uvx. You can use which uvx to find and paste the full path in above config in such cases.
Create a
.envfile in the working directory with the following required variables:
OBSIDIAN_API_KEY=your_api_key_here
OBSIDIAN_HOST=your_obsidian_host
OBSIDIAN_PORT=your_obsidian_portNote:
You can find the API key in the Obsidian plugin config
Default port is 27124 if not specified
Default host is 127.0.0.1 if not specified
Quickstart
Install
Obsidian REST API
You need the Obsidian REST API community plugin running: https://github.com/coddingtonbear/obsidian-local-rest-api
Install and enable it in the settings and copy the api key.
Claude Desktop
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
<details> <summary>Development/Unpublished Servers Configuration</summary>
{
"mcpServers": {
"mcp-obsidian": {
"command": "uv",
"args": [
"--directory",
"<dir_to>/mcp-obsidian",
"run",
"mcp-obsidian"
],
"env": {
"OBSIDIAN_API_KEY": "<your_api_key_here>",
"OBSIDIAN_HOST": "<your_obsidian_host>",
"OBSIDIAN_PORT": "<your_obsidian_port>"
}
}
}
}</details>
<details> <summary>Published Servers Configuration</summary>
{
"mcpServers": {
"mcp-obsidian": {
"command": "uvx",
"args": [
"mcp-obsidian"
],
"env": {
"OBSIDIAN_API_KEY": "<YOUR_OBSIDIAN_API_KEY>",
"OBSIDIAN_HOST": "<your_obsidian_host>",
"OBSIDIAN_PORT": "<your_obsidian_port>"
}
}
}
}</details>
Docker
You can run the server in a container instead of installing uv/Python locally.
Copy
.env.exampleto.envand fill in your Obsidian REST API key:
cp .env.example .envBy default OBSIDIAN_HOST is set to host.docker.internal, which resolves to
your host machine from inside the container (works on Linux, Mac and Windows).
Build the image:
docker compose buildPoint your MCP client at the container. Since MCP speaks JSON-RPC over stdio, the client must run it with stdin attached and no pseudo-TTY — use
docker compose run --rm -T, notdocker compose up:
{
"mcpServers": {
"mcp-obsidian": {
"command": "docker",
"args": [
"compose",
"-f",
"<dir_to>/mcp-obsidian/docker-compose.yml",
"run",
"--rm",
"-T",
"mcp-obsidian"
]
}
}
}You can also run it manually to sanity-check the container starts:
docker compose run --rm -T mcp-obsidian(it will sit waiting for a JSON-RPC message on stdin; Ctrl+C to exit)
Development
Building
To prepare the package for distribution:
Sync dependencies and update lockfile:
uv syncDebugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm with this command:
npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-obsidian run mcp-obsidianUpon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
You can also watch the server logs with this command:
tail -n 20 -f ~/Library/Logs/Claude/mcp-server-mcp-obsidian.log27 files · 24 not served here
- .dockerignore (not served here)
- .env.example (not served here)
- .github/workflows/ci.yml (not served here)
- .gitignore (not served here)
- ATTRIBUTION.md
- Dockerfile (not served here)
- LICENSE
- README.md
- docker-compose.yml (not served here)
- openapi.yaml (not served here)
- pyproject.toml (not served here)
- src/mcp_obsidian/__init__.py (not served here)
- src/mcp_obsidian/obsidian.py (not served here)
- src/mcp_obsidian/server.py (not served here)
- src/mcp_obsidian/tools.py (not served here)
- tests/__init__.py (not served here)
- tests/conftest.py (not served here)
- tests/test_get_frontmatter.py (not served here)
- tests/test_obsidian_heading_fallback.py (not served here)
- tests/test_obsidian_put_content.py (not served here)
- tests/test_obsidian_requests.py (not served here)
- tests/test_obsidian_utf8.py (not served here)
- tests/test_search_by_tag.py (not served here)
- tests/test_server.py (not served here)
- tests/test_stdio.py (not served here)
- tests/test_tools.py (not served here)
- uv.lock (not served here)
Advantages
- Provides direct read and write access to Obsidian vaults, turning personal notes into an active agent memory. evidence: README.md
- Supports granular content manipulation, including patching specific sections or appending to files. evidence: README.md
Limitations
- Requires the installation and configuration of the third-party Obsidian Local REST API community plugin. evidence: README.md
- Strict dependency on mcp SDK version 1.x; using version 2.0 or higher will cause the server to crash. evidence: README.md
Security
Risk level: Medium risk
This brain runs
MCP servers (3)
README.md(mcp-obsidian):uv --directory <dir_to>/mcp-obsidian run mcp-obsidianREADME.md(mcp-obsidian):uvx mcp-obsidianREADME.md(mcp-obsidian):docker compose -f <dir_to>/mcp-obsidian/docker-compose.yml run --rm -T mcp-obsidian
- Medium risk: runs-mcp-server-unpinned-runner (README.md:117)
Attribution and licence
- Created by
- Markus Pfundstein
- Declared authors
- Markus Pfundstein (declared in pyproject.toml)
- Publisher
- Markus Pfundstein (Community)
- Source
- MarkusPfundstein/mcp-obsidian · commit 5ee0b84
- Licence
- MIT License (files served here)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Markus Pfundstein.
Install from source
24 of its files are not served here, so there is no ZIP. MarkusPfundstein/mcp-obsidian at 5ee0b84