@llmnesia/mcp 0.1.2 → 0.1.5

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
 
@@ -37,8 +51,11 @@ The installer:
37
51
  3. detects supported MCP clients you have (Claude Code, Claude Desktop,
38
52
  Cursor, and Codex), and
39
53
  4. registers that copy with each detected client — using the client's own CLI
40
- where available, or after a confirm prompt and backup for config files it
41
- edits.
54
+ where available, or with an automatic backup before editing its config file.
55
+
56
+ The `install` command is the approval to perform those setup steps. It does not
57
+ interrupt setup with a separate prompt for every detected app, and it never
58
+ prints existing client configurations or their credentials.
42
59
 
43
60
  Then **fully quit and reopen** your MCP client. Clients read their config once
44
61
  at startup, so reloading a window is not enough.
@@ -60,9 +77,7 @@ The copy is self-contained (no `node_modules` beside it) and re-running
60
77
 
61
78
  ### Updating
62
79
 
63
- ```bash
64
- npx -y @llmnesia/mcp@latest install
65
- ```
80
+ Run the same OS-specific install command above again.
66
81
 
67
82
  Your corpus is untouched; only the server copy is replaced.
68
83
 
@@ -85,12 +100,13 @@ If nothing has written to the corpus yet, search results will be empty.
85
100
 
86
101
  ## Tools
87
102
 
88
- Once registered, your MCP client gains five tools over the corpus:
103
+ Once registered, your MCP client gains six tools over the corpus:
89
104
 
90
105
  | Tool | Purpose |
91
106
  | --- | --- |
92
107
  | `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. |
93
108
  | `get_conversation` | Fetch the full transcript of one conversation by its id (the `id` field from search results). |
109
+ | `list_conversations` | List conversations by chronology, including oldest-first for questions about the user's earliest chat. |
94
110
  | `list_recent` | List the most recently updated conversations with title, summary, and platform. |
95
111
  | `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. |
96
112
  | `save_conversation` | Add or update a conversation in the corpus, so MCP is also an ingestion route. |
@@ -105,7 +121,7 @@ received data — check it before concluding a chat does not exist.
105
121
  | 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). |
106
122
  | Claude Desktop | Edits `claude_desktop_config.json` at the standard OS-specific path. |
107
123
  | Cursor | Edits `~/.cursor/mcp.json`. |
108
- | 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. |
124
+ | Codex | Runs `codex mcp add` with the absolute runtime paths when available. If Windows does not expose the app's bundled CLI, the installer safely edits `~/.codex/config.toml` itself and backs up existing settings first. Read-only LLMnesia tools are configured to run without repeated approval prompts; writes still ask. |
109
125
  | Others (Windsurf, Zed, LM Studio, …) | Prints the generic stdio block for you to paste. |
110
126
 
111
127
  **Cloud-only clients cannot reach a local stdio server** (web ChatGPT, Lovable,
@@ -114,9 +130,8 @@ close it.
114
130
 
115
131
  ## Diagnose an install
116
132
 
117
- ```bash
118
- npx -y @llmnesia/mcp@latest doctor
119
- ```
133
+ Use `npx -y @llmnesia/mcp@latest doctor` on macOS/Linux, or
134
+ `npx.cmd -y @llmnesia/mcp@latest doctor` in Windows PowerShell.
120
135
 
121
136
  Checks whether the native host is installed, the server runtime is present, the
122
137
  corpus is receiving data, and each detected client is correctly wired —
@@ -129,9 +144,8 @@ reminder).
129
144
 
130
145
  ## Uninstall
131
146
 
132
- ```bash
133
- npx -y @llmnesia/mcp@latest uninstall
134
- ```
147
+ Use `npx -y @llmnesia/mcp@latest uninstall` on macOS/Linux, or
148
+ `npx.cmd -y @llmnesia/mcp@latest uninstall` in Windows PowerShell.
135
149
 
136
150
  Removes native-host manifests and registry keys, the copied server in
137
151
  `~/.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.2" : "0.0.0-dev";
41
+ var VERSION = true ? "0.1.5" : "0.0.0-dev";
42
42
 
43
43
  export {
44
44
  __require,