VaultGate: a local MCP server for Obsidian

Disclaimer

Is this project open source? Yes
Is this project completely free? Yes
Is this project made with AI beyond the author’s ability to comprehend how it works? No

Hi everyone :waving_hand:

I’ve been working on VaultGate (https://vaultgate.md), a local MCP server that lets AI assistants work with your Obsidian notes. Its reads and writes go through the running Obsidian app using its CLI rather than directly accessing the Markdown files.

I started it because the assistant I was using needed an HTTP connection, and I wanted to keep note operations going through Obsidian. It grew from there into something I use every day.

A few features worth mentioning:

  • Scope zones. Give different folders different access settings: read/write for projects, read-only for reference notes, or excluded from the connector altogether. These are configured in the frontmatter of VAULTGATE.md notes.
  • Local semantic search. Search by meaning when you don’t remember the exact wording, or find notes similar to another note. The embedding model runs on your machine, without an external embedding service.
  • Open things in Obsidian. Ask the assistant to open a note, jump to a heading, open today’s daily note, or show a search in Obsidian. This uses Obsidian’s URI scheme, so you can go from discussing a note to looking at it.
  • Vault conventions. Put your folder structure, naming rules, and other instructions in VAULTGATE.md. VaultGate passes them to the connected assistant, so you don’t have to explain your setup in every conversation.
  • Mac tray app. Check server status, change settings, and copy the connection URL without managing the process in a terminal. Currently available for Apple Silicon Macs.

There’s also an npm package for Windows, Linux, and macOS. Both HTTP and stdio connections are supported, depending on your client. Obsidian needs to be running and its CLI enabled, so this isn’t a headless replacement for Obsidian.

If you’d rather see it working, I recorded a demo, starting here at about 19 minutes:
https://www.youtube.com/watch?v=o05bdEqb-SQ&t=1140s.

It shows using notes alongside email context to prepare a briefing, then writing an action back into a sprint note. The email integration belongs to the assistant used in the demo, not VaultGate.

There’s also a blog with the background and setup:
https://community.sap.com/t5/technology-blog-posts-by-sap/contextualize-joule-work-desktop-with-obsidian-notes/ba-p/14462509

For full details, check out GitHub:
https://github.com/mkemeter/obsidian-vaultgate-mcp

VaultGate MCP is free and open source. If you give it a try, I’d be interested in which client you’re using and anything that was confusing to set up. Bugs and general feedback are welcome too.

Very cool. Thanks for the video ink.

1 Like

Routing through the CLI looks like it pays off mostly for renames and moves. With “Automatically update internal links” on, Obsidian’s own file manager rewrites the links in other notes, and a rename done straight on disk doesn’t, because Obsidian just sees a delete followed by a create.

Plain content edits are fine either way: the file watcher picks those up and reindexes while the app is running.

The cost is that the desktop app has to be installed and able to start in a GUI session or a virtual display. The first CLI command launches it, so it doesn’t need to be open already, but a plain headless server won’t work without some extra setup.

Going through the CLI does offer some less obvious advantages. How much these justify the technical approach depends on the individual setup. Just to name a few:

  • Plug-ins such as the Templates plug-in can react to events generated by the client. A CLI call can, for example, trigger a note-creation event, whereas a direct filesystem change may go unnoticed by the plug-in.
  • For daily notes, naming and location preferences are handled by the client. That context is missing when accessing files directly.
  • Settings such as Excluded Files are enforced at the client level and therefore carry through to CLI operations, while they are unknown at the filesystem level.
  • The CLI also exposes application-level functionality such as frontmatter property search, task management, and link/backlink traversal.

There’s a full list of tools on the VaultGate GitHub repository.
https://github.com/mkemeter/obsidian-vaultgate-mcp#available-tools

You’re right that the Obsidian client needs to be able to run and will be opened automatically if necessary. For simple use cases, direct file access might be perfectly sufficient. But the more you rely on Obsidian’s application-level features, the more the CLI approach pays off.