@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 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
- That is the same command in Terminal on macOS/Linux and PowerShell on Windows.
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 `npx` is not recognised, Node.js is not installed. Install the current LTS
28
- release from [nodejs.org](https://nodejs.org/), reopen Terminal/PowerShell, and
29
- run the command again. `npx` cannot prompt for or install Node.js because it is
30
- itself part of Node.js.
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
- ```bash
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 five tools over the corpus:
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. It also detects the CLI bundled in the macOS desktop app; prints a TOML fallback only if no Codex CLI is available. |
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
- ```bash
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
- ```bash
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 updatedAt DESC, createdAt DESC LIMIT ?`
654
+ FROM conversations ORDER BY ${orderBy} LIMIT ?`
650
655
  ).all(limit);
651
656
  return rows.map((r) => ({ ...r, pinned: r.pinned === 1 }));
652
657
  }
@@ -38,7 +38,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
38
38
  ));
39
39
 
40
40
  // src/version.ts
41
- var VERSION = true ? "0.1.3" : "0.0.0-dev";
41
+ var VERSION = true ? "0.1.6" : "0.0.0-dev";
42
42
 
43
43
  export {
44
44
  __require,