Logo vun Vault MCP

Vault MCP

Communautéit
jlevere

Allow an LLM to interact with your notes in Obsidian via MCP

Editeurjlevere
Repositoryobsidian-mcp-plugin
SproochTypeScript
Forks
2
Stären
13
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    Vault MCP stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    13 Stären an 2 Forks aus dem verlinkte Repository.

Vault MCP

Validate GitHub release Downloads

This Obsidian plugin embeds an MCP (Model Context Protocol) server directly within Obsidian, providing a streamlined way for applications to interact with your vault.

Desktop Only

Installation • Features • Usage • Development • Schema Guide Notes

obsidian-settings

Features

  • Embedded MCP Server: Hosts the MCP server within Obsidian itself as a plugin, simplifying setup and improving performance
  • Vault Access via MCP: Exposes your vault through standardized tools
  • Structured Data Support: Define custom schemas for structured note creation and validation
  • File Operations:
    • Read and write files
    • Fuzzy search across your vault
    • Navigate vault structure programmatically
    • Structured data storage and access
  • Configurable: Customize server settings, tool availability, and authentication
  • Optional Authentication: Secure your server with optional Bearer token authentication.

tool-selection

auth-settings

Background

Vault MCP started as a small component of a larger project that needed an alternative to traditional RAG methods. It needed something LLMs could use to reliably retrieve and update structured, human-readable data, without relying on unpredictable vector databases or embedding fuzziness.

Existing Obsidian MCP servers weren't a great fit. They were REST-heavy, complex, and not well-suited for language models to interact with naturally. So this plugin was spun off to solve that: a lightweight interface for working with Obsidian vaults in a way that's natural for LLMs and transparent for humans.

Installation

Community Plugins (Recommended)

  1. Open Obsidian Settings > Community Plugins
  2. Search for "Vault MCP"
  3. Click Install, then Enable
  4. Configure settings as needed

Manual Installation

  1. Download the latest release zip
  2. Extract to <vault>/.obsidian/plugins/
  3. Enable in Obsidian settings

Usage

Basic Setup

  1. Enable the plugin in Obsidian's Community Plugins section
  2. Open plugin settings to configure:
  • Server Port (default: 3000)
  • Binding Host (default: 127.0.0.1; use 0.0.0.0 for LAN access)
  1. (Optional) Enable Authentication:
    • Toggle Enable Authentication
    • Copy the provided Auth Token
    • Include the token in HTTP headers: Authorization: Bearer <your_token>
  2. Click Restart Server to apply changes

Connection Methods

The plugin currently only supports Server-Sent Events (SSE) and StreamHTTP connections. For applications that require stdio connections (like Claude Desktop), you'll need to use a proxy. You can follow Cloudflare's guide on setting up a local proxy using mcp-remote.

Here is an example claude_desktop_config.json to use mcp-remote local proxy.

json
{
  "mcpServers": {
    "obsidian": {
      "command": "npx",
      "args": ["mcp-remote", "http://localhost:<your_server_port>/sse"]
    }
  }
}

You can find the correct url from the plugin's setting panel under endpoints.

Available Tools

  • obsidian-mcp-read-file: Get file contents
  • obsidian-mcp-diff-edit-file: Edit files using simplified udiff (see below)
  • obsidian-mcp-search-contents: Fuzzy search across the contents of all files in your vault
  • obsidian-mcp-search-filenames: Fuzzy search across all file names in your vault
  • obsidian-mcp-list-files: List files and directories in your vault with customizable depth and result limits
  • obsidian-mcp-upsert-file: Create or update files
  • obsidian-mcp-rollback-edit: Roll back the last edit to a markdown file (reverts the last change made by supported tools)

Highlighted tools

obsidian-mcp-diff-edit-file

This tool edits a single file by applying a simplified udiff. This is basically how Cursor and other LLM based code editors work. It is best for smarter models, as smaller ones tend to struggle to create the diffs accurately. To help with this problem, the tool returns a diff of the actual changes applied to the file. This helps the model determine whether the changes applied matched its expectations.

An example of this simplified udiff format is as follows:

diff
--- example.md
+++ example.md
@@ ... @@
-Old line of text
+New line of text

This simplified diff system is inspired by Aider's simplified diff format, you can read more about their work here

obsidian-mcp-rollback-edit

This tool allows you to revert the last change made to a markdown file by supported file-writing tools (obsidian-mcp-diff-edit-file, obsidian-mcp-upsert-file, or structured update tools). Before any of these tools modify a file, the previous content is saved in a rollback store. You can use obsidian-mcp-rollback-edit to restore the file to its previous state.

If a rollback is available, the file will be restored to its previous content, and you'll get a message with the timestamp and reason for the last change. If not, you'll get an error message.

Structured Data Edits (dynamic tools)

Create and update structured content in a typesafe manner using tools.

TL;DR LLMs are unreliable at directly editing structured formats like JSON or YAML. They break formatting or forget fields. Instead, Vault MCP defines a schema for your data and exposes it as a tool. The model then edits the structure via tool calls.

If you want to write a schema go here: Write Your Own Schemas

How it works

LLMs are just bad at working with structured data. They break formatting, inject their own formatting, forget things, etc.

Vault MCP takes a somewhat novel approach to dealing with structured data, it creates a tool that the LLM can call to make updates to a data structure.

When the LLM wants to edit the structured data, it makes a tool call where the parameters of the tool call correspond to the fields of the data structure.

Most "good" models are trained specifically to make tool calls so this is a much more stable system.

This mapping of the structured data to the tool is done in a few steps

  1. You define a schema using JSON Schema (draft-07), written in YAML.
  2. Vault MCP validates it using a built-in metaschema
  3. The schema is converted to a zod
  4. A tool is dynamically created from that schema

Schemas

Each schema has two sections:

  1. metadata Defines file naming and storage details
  2. fields Defines the structure of your data (used to generate the Zod tool)

The schemas are json schema draft 07, but written in yaml for better usability. To be able to do this dynamic tool generation, the plugin needs to know both the structure of the structured data, but also some metadata about file names, locations etc.

User Schemas

yaml
metadata:
  schemaName: "Recipe"
  description: |
    Updates a recipe file given a schema and identifiers. Creates the file if it doesn't exist.
    Uses the Recipe Schema. It merges new non-default data into existing frontmatter.
  identifierField: "recipe_id"
  pathTemplate: "Recipes/${category}/${recipe_id}/Recipe.md"
  pathComponents:
    - category
    - recipe_id

fields:
  recipe_id:
    type: "string"
    description: "Unique identifier for the recipe (e.g., `chocolate_chip_cookies`)."
    optional: false

  category:
    type: "string"
    description: "Recipe category for organizing files (e.g., `Desserts`)."
    optional: false

  title:
    type: "string"
    description: "Name of the recipe (e.g., `Chocolate Chip Cookies`)."
    optional: true

  description:
    type: "string"
    description: "Brief description of the recipe and its highlights."
    optional: true

  servings:
    type: "number"
    description: "Number of servings the recipe yields (must be at least 1)."
    optional: true
    minimum: 1
    maximum: 100
    default: 4

  ingredients:
    type: "array"
    description: "List of ingredients required for the recipe."
    optional: true
    items:
      type: "object"
      properties:
        name:
          type: "string"
          description: "The name of the ingredient (e.g., `all-purpose flour`)."
          optional: false
        quantity:
          type: "string"
          description: "Amount needed (e.g., `2 cups`, `1 tsp`)."
          optional: true

          
---

This generates an MCP tool that looks like this:

mcp-schema-tool

When you use it to put data into Obsidian the result looks like this:

Obsidian-schema-tool

Meta Schema

To validate that the user defined schema contains the required components we have a meta schema defined in json schema. You can read the file here

It also helps narrow the types to something that can be converted into zod more clearly.

You can use it to see a list of types and modifiers you can use such as default values, minimum and maximum etc.

yaml
"$schema": http://json-schema.org/draft-07/schema#
title: MCP Structured Document Schema (JSON Schema Valid)
description: Strict meta-schema for structured tools using zod compatible fields.
type: object
required:
  - metadata
  - fields
properties:
metadata:
  type: object
  required:
    - schemaName
    - description
    - identifierField
    - pathTemplate
    - pathComponents
  properties:
    schemaName:
      type: string
    description:
      type: string
    identifierField:
      type: string
    pathTemplate:
      type: string
    pathComponents:
      type: array
      items:
        type: string
  additionalProperties: false
fields:
  type: object
  patternProperties:
    "^[a-zA-Z_][a-zA-Z0-9_]*$":
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - string
            - number
            - boolean
            - date
            - array
            - object
            - literal
            - unknown
            - any
        description:
          type: string
        default: {}
        minimum:
          type: number
        maximum:
          type: number
        enum:
          type: array
          items: {}
        items:
          type: object
        properties:
          type: object
        required:
          type: array
          items:
            type: string
      additionalProperties: true
  additionalProperties: false
additionalProperties: false

Writing your own schemas

Start by thinking about two things:

  • Where and how will the file be stored?

Use metadata to describe filename templates and how to identify a file (e.g. by ID).

  • What structured data will be in the file?

Use fields to define the structure using types like string, number, array, object, and modifiers like default, minimum, etc.

Once defined, your schema will automatically become a tool the LLM can use to update that file type.

Place the schema that you write into a "schema" directory in your obsidian vault. The schema should be defined in a markdown file contained within a codeblock with the syntax setting like this:

md
```yaml schema

There can be other text in the same markdown such as notes or descriptions, but Vault MCP will only use the yaml defined in the specified codeblock above.

Place this directory path into the dynamic tools settings in Vault MCP settings and restart the plugin to parse and generate the dynamic tools. They will populate in the settings panel like this:

dynamic settings

The list-schemas tool is automatically created when the dynamic tools are to allow clients to view the schemas directly if necessary.

Obsidian will render the YAML structure as a nicely formatted frontmatter or embedded block in your markdown.

When writing schemas, I found this tool particularly helpful stefanterdell.github.io/json-schema-to-zod-react. Vault MCP uses this internally to generate the zod but this is a more visual method to help in troubleshooting.

Development

Prerequisites

A nix flake is provided to create a standardized development environment.

Setup Development Environment

bash

git clone https://github.com/jlevere/obsidian-mcp-plugin.git
cd obsidian-mcp-plugin

nix develop

# for cool people who use direnv
# echo "use flake" > .envrc && direnv allow

pnpm install

pnpm build:dev

Project Structure

  • src/: Source code
    • managers/: Core functionality managers
    • structured-tools/: Schema validation and tools
    • utils/: Helper utilities
    • vault/: Vault interaction code
  • tests/: Test files

Build Production

bash
pnpm run build

Notes

  • This plugin is only supported on desktop Obsidian.
  • Authentication bearer tokens are stored in the plugin data.json file. This token can be rolled on demand.

Contributing

Contributions are welcome! Please feel free to open an issue or pull request.

Credits

License

This project is licensed under the MIT License - see the LICENSE file for details.

Vault MCP MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Vault MCP verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Vault MCP als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu Vault MCP an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "jlevere-obsidian-mcp-plugin": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu Vault MCP. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu Vault MCP.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat Vault MCP?
Vault MCP
Jo. Ech hunn et gelies.
Dat hunn ech mat Vault MCP fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server Vault MCP benotzt?

Vault MCP ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Vault MCP MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Vault MCP mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat Vault MCP MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Vault MCP verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech Vault MCP MCP mat TypingMind?

Vault MCP leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Vault MCP MCP an TypingMind zur Verfügung?

Vault MCP stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Vault MCP MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Vault MCP eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇