neuro-vault-mcp 1.2.0 → 1.3.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/dist/cli.js +32 -8
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -37,6 +37,7 @@ async function parseConfig(argv) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
// src/server.ts
|
|
40
|
+
import { createRequire } from "module";
|
|
40
41
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
41
42
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
42
43
|
|
|
@@ -14425,8 +14426,8 @@ function createToolHandlers({
|
|
|
14425
14426
|
}
|
|
14426
14427
|
|
|
14427
14428
|
// src/server.ts
|
|
14428
|
-
var
|
|
14429
|
-
var SERVER_VERSION = "
|
|
14429
|
+
var require2 = createRequire(import.meta.url);
|
|
14430
|
+
var { name: SERVER_NAME, version: SERVER_VERSION } = require2("../package.json");
|
|
14430
14431
|
var searchNotesSchema = external_exports.object({
|
|
14431
14432
|
query: external_exports.string(),
|
|
14432
14433
|
limit: external_exports.number().int().positive().optional(),
|
|
@@ -14440,11 +14441,34 @@ var getSimilarNotesSchema = external_exports.object({
|
|
|
14440
14441
|
var findDuplicatesSchema = external_exports.object({
|
|
14441
14442
|
threshold: external_exports.number().min(0).max(1).optional()
|
|
14442
14443
|
});
|
|
14444
|
+
var SERVER_INSTRUCTIONS = `This server provides semantic search over an Obsidian vault using Smart Connections embeddings.
|
|
14445
|
+
|
|
14446
|
+
## Search strategy
|
|
14447
|
+
|
|
14448
|
+
Semantic search works best with short, focused queries (1-4 words). Long sentences or full questions dilute the signal and often return no results.
|
|
14449
|
+
|
|
14450
|
+
When looking for information:
|
|
14451
|
+
1. Extract the core nouns and concepts from the user's message \u2014 strip away filler words, verbs, and context. For example, from "remind me what I wanted to build with LLM agents" the key concepts are "LLM", "agents", "build" \u2014 not the full sentence.
|
|
14452
|
+
2. Start with several SHORT keyword queries rather than one long phrase. Search each key concept separately and in small combinations. For example, try: "LLM", "agents", "LLM agents", "AI projects".
|
|
14453
|
+
3. Try synonyms and reformulations \u2014 the note may use different wording than the query.
|
|
14454
|
+
3. The vault may contain notes in multiple languages. Try queries in each language the user speaks (e.g. both Ukrainian and English).
|
|
14455
|
+
4. If a search returns no results, lower the threshold to 0.3 before giving up.
|
|
14456
|
+
5. Once you find a relevant note, use get_similar_notes to discover related content.
|
|
14457
|
+
|
|
14458
|
+
## Reading results
|
|
14459
|
+
|
|
14460
|
+
Search results include block headings and line ranges \u2014 use these as pointers to read specific sections of the matched notes rather than reading entire files.
|
|
14461
|
+
`;
|
|
14443
14462
|
function defaultServerFactory() {
|
|
14444
|
-
return new McpServer(
|
|
14445
|
-
|
|
14446
|
-
|
|
14447
|
-
|
|
14463
|
+
return new McpServer(
|
|
14464
|
+
{
|
|
14465
|
+
name: SERVER_NAME,
|
|
14466
|
+
version: SERVER_VERSION
|
|
14467
|
+
},
|
|
14468
|
+
{
|
|
14469
|
+
instructions: SERVER_INSTRUCTIONS
|
|
14470
|
+
}
|
|
14471
|
+
);
|
|
14448
14472
|
}
|
|
14449
14473
|
function defaultTransportFactory() {
|
|
14450
14474
|
return new StdioServerTransport();
|
|
@@ -14517,7 +14541,7 @@ function createNeuroVaultServer({
|
|
|
14517
14541
|
"search_notes",
|
|
14518
14542
|
{
|
|
14519
14543
|
title: "Search Notes",
|
|
14520
|
-
description: "Search
|
|
14544
|
+
description: "Search notes by semantic similarity. Use short keyword queries (1-4 words), not full sentences. Make multiple calls with different keywords, synonyms, and languages to get comprehensive results. Lower the threshold (e.g. 0.3) if no results are found.",
|
|
14521
14545
|
inputSchema: searchNotesSchema
|
|
14522
14546
|
},
|
|
14523
14547
|
async (args) => invokeTool(() => handlers.searchNotes(args))
|
|
@@ -14526,7 +14550,7 @@ function createNeuroVaultServer({
|
|
|
14526
14550
|
"get_similar_notes",
|
|
14527
14551
|
{
|
|
14528
14552
|
title: "Get Similar Notes",
|
|
14529
|
-
description:
|
|
14553
|
+
description: 'Find notes similar to a given note. Use this after search_notes finds a relevant note \u2014 it discovers related content without needing a text query. Pass a vault-relative POSIX path (e.g. "Folder/note.md").',
|
|
14530
14554
|
inputSchema: getSimilarNotesSchema
|
|
14531
14555
|
},
|
|
14532
14556
|
async (args) => invokeTool(() => handlers.getSimilarNotes(args))
|