@bitbonsai/mcpvault 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -62
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://mcptoplist.com/server/glama%2Fbitbonsai%2Fmcpvault)
|
|
6
6
|
|
|
7
|
-
A
|
|
7
|
+
A local MCP server that lets compatible clients read, search, and edit notes in an Obsidian vault. MCPVault works directly with vault files, restricts file operations to the configured vault root, and preserves formatting for unchanged frontmatter fields.
|
|
8
8
|
|
|
9
9
|
<div align="center">
|
|
10
10
|
|
|
@@ -20,18 +20,18 @@ A universal AI bridge for Obsidian vaults using the Model Context Protocol (MCP)
|
|
|
20
20
|
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Supported clients
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Configuration examples are available for Claude Desktop, Claude Code, ChatGPT Desktop (Enterprise+), OpenCode, Gemini CLI, OpenAI Codex, IntelliJ IDEA 2025.1+, Cursor, Windsurf, and Ontheia. Other clients can use MCPVault if they support local stdio MCP servers.
|
|
26
26
|
|
|
27
27
|
https://github.com/user-attachments/assets/657ac4c6-1cd2-4cc3-829f-fd095a32f71c
|
|
28
28
|
|
|
29
|
-
## Quick
|
|
29
|
+
## Quick start
|
|
30
30
|
|
|
31
31
|
1. **Install Node.js runtime:**
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
# Download from https://nodejs.org (
|
|
34
|
+
# Download from https://nodejs.org (v20.0.0 or later)
|
|
35
35
|
# or use a package manager like nvm, brew, apt, etc.
|
|
36
36
|
```
|
|
37
37
|
|
|
@@ -99,57 +99,41 @@ https://github.com/user-attachments/assets/657ac4c6-1cd2-4cc3-829f-fd095a32f71c
|
|
|
99
99
|
- "Read my note called 'project-ideas.md'"
|
|
100
100
|
- "Create a new note with today's date"
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
To verify the connection, ask your client to list MCPVault tools or read a known note.
|
|
103
103
|
|
|
104
|
-
##
|
|
104
|
+
## How it connects
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
Built on the open Model Context Protocol standard, MCPVault is not locked to any single AI provider. As more AI assistants adopt MCP, your investment in this tool grows more valuable. Today it works with Claude and ChatGPT - tomorrow it will work with whatever AI tools emerge.
|
|
109
|
-
|
|
110
|
-
### Future-Proof Your Knowledge Base
|
|
111
|
-
|
|
112
|
-
Instead of waiting for each AI company to build Obsidian integrations, MCPVault provides a universal adapter that works with any MCP-compatible assistant. One tool, endless possibilities.
|
|
113
|
-
|
|
114
|
-
### Open Standard, No Lock-in
|
|
115
|
-
|
|
116
|
-
MCP is an open protocol. You're not tied to any specific vendor or platform. Your notes remain yours, accessible through any compatible AI assistant.
|
|
106
|
+
An MCP client starts MCPVault as a local stdio process and passes the vault path. MCPVault exposes the same tools to each supported client, so the server is not tied to one AI provider. Obsidian does not need to be running, and no Obsidian plugin is required.
|
|
117
107
|
|
|
118
108
|
## Features
|
|
119
109
|
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
110
|
+
- AST-aware frontmatter updates preserve formatting for unchanged YAML fields.
|
|
111
|
+
- Path checks block traversal, symlink escapes, dotfiles, `.obsidian`, `.git`, and `node_modules`.
|
|
112
|
+
- Eighteen MCP tools cover note and file operations:
|
|
123
113
|
- File operations: `read_note`, `write_note`, `patch_note`, `delete_note`, `move_note`, `move_file`
|
|
124
|
-
- Partial reads: `get_note_outline
|
|
125
|
-
- Directory
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
- ✅ TypeScript support with Node.js runtime (using tsx for execution)
|
|
136
|
-
- ✅ Comprehensive error handling and validation
|
|
137
|
-
- ✅ **Token-optimized responses**: 40-60% smaller responses with minified field names and compact JSON (v0.6.3+)
|
|
138
|
-
- ✅ **Optional pretty-printing**: Set `prettyPrint: true` for human-readable debugging
|
|
139
|
-
- ✅ **Performance optimized**: No unnecessary token consumption, efficient for large vaults
|
|
140
|
-
- ✅ **Zero dependencies**: No Obsidian plugins required, works with any vault structure
|
|
114
|
+
- Partial reads: `get_note_outline`, `read_note_lines`
|
|
115
|
+
- Directory and batch reads: `list_directory`, `read_multiple_notes`
|
|
116
|
+
- Search: `search_notes` with multi-word matching and BM25 reranking
|
|
117
|
+
- Metadata and tags: `get_frontmatter`, `update_frontmatter`, `get_notes_info`, `get_vault_stats`, `manage_tags`, `list_all_tags`
|
|
118
|
+
- Wiki links: `wiki_link` resolves names and returns alternative paths when a name is ambiguous
|
|
119
|
+
- `write_note` supports overwrite, append, and prepend modes.
|
|
120
|
+
- `delete_note` and `move_file` require matching confirmation paths.
|
|
121
|
+
- Path arguments are trimmed before validation.
|
|
122
|
+
- Search and batch tools return compact fields by default; set `prettyPrint: true` for expanded output.
|
|
123
|
+
- The package exports TypeScript declarations and public types.
|
|
124
|
+
- MCPVault requires no Obsidian plugin.
|
|
141
125
|
|
|
142
126
|
## Prerequisites
|
|
143
127
|
|
|
144
|
-
- [Node.js](https://nodejs.org) runtime (
|
|
128
|
+
- [Node.js](https://nodejs.org) runtime (v20.0.0 or later)
|
|
145
129
|
- An Obsidian vault (local directory with `.md`, `.markdown`, `.txt`, `.base`, or `.canvas` files)
|
|
146
130
|
- MCP-compatible AI client (Claude Desktop, ChatGPT Desktop, Claude Code, etc.)
|
|
147
131
|
|
|
148
132
|
## Installation
|
|
149
133
|
|
|
150
|
-
### For
|
|
134
|
+
### For end users
|
|
151
135
|
|
|
152
|
-
|
|
136
|
+
`npx` downloads and runs the package:
|
|
153
137
|
|
|
154
138
|
```bash
|
|
155
139
|
npx @bitbonsai/mcpvault@latest /path/to/your/obsidian/vault
|
|
@@ -157,7 +141,7 @@ npx @bitbonsai/mcpvault@latest /path/to/your/obsidian/vault
|
|
|
157
141
|
|
|
158
142
|
If you omit the vault path, the server uses your current working directory as the vault root.
|
|
159
143
|
|
|
160
|
-
### For
|
|
144
|
+
### For developers
|
|
161
145
|
|
|
162
146
|
1. Clone this repository
|
|
163
147
|
2. Use the correct Node.js version:
|
|
@@ -178,7 +162,7 @@ npm install # Corepack automatically uses npm 10.9.0
|
|
|
178
162
|
npx @modelcontextprotocol/inspector npm start /path/to/your/vault
|
|
179
163
|
```
|
|
180
164
|
|
|
181
|
-
|
|
165
|
+
Use MCP Inspector to test the server before adding it to a client:
|
|
182
166
|
|
|
183
167
|
```bash
|
|
184
168
|
# Install globally for easier access
|
|
@@ -375,12 +359,12 @@ Most modern MCP clients use similar JSON configuration patterns. Refer to your s
|
|
|
375
359
|
- "List all markdown files in my 'Projects' folder"
|
|
376
360
|
- "Delete the old draft note 'draft-ideas.md' (with confirmation)"
|
|
377
361
|
|
|
378
|
-
####
|
|
362
|
+
#### Example workflows
|
|
379
363
|
|
|
380
|
-
-
|
|
381
|
-
-
|
|
382
|
-
-
|
|
383
|
-
-
|
|
364
|
+
- "Summarize my research notes tagged with 'machine-learning' from the last month"
|
|
365
|
+
- "Update the status in my project notes to 'completed' and add today's date"
|
|
366
|
+
- "Find notes that mention 'API design' and draft a guide from them"
|
|
367
|
+
- "Review my untagged notes and suggest tags based on their content"
|
|
384
368
|
|
|
385
369
|
## Troubleshooting
|
|
386
370
|
|
|
@@ -459,7 +443,7 @@ Read a note from the vault with parsed frontmatter.
|
|
|
459
443
|
}
|
|
460
444
|
```
|
|
461
445
|
|
|
462
|
-
**
|
|
446
|
+
**Compact response:**
|
|
463
447
|
|
|
464
448
|
```json
|
|
465
449
|
{
|
|
@@ -536,7 +520,7 @@ Write a note to the vault with optional frontmatter and write mode.
|
|
|
536
520
|
|
|
537
521
|
### `patch_note`
|
|
538
522
|
|
|
539
|
-
|
|
523
|
+
Replace an exact string inside an existing note without rewriting the full file.
|
|
540
524
|
|
|
541
525
|
**Request:**
|
|
542
526
|
|
|
@@ -592,7 +576,7 @@ Note: this includes non-note filenames (for example `pdf`, `png`, `jpg`) so AI a
|
|
|
592
576
|
}
|
|
593
577
|
```
|
|
594
578
|
|
|
595
|
-
**
|
|
579
|
+
**Compact response:**
|
|
596
580
|
|
|
597
581
|
```json
|
|
598
582
|
{
|
|
@@ -643,7 +627,7 @@ Delete a note from the vault (requires confirmation for safety).
|
|
|
643
627
|
}
|
|
644
628
|
```
|
|
645
629
|
|
|
646
|
-
|
|
630
|
+
**Confirmation:** `confirmPath` must exactly match `path` before deletion proceeds.
|
|
647
631
|
|
|
648
632
|
### `get_frontmatter`
|
|
649
633
|
|
|
@@ -661,7 +645,7 @@ Extract only the frontmatter from a note without reading the full content.
|
|
|
661
645
|
}
|
|
662
646
|
```
|
|
663
647
|
|
|
664
|
-
**
|
|
648
|
+
**Compact response, returning frontmatter directly:**
|
|
665
649
|
|
|
666
650
|
```json
|
|
667
651
|
{
|
|
@@ -745,7 +729,7 @@ Search for notes in the vault by content or frontmatter with multi-word matching
|
|
|
745
729
|
}
|
|
746
730
|
```
|
|
747
731
|
|
|
748
|
-
**
|
|
732
|
+
**Compact response:**
|
|
749
733
|
|
|
750
734
|
```json
|
|
751
735
|
[
|
|
@@ -827,7 +811,7 @@ Move or rename any file in the vault with binary-safe file operations (file-only
|
|
|
827
811
|
}
|
|
828
812
|
```
|
|
829
813
|
|
|
830
|
-
**
|
|
814
|
+
**Confirmation:** `confirmOldPath` must match `oldPath`, and `confirmNewPath` must match `newPath`.
|
|
831
815
|
|
|
832
816
|
### `read_multiple_notes`
|
|
833
817
|
|
|
@@ -847,7 +831,7 @@ Read multiple notes in a batch (maximum 10 files).
|
|
|
847
831
|
}
|
|
848
832
|
```
|
|
849
833
|
|
|
850
|
-
**
|
|
834
|
+
**Compact response:**
|
|
851
835
|
|
|
852
836
|
```json
|
|
853
837
|
{
|
|
@@ -911,7 +895,7 @@ Get metadata for notes without reading full content.
|
|
|
911
895
|
}
|
|
912
896
|
```
|
|
913
897
|
|
|
914
|
-
**
|
|
898
|
+
**Compact response, returning an array directly:**
|
|
915
899
|
|
|
916
900
|
```json
|
|
917
901
|
[
|
|
@@ -940,7 +924,7 @@ Get high-level vault statistics without reading note contents.
|
|
|
940
924
|
}
|
|
941
925
|
```
|
|
942
926
|
|
|
943
|
-
**
|
|
927
|
+
**Compact response:**
|
|
944
928
|
|
|
945
929
|
```json
|
|
946
930
|
{
|
|
@@ -957,9 +941,9 @@ Get high-level vault statistics without reading note contents.
|
|
|
957
941
|
}
|
|
958
942
|
```
|
|
959
943
|
|
|
960
|
-
## Security
|
|
944
|
+
## Security boundaries
|
|
961
945
|
|
|
962
|
-
|
|
946
|
+
MCPVault applies these checks before file operations:
|
|
963
947
|
|
|
964
948
|
### Path Security
|
|
965
949
|
|
|
@@ -992,13 +976,13 @@ This MCP server implements several security measures to protect your Obsidian va
|
|
|
992
976
|
- **Vault Structure:** Directory structure is visible to AI assistants
|
|
993
977
|
- **File Metadata:** Creation times, file sizes, etc. are accessible
|
|
994
978
|
|
|
995
|
-
|
|
979
|
+
Only grant write access to clients and conversations you trust. Use `--read-only` when the client does not need to modify notes.
|
|
996
980
|
|
|
997
981
|
## Architecture
|
|
998
982
|
|
|
999
983
|
- `server.ts` - MCP server entry point
|
|
1000
984
|
- `src/frontmatter.ts` - YAML frontmatter handling with gray-matter
|
|
1001
|
-
- `src/filesystem.ts` -
|
|
985
|
+
- `src/filesystem.ts` - File operations with path validation
|
|
1002
986
|
- `src/pathfilter.ts` - Directory and file filtering
|
|
1003
987
|
- `src/search.ts` - Note search functionality with content and frontmatter support
|
|
1004
988
|
- `src/uri.ts` - Obsidian URI generation for deep links
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitbonsai/mcpvault",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Universal AI bridge for Obsidian vaults - connect any MCP-compatible assistant",
|
|
5
5
|
"homepage": "https://mcpvault.org",
|
|
6
6
|
"author": "bitbonsai",
|
|
@@ -39,18 +39,18 @@
|
|
|
39
39
|
"ship:update": "bun scripts/ship.ts --update"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@modelcontextprotocol/server": "^2.
|
|
42
|
+
"@modelcontextprotocol/server": "^2.3.1",
|
|
43
43
|
"gray-matter": "^4.0.3",
|
|
44
|
-
"trash": "
|
|
44
|
+
"trash": "9.0.0",
|
|
45
45
|
"yaml": "^2.9.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@clack/prompts": "^
|
|
49
|
-
"@modelcontextprotocol/client": "^2.
|
|
48
|
+
"@clack/prompts": "^1.7.0",
|
|
49
|
+
"@modelcontextprotocol/client": "^2.3.1",
|
|
50
50
|
"@types/node": "^26.1.2",
|
|
51
51
|
"tsx": "^4.23.9",
|
|
52
52
|
"typescript": "^7.0.2",
|
|
53
|
-
"vitest": "^4.1.
|
|
53
|
+
"vitest": "^4.1.12"
|
|
54
54
|
},
|
|
55
55
|
"engines": {
|
|
56
56
|
"node": ">=20.0.0"
|