@syndash/research-vault-mcp 1.1.0 → 1.1.2
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 +80 -34
- package/bin/research-vault-mcp.mjs +37 -21
- package/dist/server.js +1154 -0
- package/package.json +6 -4
- package/src/ingest/html.ts +42 -0
- package/src/server.ts +11 -6
package/README.md
CHANGED
|
@@ -1,75 +1,121 @@
|
|
|
1
1
|
# @syndash/research-vault-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Research Vault is the memory/search module inside **Evensong**. This package exposes it as an MCP server for agents that speak the Model Context Protocol.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
**Home**: [github.com/Fearvox/Evensong](https://github.com/Fearvox/Evensong) — `packages/research-vault-mcp/`
|
|
7
|
-
**Status**: Wave 3+ — not yet published to npm. Plan: `docs/superpowers/plans/2026-04-19-wave2d-submodule-mcp-package-prep.md`.
|
|
5
|
+
It is not the whole Evensong product. Evensong is the hub: runtime, benchmark evidence, handoff pages, and modules. Research Vault MCP is the installable knowledge-base module.
|
|
8
6
|
|
|
9
|
-
## Install
|
|
7
|
+
## Install
|
|
10
8
|
|
|
11
9
|
```bash
|
|
12
|
-
#
|
|
13
|
-
|
|
10
|
+
# MCP clients usually launch the package for you.
|
|
11
|
+
# The npm shim still delegates runtime execution to Bun.
|
|
12
|
+
npx @syndash/research-vault-mcp --transport=stdio
|
|
14
13
|
|
|
15
|
-
#
|
|
16
|
-
|
|
14
|
+
# Bun direct launch:
|
|
15
|
+
bunx @syndash/research-vault-mcp --transport=stdio
|
|
17
16
|
```
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
Default transport is `stdio`, because command-launched MCP servers are expected to speak JSON-RPC over stdin/stdout. Install [Bun](https://bun.sh) before using either `npx` or `bunx`; the server itself is Bun-native.
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
Use SSE only when you explicitly want a long-running HTTP server:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
MCP_PORT=8765 npx @syndash/research-vault-mcp --transport=sse
|
|
24
|
+
# health: http://127.0.0.1:8765/health
|
|
25
|
+
# sse: http://127.0.0.1:8765/sse
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Configure an MCP client
|
|
29
|
+
|
|
30
|
+
Claude Desktop / Claude Code style config:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"mcpServers": {
|
|
35
|
+
"research_vault": {
|
|
36
|
+
"command": "npx",
|
|
37
|
+
"args": ["-y", "@syndash/research-vault-mcp", "--transport=stdio"]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Bun variant:
|
|
22
44
|
|
|
23
45
|
```json
|
|
24
46
|
{
|
|
25
47
|
"mcpServers": {
|
|
26
|
-
"
|
|
48
|
+
"research_vault": {
|
|
27
49
|
"command": "bunx",
|
|
28
|
-
"args": ["@syndash/research-vault-mcp"]
|
|
50
|
+
"args": ["--bun", "@syndash/research-vault-mcp", "--transport=stdio"]
|
|
29
51
|
}
|
|
30
52
|
}
|
|
31
53
|
}
|
|
32
54
|
```
|
|
33
55
|
|
|
34
|
-
|
|
56
|
+
Local monorepo development:
|
|
35
57
|
|
|
36
58
|
```json
|
|
37
59
|
{
|
|
38
60
|
"mcpServers": {
|
|
39
|
-
"
|
|
61
|
+
"research_vault_dev": {
|
|
40
62
|
"command": "bun",
|
|
41
|
-
"args": ["run", "packages/research-vault-mcp/src/server.ts"]
|
|
63
|
+
"args": ["run", "packages/research-vault-mcp/src/server.ts", "--transport=stdio"]
|
|
42
64
|
}
|
|
43
65
|
}
|
|
44
66
|
}
|
|
45
67
|
```
|
|
46
68
|
|
|
47
|
-
##
|
|
69
|
+
## Configure the vault root
|
|
70
|
+
|
|
71
|
+
Set the vault location with an environment variable before launching your MCP client:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
export VAULT_ROOT=/path/to/research-vault
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The package is designed for markdown-based knowledge bases. Keep private vault contents outside the public Evensong repo.
|
|
78
|
+
|
|
79
|
+
## Tools exposed
|
|
48
80
|
|
|
49
|
-
|
|
81
|
+
Current MCP contract:
|
|
50
82
|
|
|
51
|
-
- `vault_search` —
|
|
52
|
-
- `vault_status` —
|
|
53
|
-
- `vault_taxonomy` — category tree
|
|
54
|
-
- `vault_batch_analyze` — raw queue status
|
|
55
|
-
- `
|
|
83
|
+
- `vault_search` — search analyzed knowledge-base entries
|
|
84
|
+
- `vault_status` — registry, retention, and decay health
|
|
85
|
+
- `vault_taxonomy` — category tree and item counts
|
|
86
|
+
- `vault_batch_analyze` — raw queue status and preview
|
|
87
|
+
- `vault_note_save` — persist a markdown note into the vault
|
|
88
|
+
- `vault_get` — retrieve a saved vault item by id
|
|
89
|
+
- `vault_delete` — delete a saved vault item
|
|
90
|
+
- `vault_raw_ingest` — queue a raw URL/text ingest job
|
|
91
|
+
- `amplify_*` — optional remote RAG query layer when Amplify credentials are configured
|
|
92
|
+
|
|
93
|
+
## Package mechanics
|
|
94
|
+
|
|
95
|
+
Published packages include:
|
|
96
|
+
|
|
97
|
+
- `bin/research-vault-mcp.mjs`
|
|
98
|
+
- `dist/server.js`
|
|
99
|
+
- `src/**/*.ts` for source inspection
|
|
100
|
+
- `README.md`
|
|
101
|
+
- `package.json`
|
|
102
|
+
|
|
103
|
+
The bin prefers `dist/server.js`. In a monorepo checkout without `dist`, it falls back to `bun run src/server.ts` so development remains fast without a separate compile step.
|
|
56
104
|
|
|
57
105
|
## Architecture
|
|
58
106
|
|
|
59
|
-
|
|
107
|
+
Research Vault MCP uses a multi-signal ranker for candidate retrieval:
|
|
60
108
|
|
|
109
|
+
```text
|
|
110
|
+
score(d, q, t) = lexical(q,d)
|
|
111
|
+
+ semantic(embed(q), embed(d))
|
|
112
|
+
+ recency/stability(d,t)
|
|
113
|
+
+ access frequency(d)
|
|
114
|
+
+ summary-level weight(d)
|
|
61
115
|
```
|
|
62
|
-
score(d, q, t) = 0.35·BM25(q,d) + 0.35·cosine(embed(q), embed(d))
|
|
63
|
-
+ 0.15·exp(-(t - lastAccess)/stability)
|
|
64
|
-
+ 0.10·log1p(accessCount)/log1p(MAX_ACCESS)
|
|
65
|
-
+ 0.05·summary_level_weight(d)
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
**Primary LLM**: Atomic Chat local Gemma-4-E4B-Uncensored-Q4_K_M (`http://127.0.0.1:1337/v1`).
|
|
69
|
-
**Fallback chain**: xai-fast → minimax-m27 → openrouter/qwen3.6-plus → openrouter/llama-3.1-8b-free.
|
|
70
116
|
|
|
71
|
-
|
|
117
|
+
The Evensong benchmark evidence for hybrid retrieval and Dense RAR lives in the parent repo under `benchmarks/`.
|
|
72
118
|
|
|
73
119
|
## License
|
|
74
120
|
|
|
75
|
-
|
|
121
|
+
Apache-2.0 for package code. Research artifacts in the parent repo may use separate licenses; check the repository root license files.
|
|
@@ -1,49 +1,65 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
3
|
* CLI entry point for @syndash/research-vault-mcp.
|
|
4
|
-
* Invoked via `npx @syndash/research-vault-mcp` or `bunx @syndash/research-vault-mcp`.
|
|
5
|
-
* Delegates to src/server.ts (compiled or via bun direct).
|
|
6
4
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* The server is Bun-native. The npm bin is a small Node-compatible shim so
|
|
6
|
+
* `npx` can install the package, then delegate execution to `bun`.
|
|
9
7
|
*/
|
|
10
8
|
|
|
11
9
|
import { fileURLToPath } from 'url'
|
|
12
10
|
import { dirname, join } from 'path'
|
|
13
11
|
import { existsSync } from 'fs'
|
|
12
|
+
import { spawn } from 'child_process'
|
|
14
13
|
|
|
15
14
|
const __filename = fileURLToPath(import.meta.url)
|
|
16
15
|
const __dirname = dirname(__filename)
|
|
17
16
|
const pkgRoot = join(__dirname, '..')
|
|
18
17
|
|
|
19
|
-
// Prefer compiled JS if available (post-build); fall back to bun direct execution of TS source.
|
|
20
18
|
const compiledServer = join(pkgRoot, 'dist', 'server.js')
|
|
21
19
|
const sourceServer = join(pkgRoot, 'src', 'server.ts')
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
const args = process.argv.slice(2)
|
|
25
|
-
let transport = 'sse'
|
|
26
|
-
|
|
21
|
+
function parseTransport(args) {
|
|
27
22
|
for (let i = 0; i < args.length; i++) {
|
|
28
|
-
if (args[i] === '--transport' && args[i + 1])
|
|
29
|
-
|
|
30
|
-
} else if (args[i].startsWith('--transport=')) {
|
|
31
|
-
transport = args[i].split('=')[1]
|
|
32
|
-
}
|
|
23
|
+
if (args[i] === '--transport' && args[i + 1]) return args[i + 1]
|
|
24
|
+
if (args[i]?.startsWith('--transport=')) return args[i].split('=')[1]
|
|
33
25
|
}
|
|
34
|
-
|
|
26
|
+
return 'stdio'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function runWithBun(entrypoint, args) {
|
|
30
|
+
const child = spawn('bun', [entrypoint, ...args], {
|
|
31
|
+
cwd: pkgRoot,
|
|
32
|
+
stdio: 'inherit',
|
|
33
|
+
env: {
|
|
34
|
+
...process.env,
|
|
35
|
+
MCP_TRANSPORT: parseTransport(args),
|
|
36
|
+
},
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
child.on('exit', (code, signal) => {
|
|
40
|
+
if (signal) process.kill(process.pid, signal)
|
|
41
|
+
process.exit(code ?? 1)
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
child.on('error', err => {
|
|
45
|
+
console.error('research-vault-mcp: failed to spawn bun')
|
|
46
|
+
console.error('Install Bun first: https://bun.sh')
|
|
47
|
+
console.error(err.message)
|
|
48
|
+
process.exit(1)
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function main() {
|
|
53
|
+
const args = process.argv.slice(2)
|
|
35
54
|
|
|
36
55
|
if (existsSync(compiledServer)) {
|
|
37
|
-
|
|
56
|
+
runWithBun(compiledServer, args)
|
|
38
57
|
} else if (existsSync(sourceServer)) {
|
|
39
|
-
|
|
58
|
+
runWithBun(sourceServer, args)
|
|
40
59
|
} else {
|
|
41
60
|
console.error('research-vault-mcp: neither dist/server.js nor src/server.ts found')
|
|
42
61
|
process.exit(1)
|
|
43
62
|
}
|
|
44
63
|
}
|
|
45
64
|
|
|
46
|
-
main()
|
|
47
|
-
console.error('research-vault-mcp fatal:', err)
|
|
48
|
-
process.exit(1)
|
|
49
|
-
})
|
|
65
|
+
main()
|