obsidian-mcp-server
MCP server by cyanheads Community
Reads, writes, searches and edits Obsidian vault notes, tags and frontmatter through MCP. It connects to Obsidian through the Local REST API plugin, for people who want an AI assistant to work with their notes.
Install obsidian-mcp-server
Built from the published package, never by AI.
claude mcp add obsidian-mcp-server -e OBSIDIAN_API_KEY=YOUR_OBSIDIAN_API_KEY -- npx -y obsidian-mcp-serverRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"obsidian-mcp-server": {
"env": {
"OBSIDIAN_API_KEY": "YOUR_OBSIDIAN_API_KEY"
},
"args": [
"-y",
"obsidian-mcp-server"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"obsidian-mcp-server": {
"env": {
"OBSIDIAN_API_KEY": "YOUR_OBSIDIAN_API_KEY"
},
"args": [
"-y",
"obsidian-mcp-server"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"obsidian-mcp-server": {
"env": {
"OBSIDIAN_API_KEY": "YOUR_OBSIDIAN_API_KEY"
},
"args": [
"-y",
"obsidian-mcp-server"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add obsidian-mcp-server --env OBSIDIAN_API_KEY=YOUR_OBSIDIAN_API_KEY -- npx -y obsidian-mcp-server{
"mcpServers": {
"obsidian-mcp-server": {
"env": {
"OBSIDIAN_API_KEY": "YOUR_OBSIDIAN_API_KEY"
},
"args": [
"-y",
"obsidian-mcp-server"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
Step-by-step: install obsidian-mcp-server in Antigravity CLI
gemini mcp add obsidian-mcp-server npx -y obsidian-mcp-serverGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the obsidian-mcp-server block.
About
obsidian-mcp-server gives an AI assistant access to an Obsidian vault through the Local REST API plugin. It can read notes in several formats, search by text, JSONLogic or Omnisearch, and list notes and tags. It can also write notes, edit a single heading, block or frontmatter field in place, and manage tags in frontmatter, inline or both.
Folder-scoped read and write permissions are built in, set with environment variables such as OBSIDIAN_READ_PATHS and OBSIDIAN_WRITE_PATHS. The server runs over STDIO or Streamable HTTP and is published on npm as obsidian-mcp-server. It suits people who want an assistant to work with their Obsidian notes, with optional confirmation for deletes and opt-in settings for command execution.
Written from the project's README and checked against it.
Tools it gives your assistant
obsidian_get_noteReads a note as raw content, full structured form, document map, or a single section.obsidian_list_notesLists notes and folders under a vault path, recursively, with extension and name filters.obsidian_list_tagsLists vault tags with usage counts, most-used first.obsidian_search_notesSearches notes by text, JSONLogic, or BM25-ranked Omnisearch when that plugin is reachable.obsidian_write_noteCreates a note, replaces one section, or overwrites a whole file when overwrite is true.obsidian_append_to_noteAppends to a note, or to one heading, block, or frontmatter field.obsidian_patch_noteAppends, prepends, or replaces content against one heading, block reference, or frontmatter field.obsidian_replace_in_noteRuns literal or regex search-replace inside one note, body-only by default.obsidian_manage_frontmatterGets, sets, or deletes one frontmatter key.obsidian_manage_tagsAdds, removes, or lists a note's tags in frontmatter, inline, or both.
What you need
- Obsidian with the Local REST API plugin
- OBSIDIAN_API_KEY environment variable
| Setting | Needed | What it is |
|---|---|---|
OBSIDIAN_Environment variable | Required | Bearer token for the Obsidian Local REST API plugin (Settings → Community Plugins → Local REST API). |
OBSIDIAN_Environment variable | Optional | Base URL of the Obsidian Local REST API. Default: http://127.0.0.1:27123 (enable "Non-encrypted (HTTP) Server" in plugin settings). Use https://127.0.0.1:27124 for the always-on HTTPS port (self-signed cert; pair with OBSIDIAN_VERIFY_SSL=fa Default: http://127.0.0.1:27123 |
OBSIDIAN_Environment variable | Optional | Whether to verify the TLS certificate on the Obsidian endpoint. Default false because the plugin uses a self-signed cert. Default: false |
OBSIDIAN_Environment variable | Optional | Milliseconds one request attempt (headers and body) may take before it fails with obsidian_timeout. GET, PUT, and DELETE retry a timed-out attempt; all the requests of one tool call share a 45 s budget, or this value when it is longer. Default: 30000 |
OBSIDIAN_Environment variable | Optional | Opt-in flag for the command-palette pair (obsidian_list_commands + obsidian_execute_command). Off by default — Obsidian commands are opaque and can be destructive. Default: false |
OBSIDIAN_Environment variable | Optional | Optional comma-separated vault-relative folder allowlist for reads. Prefix-based with implicit recursion; case-insensitive; backslashes read as slashes, repeated and trailing slashes and '.' segments dropped, and names normalized to Unicode |
OBSIDIAN_Environment variable | Optional | Optional comma-separated vault-relative folder allowlist for writes. Same syntax as OBSIDIAN_READ_PATHS. Unset = full vault, or the read scope when reads are restricted; paths in OBSIDIAN_DENY_PATHS stay denied. Example: 'projects/,scratch/ |
OBSIDIAN_Environment variable | Optional | Optional comma-separated vault-relative paths withheld from reads and writes. Same syntax as OBSIDIAN_READ_PATHS. Wins over both allowlists; denied paths are left out of listings, search results, and tag counts. Unset = nothing denied. Exam |
OBSIDIAN_Environment variable | Optional | Global read-only kill switch. When true, every write is denied regardless of OBSIDIAN_WRITE_PATHS, and the command-palette pair is suppressed (commands can mutate). Useful for shared or public-facing deployments. Default: false |
OBSIDIAN_Environment variable | Optional | Opt-in delete confirmation. When true, obsidian_delete_note asks the user to confirm each delete through an elicitation round (the client must support elicitation), and HTTP startup requires a stateful session unless OBSIDIAN_READ_ONLY=true Default: false |
OBSIDIAN_Environment variable | Optional | Override URL for the Omnisearch plugin HTTP server. Unset derives from OBSIDIAN_BASE_URL host with port 51361. Required only if the Omnisearch plugin is not on the default port. Under OBSIDIAN_READ_PATHS or OBSIDIAN_DENY_PATHS the URL is ne |
MCP_Environment variable | Optional | Sets the minimum log level for output (e.g., 'debug', 'info', 'warn'). Default: info |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Search my vault for notes that mention quarterly planning.
- Add the tag project/alpha to the frontmatter of my meeting notes.
- Replace the old client name with the new one in notes under Clients/.
Good to know
- Omnisearch mode is offered only when the Omnisearch plugin answered at startup and no read or deny path limits are set.
- By default obsidian_delete_note deletes permanently on the first call, with no confirmation, unless OBSIDIAN_DELETE_ELICITATION is true.
- The directory walk stops at 1,000 entries.
- Command tools are opt-in through OBSIDIAN_ENABLE_COMMANDS.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to obsidian-mcp-server
All alternatives →Connects a Zotero research library to AI assistants such as Claude and ChatGPT through the Model Context Protocol. It lets the assistant search, read, annotate and add papers, in local mode or through the web API. Built for researchers who want their references available in chat.
AgentDB is a vector memory database for AI agents. It stores embeddings, indexes and learning state in one file and exposes 41 MCP tools to clients such as Claude Code, Cursor and Cline.
Genkitx MCP is listed as a Genkit plugin for Model Context Protocol interoperability. The source is the main Genkit framework README and does not describe this plugin, so its features cannot be confirmed.
QMD is an on-device search engine for markdown notes, meeting transcripts and documentation. It combines BM25 keyword search, vector search and LLM reranking, and exposes an MCP server for AI assistants.
RuVector is a Rust native vector database that gives AI agents persistent memory and local semantic retrieval. Its npm package includes an MCP server for MCP compatible clients, and it suits developers building agent memory in Node.js, Python, or Rust.
Gives AI coding agents persistent memory, so each new session starts where the last one left off. Works with Claude Code, Codex, Cursor, OpenCode and 11 more agents.
Compare with Zotero MCP, Agentdb or Genkitx MCP
obsidian-mcp-server: common questions
What does obsidian-mcp-server need to connect to Obsidian?
It works through the Local REST API plugin for Obsidian. The install configuration passes an OBSIDIAN_API_KEY environment variable.
Can I restrict which folders the assistant can read or write?
Yes. The source describes OBSIDIAN_READ_PATHS, OBSIDIAN_WRITE_PATHS, OBSIDIAN_DENY_PATHS and OBSIDIAN_READ_ONLY for folder-scoped access.
Which transports does the server support?
The server supports STDIO and Streamable HTTP, according to its description.
How do I install obsidian-mcp-server?
In Claude Code run claude mcp add obsidian-mcp-server -e OBSIDIAN_API_KEY=YOUR_OBSIDIAN_API_KEY -- npx -y obsidian-mcp-server. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is obsidian-mcp-server the official server?
obsidian-mcp-server is a community project by cyanheads, not verified by a company domain.
Is obsidian-mcp-server free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is obsidian-mcp-server safe to use?
It scores 86 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to obsidian-mcp-server?
Similar MCP servers: Zotero MCP, Agentdb, Genkitx MCP, Qmd.
Does obsidian-mcp-server work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
