vestige-mcp-server 1.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 +129 -0
- package/bin/vestige-mcp.js +31 -0
- package/bin/vestige.js +31 -0
- package/package.json +37 -0
- package/scripts/postinstall.js +174 -0
package/README.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# @vestige/mcp
|
|
2
|
+
|
|
3
|
+
Vestige MCP Server - A synthetic hippocampus for AI assistants.
|
|
4
|
+
|
|
5
|
+
Built on 130 years of cognitive science research, Vestige provides biologically-inspired memory that decays, strengthens, and consolidates like the human mind.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g vestige-mcp-server
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This automatically downloads the correct binary for your platform (macOS, Linux, Windows) from GitHub releases.
|
|
14
|
+
|
|
15
|
+
### What gets installed
|
|
16
|
+
|
|
17
|
+
| Command | Description |
|
|
18
|
+
|---------|-------------|
|
|
19
|
+
| `vestige-mcp` | MCP server for Claude integration |
|
|
20
|
+
| `vestige` | CLI for stats, health checks, and maintenance |
|
|
21
|
+
|
|
22
|
+
### Verify installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
vestige health
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage with Claude Code
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
claude mcp add vestige vestige-mcp -s user
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Then restart Claude.
|
|
35
|
+
|
|
36
|
+
## Usage with Claude Desktop
|
|
37
|
+
|
|
38
|
+
Add to your Claude Desktop configuration:
|
|
39
|
+
|
|
40
|
+
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
41
|
+
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"mcpServers": {
|
|
46
|
+
"vestige": {
|
|
47
|
+
"command": "vestige-mcp"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## CLI Commands
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
vestige stats # Memory statistics
|
|
57
|
+
vestige stats --states # Cognitive state distribution
|
|
58
|
+
vestige health # System health check
|
|
59
|
+
vestige consolidate # Run memory maintenance cycle
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Features
|
|
63
|
+
|
|
64
|
+
- **FSRS-6 Algorithm**: State-of-the-art spaced repetition for optimal memory retention
|
|
65
|
+
- **Dual-Strength Memory**: Bjork & Bjork (1992) - Storage + Retrieval strength model
|
|
66
|
+
- **Synaptic Tagging**: Memories become important retroactively (Frey & Morris 1997)
|
|
67
|
+
- **Semantic Search**: Local embeddings via nomic-embed-text-v1.5 (768 dimensions)
|
|
68
|
+
- **Local-First**: All data stays on your machine - no cloud, no API costs
|
|
69
|
+
|
|
70
|
+
## Storage & Memory
|
|
71
|
+
|
|
72
|
+
Vestige uses SQLite for storage. Your memories are stored on **disk**, not in RAM.
|
|
73
|
+
|
|
74
|
+
- **Database limit**: 216TB (SQLite theoretical max)
|
|
75
|
+
- **RAM usage**: ~64MB cache (configurable)
|
|
76
|
+
- **Typical usage**: 1 million memories ≈ 1-2GB on disk
|
|
77
|
+
|
|
78
|
+
You'll never run out of space. A heavy user creating 100 memories/day would use ~1.5GB after 10 years.
|
|
79
|
+
|
|
80
|
+
## Embeddings
|
|
81
|
+
|
|
82
|
+
On first use, Vestige downloads the nomic-embed-text-v1.5 model (~130MB). This is a one-time download and all subsequent operations are fully offline.
|
|
83
|
+
|
|
84
|
+
The model is stored in `.fastembed_cache/` in your working directory, or you can set a global location:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
export FASTEMBED_CACHE_PATH="$HOME/.fastembed_cache"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Environment Variables
|
|
91
|
+
|
|
92
|
+
| Variable | Description | Default |
|
|
93
|
+
|----------|-------------|---------|
|
|
94
|
+
| `VESTIGE_DATA_DIR` | Data storage directory | `~/.vestige` |
|
|
95
|
+
| `VESTIGE_LOG_LEVEL` | Log verbosity | `info` |
|
|
96
|
+
| `FASTEMBED_CACHE_PATH` | Embeddings model location | `./.fastembed_cache` |
|
|
97
|
+
|
|
98
|
+
## Troubleshooting
|
|
99
|
+
|
|
100
|
+
### "Could not attach to MCP server vestige"
|
|
101
|
+
|
|
102
|
+
1. Verify binary exists: `which vestige-mcp`
|
|
103
|
+
2. Test directly: `vestige-mcp` (should wait for stdio input)
|
|
104
|
+
3. Check Claude logs: `~/Library/Logs/Claude/` (macOS)
|
|
105
|
+
|
|
106
|
+
### "vestige: command not found"
|
|
107
|
+
|
|
108
|
+
Reinstall the package:
|
|
109
|
+
```bash
|
|
110
|
+
npm install -g vestige-mcp-server
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Embeddings not downloading
|
|
114
|
+
|
|
115
|
+
The model downloads on first `ingest` or `search` operation. If Claude can't connect to the MCP server, no memory operations happen and no model downloads.
|
|
116
|
+
|
|
117
|
+
Fix the MCP connection first, then the model will download automatically.
|
|
118
|
+
|
|
119
|
+
## Supported Platforms
|
|
120
|
+
|
|
121
|
+
| Platform | Architecture |
|
|
122
|
+
|----------|--------------|
|
|
123
|
+
| macOS | ARM64 (Apple Silicon) |
|
|
124
|
+
| Linux | x86_64 |
|
|
125
|
+
| Windows | x86_64 |
|
|
126
|
+
|
|
127
|
+
## License
|
|
128
|
+
|
|
129
|
+
MIT
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const os = require('os');
|
|
7
|
+
|
|
8
|
+
const platform = os.platform();
|
|
9
|
+
const binaryName = platform === 'win32' ? 'vestige-mcp.exe' : 'vestige-mcp';
|
|
10
|
+
const binaryPath = path.join(__dirname, binaryName);
|
|
11
|
+
|
|
12
|
+
if (!fs.existsSync(binaryPath)) {
|
|
13
|
+
console.error('Error: vestige-mcp binary not found.');
|
|
14
|
+
console.error(`Expected at: ${binaryPath}`);
|
|
15
|
+
console.error('');
|
|
16
|
+
console.error('Try reinstalling: npm install -g @vestige/mcp');
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
21
|
+
stdio: 'inherit',
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
child.on('error', (err) => {
|
|
25
|
+
console.error('Failed to start vestige-mcp:', err.message);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
child.on('exit', (code) => {
|
|
30
|
+
process.exit(code ?? 0);
|
|
31
|
+
});
|
package/bin/vestige.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const os = require('os');
|
|
7
|
+
|
|
8
|
+
const platform = os.platform();
|
|
9
|
+
const binaryName = platform === 'win32' ? 'vestige.exe' : 'vestige';
|
|
10
|
+
const binaryPath = path.join(__dirname, binaryName);
|
|
11
|
+
|
|
12
|
+
if (!fs.existsSync(binaryPath)) {
|
|
13
|
+
console.error('Error: vestige CLI binary not found.');
|
|
14
|
+
console.error(`Expected at: ${binaryPath}`);
|
|
15
|
+
console.error('');
|
|
16
|
+
console.error('Try reinstalling: npm install -g @vestige/mcp');
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
21
|
+
stdio: 'inherit',
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
child.on('error', (err) => {
|
|
25
|
+
console.error('Failed to start vestige:', err.message);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
child.on('exit', (code) => {
|
|
30
|
+
process.exit(code ?? 0);
|
|
31
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vestige-mcp-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Vestige MCP Server - AI Memory System for Claude and other assistants",
|
|
5
|
+
"bin": {
|
|
6
|
+
"vestige-mcp": "bin/vestige-mcp.js",
|
|
7
|
+
"vestige": "bin/vestige.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"postinstall": "node scripts/postinstall.js"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"mcp",
|
|
14
|
+
"claude",
|
|
15
|
+
"ai",
|
|
16
|
+
"memory",
|
|
17
|
+
"vestige"
|
|
18
|
+
],
|
|
19
|
+
"author": "Sam Valladares",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/samvallad33/vestige.git"
|
|
24
|
+
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=18"
|
|
27
|
+
},
|
|
28
|
+
"os": [
|
|
29
|
+
"darwin",
|
|
30
|
+
"linux",
|
|
31
|
+
"win32"
|
|
32
|
+
],
|
|
33
|
+
"cpu": [
|
|
34
|
+
"x64",
|
|
35
|
+
"arm64"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const https = require('https');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const os = require('os');
|
|
7
|
+
const { execSync } = require('child_process');
|
|
8
|
+
|
|
9
|
+
const VERSION = require('../package.json').version;
|
|
10
|
+
const BINARY_VERSION = '1.1.0'; // GitHub release version for binaries
|
|
11
|
+
const PLATFORM = os.platform();
|
|
12
|
+
const ARCH = os.arch();
|
|
13
|
+
|
|
14
|
+
const PLATFORM_MAP = {
|
|
15
|
+
darwin: 'apple-darwin',
|
|
16
|
+
linux: 'unknown-linux-gnu',
|
|
17
|
+
win32: 'pc-windows-msvc',
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const ARCH_MAP = {
|
|
21
|
+
x64: 'x86_64',
|
|
22
|
+
arm64: 'aarch64',
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const platformStr = PLATFORM_MAP[PLATFORM];
|
|
26
|
+
const archStr = ARCH_MAP[ARCH];
|
|
27
|
+
|
|
28
|
+
if (!platformStr || !archStr) {
|
|
29
|
+
console.error(`Unsupported platform: ${PLATFORM}-${ARCH}`);
|
|
30
|
+
console.error('Supported: darwin/linux/win32 on x64/arm64');
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const target = `${archStr}-${platformStr}`;
|
|
35
|
+
const isWindows = PLATFORM === 'win32';
|
|
36
|
+
const archiveExt = isWindows ? 'zip' : 'tar.gz';
|
|
37
|
+
const archiveName = `vestige-mcp-${target}.${archiveExt}`;
|
|
38
|
+
const downloadUrl = `https://github.com/samvallad33/vestige/releases/download/v${BINARY_VERSION}/${archiveName}`;
|
|
39
|
+
|
|
40
|
+
const targetDir = path.join(__dirname, '..', 'bin');
|
|
41
|
+
const archivePath = path.join(targetDir, archiveName);
|
|
42
|
+
|
|
43
|
+
console.log(`Installing Vestige MCP v${VERSION} for ${target}...`);
|
|
44
|
+
|
|
45
|
+
// Ensure bin directory exists
|
|
46
|
+
if (!fs.existsSync(targetDir)) {
|
|
47
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Download a file following redirects (GitHub releases use redirects)
|
|
52
|
+
*/
|
|
53
|
+
function download(url, dest) {
|
|
54
|
+
return new Promise((resolve, reject) => {
|
|
55
|
+
const file = fs.createWriteStream(dest);
|
|
56
|
+
|
|
57
|
+
const request = (currentUrl) => {
|
|
58
|
+
https.get(currentUrl, (response) => {
|
|
59
|
+
// Handle redirects (GitHub uses 302)
|
|
60
|
+
if (response.statusCode === 301 || response.statusCode === 302) {
|
|
61
|
+
const redirectUrl = response.headers.location;
|
|
62
|
+
if (!redirectUrl) {
|
|
63
|
+
reject(new Error('Redirect without location header'));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
request(redirectUrl);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (response.statusCode !== 200) {
|
|
71
|
+
reject(new Error(`Download failed: HTTP ${response.statusCode}`));
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
response.pipe(file);
|
|
76
|
+
file.on('finish', () => {
|
|
77
|
+
file.close();
|
|
78
|
+
resolve();
|
|
79
|
+
});
|
|
80
|
+
}).on('error', (err) => {
|
|
81
|
+
fs.unlink(dest, () => {}); // Delete partial file
|
|
82
|
+
reject(err);
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
request(url);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Extract archive based on platform
|
|
92
|
+
*/
|
|
93
|
+
function extract(archivePath, destDir) {
|
|
94
|
+
if (isWindows) {
|
|
95
|
+
// Use PowerShell to extract zip on Windows
|
|
96
|
+
execSync(
|
|
97
|
+
`powershell -Command "Expand-Archive -Path '${archivePath}' -DestinationPath '${destDir}' -Force"`,
|
|
98
|
+
{ stdio: 'inherit' }
|
|
99
|
+
);
|
|
100
|
+
} else {
|
|
101
|
+
// Use tar on Unix
|
|
102
|
+
execSync(`tar -xzf "${archivePath}" -C "${destDir}"`, { stdio: 'inherit' });
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Make binaries executable (Unix only)
|
|
108
|
+
*/
|
|
109
|
+
function makeExecutable(binDir) {
|
|
110
|
+
if (isWindows) return;
|
|
111
|
+
|
|
112
|
+
const binaries = ['vestige-mcp', 'vestige'];
|
|
113
|
+
for (const bin of binaries) {
|
|
114
|
+
const binPath = path.join(binDir, bin);
|
|
115
|
+
if (fs.existsSync(binPath)) {
|
|
116
|
+
fs.chmodSync(binPath, 0o755);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
async function main() {
|
|
122
|
+
try {
|
|
123
|
+
// Download
|
|
124
|
+
console.log(`Downloading from ${downloadUrl}...`);
|
|
125
|
+
await download(downloadUrl, archivePath);
|
|
126
|
+
console.log('Download complete.');
|
|
127
|
+
|
|
128
|
+
// Extract
|
|
129
|
+
console.log('Extracting binaries...');
|
|
130
|
+
extract(archivePath, targetDir);
|
|
131
|
+
|
|
132
|
+
// Cleanup archive
|
|
133
|
+
fs.unlinkSync(archivePath);
|
|
134
|
+
|
|
135
|
+
// Make executable
|
|
136
|
+
makeExecutable(targetDir);
|
|
137
|
+
|
|
138
|
+
// Verify installation
|
|
139
|
+
const mcpBinary = path.join(targetDir, isWindows ? 'vestige-mcp.exe' : 'vestige-mcp');
|
|
140
|
+
const cliBinary = path.join(targetDir, isWindows ? 'vestige.exe' : 'vestige');
|
|
141
|
+
|
|
142
|
+
if (!fs.existsSync(mcpBinary)) {
|
|
143
|
+
throw new Error('vestige-mcp binary not found after extraction');
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
console.log('');
|
|
147
|
+
console.log('Vestige MCP installed successfully!');
|
|
148
|
+
console.log('');
|
|
149
|
+
console.log('Binaries installed:');
|
|
150
|
+
console.log(` - vestige-mcp: ${mcpBinary}`);
|
|
151
|
+
if (fs.existsSync(cliBinary)) {
|
|
152
|
+
console.log(` - vestige: ${cliBinary}`);
|
|
153
|
+
}
|
|
154
|
+
console.log('');
|
|
155
|
+
console.log('Next steps:');
|
|
156
|
+
console.log(' 1. Add to Claude: claude mcp add vestige vestige-mcp -s user');
|
|
157
|
+
console.log(' 2. Restart Claude');
|
|
158
|
+
console.log(' 3. Test with: "remember that my favorite color is blue"');
|
|
159
|
+
console.log('');
|
|
160
|
+
|
|
161
|
+
} catch (err) {
|
|
162
|
+
console.error('');
|
|
163
|
+
console.error('Installation failed:', err.message);
|
|
164
|
+
console.error('');
|
|
165
|
+
console.error('Manual installation:');
|
|
166
|
+
console.error(` 1. Download: ${downloadUrl}`);
|
|
167
|
+
console.error(` 2. Extract to: ${targetDir}`);
|
|
168
|
+
console.error(' 3. Ensure binaries are executable (chmod +x on Unix)');
|
|
169
|
+
console.error('');
|
|
170
|
+
process.exit(1);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
main();
|