@llmnesia/mcp 0.1.3 → 0.1.6
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 +33 -19
- package/dist/{chunk-7BW63ZTP.js → chunk-3JQ7CGCP.js} +6 -1
- package/dist/{chunk-EBVGUZX2.js → chunk-JBCYML3I.js} +1 -1
- package/dist/{cli-JFZO44NP.js → cli-LNUL4QWX.js} +326 -99
- package/dist/cli.js +104 -9
- package/dist/llmnesia-claude-host.mjs +226 -36
- package/dist/mcp.js +77 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -12,22 +12,36 @@ over stdio.
|
|
|
12
12
|
|
|
13
13
|
Requires **Node.js ≥ 22.13.0** (for the built-in `node:sqlite` module). The
|
|
14
14
|
installer checks this before changing anything and prints the exact recovery
|
|
15
|
-
steps when the installed version is too old.
|
|
15
|
+
steps when the installed version is too old. If that happens in an interactive
|
|
16
|
+
terminal, it offers the official Node.js installer through an OS-specific
|
|
17
|
+
LLMnesia download link for you.
|
|
16
18
|
|
|
17
19
|
## Install
|
|
18
20
|
|
|
21
|
+
On macOS or Linux:
|
|
22
|
+
|
|
19
23
|
```bash
|
|
20
24
|
npx -y @llmnesia/mcp@latest install
|
|
21
25
|
```
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
On Windows PowerShell:
|
|
28
|
+
|
|
29
|
+
```powershell
|
|
30
|
+
npx.cmd -y @llmnesia/mcp@latest install
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Windows uses `npx.cmd` because PowerShell commonly blocks npm's `npx.ps1`
|
|
34
|
+
wrapper even when Node.js installed correctly.
|
|
24
35
|
It requires Node.js 22.13 or newer; there is no global package install and no
|
|
25
36
|
client config to edit by hand in the normal path.
|
|
26
37
|
|
|
27
|
-
If
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
38
|
+
If your installed Node.js is too old, LLMnesia offers to open the right official
|
|
39
|
+
installer; install it, reopen Terminal/PowerShell, and run the command again. If
|
|
40
|
+
`npx` is not recognised at all, Node.js is not
|
|
41
|
+
installed yet, so the command cannot start far enough to show that prompt. In
|
|
42
|
+
that case, install the current LTS release from
|
|
43
|
+
[Mac installer](https://www.llmnesia.com/download/node/macos) on macOS, or the
|
|
44
|
+
[Windows installer](https://www.llmnesia.com/download/node/windows) on Windows.
|
|
31
45
|
|
|
32
46
|
The installer:
|
|
33
47
|
|
|
@@ -38,6 +52,9 @@ The installer:
|
|
|
38
52
|
Cursor, and Codex), and
|
|
39
53
|
4. registers that copy with each detected client — using the client's own CLI
|
|
40
54
|
where available, or with an automatic backup before editing its config file.
|
|
55
|
+
It also prepares the standard Claude Desktop, Cursor, and Codex/ChatGPT
|
|
56
|
+
config paths, so installing one of those desktop apps later does not require
|
|
57
|
+
running setup again.
|
|
41
58
|
|
|
42
59
|
The `install` command is the approval to perform those setup steps. It does not
|
|
43
60
|
interrupt setup with a separate prompt for every detected app, and it never
|
|
@@ -63,9 +80,7 @@ The copy is self-contained (no `node_modules` beside it) and re-running
|
|
|
63
80
|
|
|
64
81
|
### Updating
|
|
65
82
|
|
|
66
|
-
|
|
67
|
-
npx -y @llmnesia/mcp@latest install
|
|
68
|
-
```
|
|
83
|
+
Run the same OS-specific install command above again.
|
|
69
84
|
|
|
70
85
|
Your corpus is untouched; only the server copy is replaced.
|
|
71
86
|
|
|
@@ -88,12 +103,13 @@ If nothing has written to the corpus yet, search results will be empty.
|
|
|
88
103
|
|
|
89
104
|
## Tools
|
|
90
105
|
|
|
91
|
-
Once registered, your MCP client gains
|
|
106
|
+
Once registered, your MCP client gains six tools over the corpus:
|
|
92
107
|
|
|
93
108
|
| Tool | Purpose |
|
|
94
109
|
| --- | --- |
|
|
95
110
|
| `search_conversations` | Full-text search across every past conversation. Returns ranked matches with highlighted snippets. Supports `platform`, `title`, `date_from`/`date_to` filters and a `match_mode` (`any` / `all` / `phrase`) for when a wrong hit matters. |
|
|
96
111
|
| `get_conversation` | Fetch the full transcript of one conversation by its id (the `id` field from search results). |
|
|
112
|
+
| `list_conversations` | List conversations by chronology, including oldest-first for questions about the user's earliest chat. |
|
|
97
113
|
| `list_recent` | List the most recently updated conversations with title, summary, and platform. |
|
|
98
114
|
| `corpus_status` | Report when the corpus last received data and how many conversations it holds. Use this when an expected conversation cannot be found, to tell a genuinely missing chat apart from a corpus that has stopped receiving updates. |
|
|
99
115
|
| `save_conversation` | Add or update a conversation in the corpus, so MCP is also an ingestion route. |
|
|
@@ -106,9 +122,9 @@ received data — check it before concluding a chat does not exist.
|
|
|
106
122
|
| Client | How `install` wires it |
|
|
107
123
|
| --- | --- |
|
|
108
124
|
| Claude Code | Runs `claude mcp add --scope user` with the absolute Node and installed runtime paths, making it available in every project (detects `claude` on PATH). |
|
|
109
|
-
| Claude Desktop | Edits `claude_desktop_config.json` at the standard OS-specific path. |
|
|
110
|
-
| Cursor | Edits `~/.cursor/mcp.json
|
|
111
|
-
| Codex | Runs `codex mcp add` with the absolute runtime paths
|
|
125
|
+
| Claude Desktop | Edits `claude_desktop_config.json` at the standard OS-specific path, preparing it in advance if Claude Desktop is installed later. |
|
|
126
|
+
| Cursor | Edits `~/.cursor/mcp.json`, preparing it in advance if Cursor is installed later. |
|
|
127
|
+
| Codex / ChatGPT desktop | Runs `codex mcp add` with the absolute runtime paths when available. If the bundled CLI is unavailable, the installer safely edits `~/.codex/config.toml` itself and backs up existing settings first, including preparing it for a later installation. Read-only LLMnesia tools are configured to run without repeated approval prompts; writes still ask. |
|
|
112
128
|
| Others (Windsurf, Zed, LM Studio, …) | Prints the generic stdio block for you to paste. |
|
|
113
129
|
|
|
114
130
|
**Cloud-only clients cannot reach a local stdio server** (web ChatGPT, Lovable,
|
|
@@ -117,9 +133,8 @@ close it.
|
|
|
117
133
|
|
|
118
134
|
## Diagnose an install
|
|
119
135
|
|
|
120
|
-
|
|
121
|
-
npx -y @llmnesia/mcp@latest doctor
|
|
122
|
-
```
|
|
136
|
+
Use `npx -y @llmnesia/mcp@latest doctor` on macOS/Linux, or
|
|
137
|
+
`npx.cmd -y @llmnesia/mcp@latest doctor` in Windows PowerShell.
|
|
123
138
|
|
|
124
139
|
Checks whether the native host is installed, the server runtime is present, the
|
|
125
140
|
corpus is receiving data, and each detected client is correctly wired —
|
|
@@ -132,9 +147,8 @@ reminder).
|
|
|
132
147
|
|
|
133
148
|
## Uninstall
|
|
134
149
|
|
|
135
|
-
|
|
136
|
-
npx -y @llmnesia/mcp@latest uninstall
|
|
137
|
-
```
|
|
150
|
+
Use `npx -y @llmnesia/mcp@latest uninstall` on macOS/Linux, or
|
|
151
|
+
`npx.cmd -y @llmnesia/mcp@latest uninstall` in Windows PowerShell.
|
|
138
152
|
|
|
139
153
|
Removes native-host manifests and registry keys, the copied server in
|
|
140
154
|
`~/.llmnesia/bin`, and client registrations. The shared config file and your
|
|
@@ -643,10 +643,15 @@ var SearchIndex = class {
|
|
|
643
643
|
}
|
|
644
644
|
/** Most-recently-updated conversations (metadata only), newest first. */
|
|
645
645
|
listRecent(n) {
|
|
646
|
+
return this.listConversations(n, "recent");
|
|
647
|
+
}
|
|
648
|
+
/** Conversation metadata in a caller-selected, deterministic chronology. */
|
|
649
|
+
listConversations(n, sort) {
|
|
646
650
|
const limit = Math.max(1, n);
|
|
651
|
+
const orderBy = sort === "oldest" ? "createdAt ASC, updatedAt ASC" : sort === "newest" ? "createdAt DESC, updatedAt DESC" : "updatedAt DESC, createdAt DESC";
|
|
647
652
|
const rows = this.db.prepare(
|
|
648
653
|
`SELECT docId, platform, title, url, createdAt, updatedAt, messageCount, preview, pinned
|
|
649
|
-
FROM conversations ORDER BY
|
|
654
|
+
FROM conversations ORDER BY ${orderBy} LIMIT ?`
|
|
650
655
|
).all(limit);
|
|
651
656
|
return rows.map((r) => ({ ...r, pinned: r.pinned === 1 }));
|
|
652
657
|
}
|