@justfortytwo/memory 0.1.3 → 0.1.4
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 +38 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -85,6 +85,20 @@ different dimensionality requires a schema change.)
|
|
|
85
85
|
|
|
86
86
|
## Standalone usage
|
|
87
87
|
|
|
88
|
+
```bash
|
|
89
|
+
npm install @justfortytwo/memory
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Prerequisites.** Requires **Node.js >= 20**. The package depends on
|
|
93
|
+
[`better-sqlite3`] `^12`, a native module that ships prebuilt binaries for LTS
|
|
94
|
+
Node releases — on an unsupported Node version or platform, `npm install` will
|
|
95
|
+
compile it from source (needs a C/C++ toolchain). It also needs a local (or
|
|
96
|
+
remote) [Ollama] for real embeddings; without `EMBED_MODEL` set it falls back to
|
|
97
|
+
a deterministic `FakeEmbedder` (see [Embedder](#embedder)). `sqlite-vec` ships as
|
|
98
|
+
a bundled npm dependency — no manual SQLite-extension install is needed.
|
|
99
|
+
|
|
100
|
+
[`better-sqlite3`]: https://github.com/WiseLibs/better-sqlite3
|
|
101
|
+
|
|
88
102
|
```bash
|
|
89
103
|
# build (once); the server runs the built JS, not TS
|
|
90
104
|
npm run build
|
|
@@ -99,6 +113,30 @@ DB_PATH=./memory.db EMBED_MODEL=qwen3-embedding:0.6b fortytwo-memory
|
|
|
99
113
|
The `bin` is `fortytwo-memory` → `dist/index.js`. You can also run it with
|
|
100
114
|
`npx -y @justfortytwo/memory` (it is published to npm).
|
|
101
115
|
|
|
116
|
+
### Register in your own `.mcp.json`
|
|
117
|
+
|
|
118
|
+
To use the server in any MCP host (not as a Claude Code plugin), drop this into
|
|
119
|
+
your project's `.mcp.json` with a real DB path:
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"mcpServers": {
|
|
124
|
+
"fortytwo-memory": {
|
|
125
|
+
"command": "npx",
|
|
126
|
+
"args": ["-y", "@justfortytwo/memory"],
|
|
127
|
+
"env": {
|
|
128
|
+
"DB_PATH": "./memory.db",
|
|
129
|
+
"EMBED_MODEL": "qwen3-embedding:0.6b",
|
|
130
|
+
"OLLAMA_BASE_URL": "http://localhost:11434"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
`OLLAMA_BASE_URL` may point at a remote host. The embedder strips a trailing
|
|
138
|
+
slash, so either form works — but prefer no trailing slash.
|
|
139
|
+
|
|
102
140
|
### As a library
|
|
103
141
|
|
|
104
142
|
```ts
|