neuro-vault-mcp 5.5.3 → 7.0.0
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 +37 -1
- package/dist/cli.d.ts +58 -49
- package/dist/cli.js +3262 -2934
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -97,6 +97,8 @@ For module wiring and internal data flow, see [docs/architecture/module-structur
|
|
|
97
97
|
npm install -g neuro-vault-mcp
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
+
### Single vault
|
|
101
|
+
|
|
100
102
|
Add to your MCP client config (here: Claude Code's `~/.claude/settings.json`):
|
|
101
103
|
|
|
102
104
|
```json
|
|
@@ -110,6 +112,38 @@ Add to your MCP client config (here: Claude Code's `~/.claude/settings.json`):
|
|
|
110
112
|
}
|
|
111
113
|
```
|
|
112
114
|
|
|
115
|
+
### 🗂 Multi-vault — two vaults, one server
|
|
116
|
+
|
|
117
|
+
Pass `--vault` once per vault:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
neuro-vault-mcp \
|
|
121
|
+
--vault /Users/me/Vaults/Sandbox \
|
|
122
|
+
--vault /Users/me/Vaults/TeamWiki
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Two vaults registered, with names `Sandbox` and `TeamWiki`. In your MCP config:
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"mcpServers": {
|
|
130
|
+
"neuro-vault": {
|
|
131
|
+
"command": "neuro-vault-mcp",
|
|
132
|
+
"args": ["--vault", "/Users/me/Vaults/Sandbox", "--vault", "/Users/me/Vaults/TeamWiki"]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Two vaults cannot share the same directory basename — the basename doubles as the alias and must be unique. If you have a basename collision, rename one of the directories.
|
|
139
|
+
|
|
140
|
+
With multiple vaults registered:
|
|
141
|
+
|
|
142
|
+
- **Every tool** accepts an optional `vault: "<name>"` parameter to target a specific vault.
|
|
143
|
+
- **`search_notes`, `query_notes`, and `get_vault_overview`** fan out across all registered vaults when `vault` is omitted. The response shape switches to `results_by_vault: [...]` (one entry per vault) plus `skipped_vaults: [...]` for any vault the tool could not reach.
|
|
144
|
+
- **All other tools** (writes, reads of specific paths, single-vault diagnostics) require an explicit `vault` in multi-vault mode. Omitting it returns `VAULT_REQUIRED`.
|
|
145
|
+
- **Semantic fan-out** silently skips vaults whose Smart Connections `.smart-env/multi/` index is unavailable. Targeting such a vault explicitly with `vault: "<name>"` returns `SEMANTIC_INDEX_NOT_FOUND`.
|
|
146
|
+
|
|
113
147
|
Then ask your assistant:
|
|
114
148
|
|
|
115
149
|
> "What did I write about building AI agents?"
|
|
@@ -122,13 +156,15 @@ For other clients (Cursor / Windsurf / npx), see [docs/guide/installation.md](./
|
|
|
122
156
|
|
|
123
157
|
## 📚 Documentation
|
|
124
158
|
|
|
159
|
+
> **Every tool accepts an optional `vault` parameter.** In multi-vault mode, `search_notes`, `query_notes`, and `get_vault_overview` fan out across all registered vaults when `vault` is omitted.
|
|
160
|
+
|
|
125
161
|
User guide lives in [`docs/guide/`](./docs/guide/README.md):
|
|
126
162
|
|
|
127
163
|
- [Installation](./docs/guide/installation.md)
|
|
128
164
|
- [Semantic Search](./docs/guide/semantic-search.md) — `search_notes`, `get_similar_notes`, `find_duplicates`, `get_stats`
|
|
129
165
|
- [Vault Operations](./docs/guide/vault-operations.md) — note CRUD, daily notes, properties, tags, structured queries (`query_notes`), vault snapshot (`get_vault_overview`)
|
|
130
166
|
- [Routing Between Tools](./docs/guide/routing.md)
|
|
131
|
-
- [Configuration](./docs/guide/configuration.md) — CLI args, troubleshooting, limitations,
|
|
167
|
+
- [Configuration](./docs/guide/configuration.md) — CLI args, troubleshooting, limitations, development
|
|
132
168
|
|
|
133
169
|
Architecture / internals: [`docs/architecture/`](./docs/architecture/).
|
|
134
170
|
|
package/dist/cli.d.ts
CHANGED
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
3
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
4
|
|
|
5
|
-
interface BasenameIndex {
|
|
6
|
-
resolve(target: string): string | null;
|
|
7
|
-
resolveAll(target: string): string[];
|
|
8
|
-
}
|
|
9
|
-
|
|
10
5
|
interface SmartBlock {
|
|
11
6
|
key: string;
|
|
12
7
|
heading: string;
|
|
@@ -19,14 +14,6 @@ interface SmartSource {
|
|
|
19
14
|
blocks: SmartBlock[];
|
|
20
15
|
}
|
|
21
16
|
|
|
22
|
-
interface CorpusSnapshot {
|
|
23
|
-
sources: Map<string, SmartSource>;
|
|
24
|
-
basenameIndex: BasenameIndex;
|
|
25
|
-
}
|
|
26
|
-
interface SmartConnectionsCorpusIndex {
|
|
27
|
-
snapshot(): Promise<CorpusSnapshot>;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
17
|
type ReadNotesField = 'frontmatter' | 'content';
|
|
31
18
|
interface ReadNotesItemSuccess {
|
|
32
19
|
path: string;
|
|
@@ -130,19 +117,19 @@ interface SearchEngine {
|
|
|
130
117
|
threshold: number;
|
|
131
118
|
}): DuplicatePair[];
|
|
132
119
|
}
|
|
133
|
-
type PathExistsCheck = (vaultRelativePath: string) => Promise<boolean>;
|
|
134
120
|
|
|
135
|
-
interface
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
121
|
+
interface ReplaceInNoteInput {
|
|
122
|
+
path: string;
|
|
123
|
+
find: string;
|
|
124
|
+
content: string;
|
|
125
|
+
}
|
|
126
|
+
interface ReplaceFullBodyInput {
|
|
127
|
+
path: string;
|
|
128
|
+
content: string;
|
|
129
|
+
}
|
|
130
|
+
interface VaultWriter {
|
|
131
|
+
replaceInNote(input: ReplaceInNoteInput): Promise<void>;
|
|
132
|
+
replaceFullBody(input: ReplaceFullBodyInput): Promise<void>;
|
|
146
133
|
}
|
|
147
134
|
|
|
148
135
|
type NoteIdentifier = {
|
|
@@ -204,6 +191,48 @@ interface VaultProvider {
|
|
|
204
191
|
listTags(): Promise<TagListEntry[]>;
|
|
205
192
|
}
|
|
206
193
|
|
|
194
|
+
interface BasenameIndex {
|
|
195
|
+
resolve(target: string): string | null;
|
|
196
|
+
resolveAll(target: string): string[];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
interface CorpusSnapshot {
|
|
200
|
+
sources: Map<string, SmartSource>;
|
|
201
|
+
basenameIndex: BasenameIndex;
|
|
202
|
+
}
|
|
203
|
+
interface SmartConnectionsCorpusIndex {
|
|
204
|
+
snapshot(): Promise<CorpusSnapshot>;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
interface IVaultEntryDeps {
|
|
208
|
+
readerFactory: (opts: {
|
|
209
|
+
vaultRoot: string;
|
|
210
|
+
}) => VaultReader;
|
|
211
|
+
writerFactory: (opts: {
|
|
212
|
+
vaultRoot: string;
|
|
213
|
+
}) => VaultWriter;
|
|
214
|
+
graphFactory: (opts: {
|
|
215
|
+
reader: VaultReader;
|
|
216
|
+
}) => WikilinkGraphIndex;
|
|
217
|
+
listMatchingPathsFactory: (opts: {
|
|
218
|
+
reader: VaultReader;
|
|
219
|
+
graph: WikilinkGraphIndex;
|
|
220
|
+
}) => ListMatchingPaths;
|
|
221
|
+
providerFactory: (opts: {
|
|
222
|
+
vaultName: string;
|
|
223
|
+
binaryPath?: string;
|
|
224
|
+
}) => VaultProvider;
|
|
225
|
+
corpusFactory: (opts: {
|
|
226
|
+
smartEnvPath: string;
|
|
227
|
+
modelKey: string;
|
|
228
|
+
}) => Promise<SmartConnectionsCorpusIndex>;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
interface ISemanticModuleDeps {
|
|
232
|
+
embeddingServiceFactory?: (modelId: string) => EmbeddingProvider;
|
|
233
|
+
searchEngine?: SearchEngine;
|
|
234
|
+
}
|
|
235
|
+
|
|
207
236
|
type ExecFn = (binary: string, args: string[], options: {
|
|
208
237
|
timeout: number;
|
|
209
238
|
}) => Promise<{
|
|
@@ -217,35 +246,15 @@ interface ObsidianCLIProviderOptions {
|
|
|
217
246
|
exec?: ExecFn;
|
|
218
247
|
}
|
|
219
248
|
|
|
220
|
-
interface
|
|
221
|
-
path: string;
|
|
222
|
-
find: string;
|
|
223
|
-
content: string;
|
|
224
|
-
}
|
|
225
|
-
interface ReplaceFullBodyInput {
|
|
226
|
-
path: string;
|
|
227
|
-
content: string;
|
|
228
|
-
}
|
|
229
|
-
interface VaultWriter {
|
|
230
|
-
replaceInNote(input: ReplaceInNoteInput): Promise<void>;
|
|
231
|
-
replaceFullBody(input: ReplaceFullBodyInput): Promise<void>;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
interface OperationsModuleDeps {
|
|
249
|
+
interface IOperationsModuleDeps {
|
|
235
250
|
vaultProviderFactory?: (opts: ObsidianCLIProviderOptions) => VaultProvider;
|
|
236
|
-
vaultReaderFactory?: (opts: {
|
|
237
|
-
vaultRoot: string;
|
|
238
|
-
}) => VaultReader;
|
|
239
|
-
vaultWriterFactory?: (opts: {
|
|
240
|
-
vaultRoot: string;
|
|
241
|
-
}) => VaultWriter;
|
|
242
|
-
graph?: WikilinkGraphIndex;
|
|
243
251
|
}
|
|
244
252
|
|
|
245
253
|
type ToolServer = Pick<McpServer, 'registerTool' | 'registerResource' | 'connect'>;
|
|
246
254
|
interface NeuroVaultStartupDependencies {
|
|
247
|
-
semantic?:
|
|
248
|
-
operations?:
|
|
255
|
+
semantic?: ISemanticModuleDeps;
|
|
256
|
+
operations?: IOperationsModuleDeps;
|
|
257
|
+
vaultEntryDeps?: Partial<IVaultEntryDeps>;
|
|
249
258
|
serverFactory?: (instructions: string) => ToolServer;
|
|
250
259
|
transportFactory?: () => StdioServerTransport;
|
|
251
260
|
}
|