@facthouse/mcp 0.28.0 → 0.29.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 +35 -33
- package/dist/cli/index.d.ts +5 -21
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +6 -783
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init-backfill.d.ts.map +1 -1
- package/dist/cli/init-backfill.js +2 -0
- package/dist/cli/init-backfill.js.map +1 -1
- package/dist/cli/init-knobs.d.ts +12 -3
- package/dist/cli/init-knobs.d.ts.map +1 -1
- package/dist/cli/init-knobs.js +20 -5
- package/dist/cli/init-knobs.js.map +1 -1
- package/dist/cli/init-wizard.d.ts.map +1 -1
- package/dist/cli/init-wizard.js +39 -8
- package/dist/cli/init-wizard.js.map +1 -1
- package/dist/cli/init.d.ts +2 -0
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +23 -2
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/run.d.ts +35 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +801 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/settings.d.ts.map +1 -1
- package/dist/cli/settings.js +1 -1
- package/dist/cli/settings.js.map +1 -1
- package/dist/cli/web.d.ts +24 -1
- package/dist/cli/web.d.ts.map +1 -1
- package/dist/cli/web.js +235 -68
- package/dist/cli/web.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -272
- package/dist/index.js.map +1 -1
- package/dist/intelligence/cli.d.ts +11 -3
- package/dist/intelligence/cli.d.ts.map +1 -1
- package/dist/intelligence/cli.js +115 -23
- package/dist/intelligence/cli.js.map +1 -1
- package/dist/intelligence/consolidate.d.ts +4 -0
- package/dist/intelligence/consolidate.d.ts.map +1 -1
- package/dist/intelligence/consolidate.js +14 -2
- package/dist/intelligence/consolidate.js.map +1 -1
- package/dist/intelligence/types.d.ts +5 -0
- package/dist/intelligence/types.d.ts.map +1 -1
- package/dist/intelligence/usage.d.ts +1 -1
- package/dist/intelligence/usage.js +1 -1
- package/dist/paths.d.ts +7 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +25 -0
- package/dist/paths.js.map +1 -1
- package/dist/server.d.ts +8 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +274 -0
- package/dist/server.js.map +1 -0
- package/dist/suppress-sqlite-warning.js +15 -3
- package/dist/suppress-sqlite-warning.js.map +1 -1
- package/dist/types/config.d.ts +5 -3
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +3 -1
- package/dist/types/config.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<img src="brand/mascot-right.png" width="128" align="right" alt="Facthouse mascot">
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Not a hosted plane. Not a vendor blob. Not Mem0's hosted "OpenMemory MCP" at [`mcp.mem0.ai`](https://mcp.mem0.ai).
|
|
5
|
+
Facthouse is a local memory engine for AI tools. Most “memory” products index chat logs. Facthouse takes agent activity - messages, tool use, and other MCP traffic - and applies neuroscience-inspired consolidation so it moves through **Data** (what happened in the session) → **Information** (extracted facts) → **Knowledge** (integrated beliefs on an entity graph). During this process, Facthouse links entities, drops duplicates, reconciles conflicts, and supersedes what is out of date. Vector embeddings add optional semantic search on top of that graph. The store is a SQLite file on your disk.
|
|
8
6
|
|
|
9
7
|
[](https://www.npmjs.com/package/@facthouse/mcp)
|
|
10
8
|
[](https://github.com/gordonkjlee/facthouse/actions/workflows/ci.yml)
|
|
@@ -18,29 +16,16 @@ Needs Node 22.5 or 24+.
|
|
|
18
16
|
|
|
19
17
|
<!-- x-release-please-start-version -->
|
|
20
18
|
```bash
|
|
21
|
-
npm install -g @facthouse/mcp@0.
|
|
19
|
+
npm install -g @facthouse/mcp@0.29.0
|
|
22
20
|
facthouse init
|
|
23
21
|
```
|
|
24
22
|
<!-- x-release-please-end -->
|
|
25
23
|
|
|
26
24
|
If npm install -g fails because a command named mcp already exists, remove that leftover command and retry.
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
To skip the wizard (record only — no transcript copy), paste this. The server creates `~/.facthouse` on first boot; you are not asked those questions.
|
|
26
|
+
`facthouse init --web` is the same setup as a browser form — it prints a 127.0.0.1 URL and does not open a browser.
|
|
31
27
|
|
|
32
|
-
|
|
33
|
-
```json
|
|
34
|
-
{
|
|
35
|
-
"mcpServers": {
|
|
36
|
-
"facthouse": {
|
|
37
|
-
"command": "npx",
|
|
38
|
-
"args": ["-y", "@facthouse/mcp@0.28.0"]
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
```
|
|
43
|
-
<!-- x-release-please-end -->
|
|
28
|
+
Press Enter to accept each default (copy = Claude Code or Cursor session logs on disk; type record if the assistant should save facts). If you picked copy, init asks whether to copy existing logs, then whether to extract and integrate. Init prints an MCP snippet — paste it into the client and restart.
|
|
44
29
|
|
|
45
30
|
In the client, state something durable in ordinary conversation — there is no remember command.
|
|
46
31
|
|
|
@@ -54,7 +39,7 @@ Two ways. Pick one per store.
|
|
|
54
39
|
|---|---|---|
|
|
55
40
|
| Who | Claude Code or Cursor (session logs on disk, under the client home) | Any MCP client (Grok, Desktop, …) |
|
|
56
41
|
| How | Name a source; Facthouse copies new lines from those logs into the store | Empty `sources`; the assistant calls `capture_fact` |
|
|
57
|
-
| First run | TTY walk-through, pick **copy**, set cwd; init asks whether to copy existing logs, then whether to extract and integrate |
|
|
42
|
+
| First run | TTY walk-through, pick **copy**, set cwd; init asks whether to copy existing logs, then whether to extract and integrate | TTY walk-through, pick **record** |
|
|
58
43
|
|
|
59
44
|
On a copy store, capture_fact is a correction for every MCP client, not only the one that writes JSONL. Grok has no transcript adapter — do not put Claude Code on copy and Grok on the same store expecting Grok to record.
|
|
60
45
|
|
|
@@ -132,19 +117,19 @@ Both are read-only views over the same database the tools query. Clients that ne
|
|
|
132
117
|
|
|
133
118
|
The MCP JSON starts the server via npx and does not need a global install. npm install -g puts facthouse on PATH for init, settings, stats, and inspect. The same CLI without PATH is npx -y -p "@facthouse/mcp" -- facthouse — pin the version; quote the package so PowerShell does not splat. -p and -- stop an older global binary winning. npx -y @facthouse/mcp with no -p / facthouse is the server; do not run it as a shell command for init, settings, or stats. The MCP paste starts the server. It does not put facthouse on PATH. To inspect the file from a terminal, see CLI below.
|
|
134
119
|
|
|
135
|
-
These CLI commands work in bash, zsh, and PowerShell. Quote @facthouse/mcp in PowerShell. Git Bash /c/... paths are not PowerShell; use C:/... and pass --data instead of cd or export. ~/ is expanded on every platform. WSL uses /mnt/c/.... FACTHOUSE_DATA on an MCP snippet applies only to that server process. A terminal facthouse command needs --data, or FACTHOUSE_DATA in the environment that shell inherits. Hooks do not see mcp.json env.
|
|
120
|
+
These CLI commands work in bash, zsh, and PowerShell. Quote @facthouse/mcp in PowerShell. Git Bash /c/... paths are not PowerShell; use C:/... and pass --data instead of cd or export. In Git Bash, quote a backslash path or write C:/... — unquoted \ is an escape. ~/ is expanded on every platform. WSL uses /mnt/c/.... FACTHOUSE_DATA on an MCP snippet applies only to that server process. A terminal facthouse command needs --data, or FACTHOUSE_DATA in the environment that shell inherits. Hooks do not see mcp.json env.
|
|
136
121
|
|
|
137
122
|
<!-- x-release-please-start-version -->
|
|
138
123
|
```bash
|
|
139
|
-
npm install -g @facthouse/mcp@0.
|
|
124
|
+
npm install -g @facthouse/mcp@0.29.0
|
|
140
125
|
facthouse init --yes
|
|
141
126
|
```
|
|
142
127
|
|
|
143
128
|
```bash
|
|
144
|
-
npx -y -p "@facthouse/mcp@0.
|
|
145
|
-
npx -y -p "@facthouse/mcp@0.
|
|
146
|
-
npx -y -p "@facthouse/mcp@0.
|
|
147
|
-
npx -y -p "@facthouse/mcp@0.
|
|
129
|
+
npx -y -p "@facthouse/mcp@0.29.0" -- facthouse init --yes
|
|
130
|
+
npx -y -p "@facthouse/mcp@0.29.0" -- facthouse settings --json
|
|
131
|
+
npx -y -p "@facthouse/mcp@0.29.0" -- facthouse stats
|
|
132
|
+
npx -y -p "@facthouse/mcp@0.29.0" -- facthouse inspect
|
|
148
133
|
```
|
|
149
134
|
<!-- x-release-please-end -->
|
|
150
135
|
|
|
@@ -288,7 +273,7 @@ facthouse inspect --entity Helios --limit 20 --output ~/inspect.html
|
|
|
288
273
|
|
|
289
274
|
### Another store
|
|
290
275
|
|
|
291
|
-
|
|
276
|
+
The store is this directory. Clients share it by using the same path. A second store is a second directory, not a second install. The default MCP server name is `facthouse`. Splitting is not a filter on which client wrote the row. Work and personal is one reason to split, not a required setup.
|
|
292
277
|
|
|
293
278
|
A non-default data directory prints a distinct MCP server name so two stores can share one `mcp.json`. Init against each extra directory prints that snippet. Example:
|
|
294
279
|
|
|
@@ -298,12 +283,12 @@ A non-default data directory prints a distinct MCP server name so two stores can
|
|
|
298
283
|
"mcpServers": {
|
|
299
284
|
"facthouse-personal": {
|
|
300
285
|
"command": "npx",
|
|
301
|
-
"args": ["-y", "@facthouse/mcp@0.
|
|
286
|
+
"args": ["-y", "@facthouse/mcp@0.29.0"],
|
|
302
287
|
"env": { "FACTHOUSE_DATA": "C:\\Users\\alex\\.facthouse-personal" }
|
|
303
288
|
},
|
|
304
289
|
"facthouse-work": {
|
|
305
290
|
"command": "npx",
|
|
306
|
-
"args": ["-y", "@facthouse/mcp@0.
|
|
291
|
+
"args": ["-y", "@facthouse/mcp@0.29.0"],
|
|
307
292
|
"env": { "FACTHOUSE_DATA": "C:\\Users\\alex\\.facthouse-work" }
|
|
308
293
|
}
|
|
309
294
|
}
|
|
@@ -329,7 +314,7 @@ Example — placeholders only; do not put a real password in a committed file:
|
|
|
329
314
|
"mcpServers": {
|
|
330
315
|
"facthouse": {
|
|
331
316
|
"command": "npx",
|
|
332
|
-
"args": ["-y", "@facthouse/mcp@0.
|
|
317
|
+
"args": ["-y", "@facthouse/mcp@0.29.0"],
|
|
333
318
|
"env": {
|
|
334
319
|
"FACTHOUSE_DATA": "C:\\Users\\alex\\.facthouse-work",
|
|
335
320
|
"FACTHOUSE_STORAGE": "postgres",
|
|
@@ -365,6 +350,23 @@ Choose one mechanism per store.
|
|
|
365
350
|
|
|
366
351
|
Do not install record hooks on this store — both write the same rows. Facthouse does not detect or rewrite existing hook configs.
|
|
367
352
|
|
|
353
|
+
### MCP-only record mode
|
|
354
|
+
|
|
355
|
+
To skip the wizard (record only — no transcript copy), paste this. The server creates `~/.facthouse` on first boot; you are not asked those questions.
|
|
356
|
+
|
|
357
|
+
<!-- x-release-please-start-version -->
|
|
358
|
+
```json
|
|
359
|
+
{
|
|
360
|
+
"mcpServers": {
|
|
361
|
+
"facthouse": {
|
|
362
|
+
"command": "npx",
|
|
363
|
+
"args": ["-y", "@facthouse/mcp@0.29.0"]
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
```
|
|
368
|
+
<!-- x-release-please-end -->
|
|
369
|
+
|
|
368
370
|
### Hooks (after the first consolidate)
|
|
369
371
|
|
|
370
372
|
`mcp.json` `env` is **not** visible to hooks. Pass the same `--data` (or set `FACTHOUSE_DATA` in the environment the client itself inherits). The command must invoke the CLI (`facthouse`), never the server binary. `npx -y @facthouse/mcp` with no `-p` / `facthouse` starts the MCP **server** and hangs a hook. Pin the package version, quote it if the hook runs PowerShell, and put `--` before `facthouse` so a globally installed older binary on PATH cannot win.
|
|
@@ -381,7 +383,7 @@ Do not install record hooks on this store — both write the same rows. Facthous
|
|
|
381
383
|
"hooks": [
|
|
382
384
|
{
|
|
383
385
|
"type": "command",
|
|
384
|
-
"command": "npx -y -p @facthouse/mcp@0.
|
|
386
|
+
"command": "npx -y -p @facthouse/mcp@0.29.0 -- facthouse notify compaction --data /absolute/path/to/the-same-store"
|
|
385
387
|
}
|
|
386
388
|
]
|
|
387
389
|
}
|
|
@@ -464,7 +466,7 @@ Throwaway store, not the capture path for a real Claude Code or Cursor home. The
|
|
|
464
466
|
<!-- x-release-please-start-version -->
|
|
465
467
|
```bash
|
|
466
468
|
export FACTHOUSE_DATA=/tmp/facthouse-demo
|
|
467
|
-
om() { npx -y -p "@facthouse/mcp@0.
|
|
469
|
+
om() { npx -y -p "@facthouse/mcp@0.29.0" -- facthouse "$@"; }
|
|
468
470
|
|
|
469
471
|
om init --yes
|
|
470
472
|
|
|
@@ -479,7 +481,7 @@ om stats
|
|
|
479
481
|
|
|
480
482
|
```powershell
|
|
481
483
|
$env:FACTHOUSE_DATA = Join-Path $env:TEMP "facthouse-demo"
|
|
482
|
-
function om { npx -y -p "@facthouse/mcp@0.
|
|
484
|
+
function om { npx -y -p "@facthouse/mcp@0.29.0" -- facthouse @args }
|
|
483
485
|
om init --yes
|
|
484
486
|
om record --role user --content "I prefer dark mode in every editor, and I never want telemetry enabled."
|
|
485
487
|
om record --role user --content "I am allergic to shellfish, so avoid seafood restaurants when booking anything."
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,25 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "../suppress-sqlite-warning.js";
|
|
3
|
-
import { type ConsolidationResult } from "../intelligence/consolidate.js";
|
|
4
|
-
import { type ConsolidateSteps } from "../intelligence/steps.js";
|
|
5
|
-
import type { IntelligenceProvider } from "../intelligence/types.js";
|
|
6
|
-
import type { EmbeddingProvider } from "../embedding/types.js";
|
|
7
|
-
import { type ServerConfig } from "../types/config.js";
|
|
8
|
-
interface ConsolidateStoreOpts {
|
|
9
|
-
/** undefined: default cap; null: no cap; number: that many oldest lines. */
|
|
10
|
-
extractLimit?: number | null;
|
|
11
|
-
/** Init historic window. See ConsolidateCaller.extractSince. */
|
|
12
|
-
extractSince?: Date;
|
|
13
|
-
/** Print the result object instead of the human summary. */
|
|
14
|
-
json?: boolean;
|
|
15
|
-
/** Print nothing on success (the init offer prints its own lines). */
|
|
16
|
-
print?: boolean;
|
|
17
|
-
}
|
|
18
2
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
3
|
+
* Thin loader so `suppress-sqlite-warning` evaluates before `node:sqlite` is
|
|
4
|
+
* even translated. A static import of sqlite in this file (via the rest of
|
|
5
|
+
* the CLI graph) emits ExperimentalWarning during graph load, before any
|
|
6
|
+
* wrap of process.emitWarning can run.
|
|
22
7
|
*/
|
|
23
|
-
|
|
24
|
-
export {};
|
|
8
|
+
import "../suppress-sqlite-warning.js";
|
|
25
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,+BAA+B,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AACH,OAAO,+BAA+B,CAAC"}
|