Obsidian-MCP-For-Cursor
Obsidian-MCP-For-Cursor
MCP server for Obsidian vaults, optimised for Cursor agents — safe note editing, lean tool surface, direct filesystem access.
Forked from @istrejo/obsidian-mcp (MIT) with Cursor-specific enhancements.
Features
10 agent-focused tools — no unused
move_note,search_by_tags, orget_graphSafe writes —
patchandreplace_sectionmodes so agents cannot accidentally truncate notes with partialreplaceToken-AND search — multi-word vault search requires all terms to appear in a note
Optimistic concurrency —
contentHashon read, optionalexpectedHashon write
Tools (v1)
Tool | Purpose |
| Read note body + frontmatter; returns |
| Safe edits: |
| Create a new note |
| Delete a note |
| List notes in the vault |
| Recently modified notes |
| Full-text search (token-AND for multi-word queries) |
| Get/set YAML frontmatter |
| Create/list vault folders |
| Notes linking to a given note |
Requirements
Node.js >= 20
An Obsidian vault path via
OBSIDIAN_VAULT_PATH
Setup
git clone https://github.com/JeddowesF/Obsidian-MCP-For-Cursor.git
cd Obsidian-MCP-For-Cursor
npm install
npm run build
npm testCursor configuration
Copy the relevant section from examples/cursor-mcp.json into ~/.cursor/mcp.json:
{
"mcpServers": {
"obsidian": {
"command": "node",
"args": ["/absolute/path/to/Obsidian-MCP-For-Cursor/dist/index.js"],
"env": {
"OBSIDIAN_VAULT_PATH": "/absolute/path/to/your/vault",
"PATH": "/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin"
}
}
}
}Reload the Cursor window after saving.
Safe write workflow
Read the note — note the
contentHashin the response.Edit using the safest mode:
patch— find/replace a unique substring (old_string/new_string)replace_section— replace content under a heading (heading+content)append/prepend— add content without touching existing bodyreplace— full body overwrite only; blocked if new body < 50% of existing unlessforce: true
Pass
expectedHashfrom step 1 to detect concurrent edits.
Example: patch a line
{
"path": "Projects/my-project",
"mode": "patch",
"old_string": "status: draft",
"new_string": "status: done"
}Example: replace a section
{
"path": "Projects/my-project",
"mode": "replace_section",
"heading": "Next steps",
"content": "- Ship v1\n- Write docs"
}Environment variables
Variable | Required | Description |
| Yes | Absolute path to your Obsidian vault |
| No | Set to |
| No | Max file size in bytes (default 10 MB) |
| No |
|
Development
npm run dev # run server directly (stdio)
npm test # vitest with coverage
npm run lint # eslint
npm run typecheck
npm run buildLicense
MIT — see LICENSE. Upstream attribution: @istrejo/obsidian-mcp.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JeddowesF/Obsidian-MCP-For-Cursor'
If you have feedback or need assistance with the MCP directory API, please join our Discord server