@appsoftwareltd/etherpk-mcp 0.3.0 → 0.4.1

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
@@ -1,12 +1,14 @@
1
1
  # @appsoftwareltd/etherpk-mcp
2
2
 
3
- The EtherPK **Headless Client**: an [MCP](https://modelcontextprotocol.io) server over one of
4
- your synced [EtherPK](https://etherpk.com) knowledge graphs, run on the same computer as your AI
5
- agent (Claude Code, Codex, Cursor and the like).
3
+ An [MCP](https://modelcontextprotocol.io) server that gives your AI agent (Claude Code, Codex,
4
+ Cursor and the like) one of your synced [EtherPK](https://etherpk.com) knowledge graphs, run on
5
+ the same computer as the agent.
6
6
 
7
- EtherPK's Sync Server never sees your notes in the clear, so nothing hosted can serve them to an
8
- agent. This program signs in as one of your devices, holds your keys, keeps one graph in sync and
9
- speaks MCP to the agent beside it. Protected documents are listed by name and never served.
7
+ EtherPK's Sync Server never sees your notes in the clear, so nothing hosted can serve them. This
8
+ program is EtherPK's **Headless Client**: to the Sync Server it is one of your devices - so it can
9
+ hold your keys, read a graph and keep it in sync. To your agent, it is an MCP server.
10
+
11
+ Protected documents are listed by name only, never served.
10
12
 
11
13
  Needs Node.js 22 or later.
12
14
 
@@ -32,7 +34,7 @@ npx @appsoftwareltd/etherpk-mcp login --sync-server https://sync.etherpk.com
32
34
 
33
35
  # Tell the agent about the graph (Claude Code shown; the Agents tab has the others).
34
36
  claude mcp add etherpk -- npx @appsoftwareltd/etherpk-mcp serve --sync-server https://sync.etherpk.com --graph <graph id>
35
- ```
37
+ ```client
36
38
 
37
39
  `npx @appsoftwareltd/etherpk-mcp graphs` lists the graphs each signed-in account can reach, by
38
40
  name and id. For a scripted setup, `ETHERPK_PAT` and `ETHERPK_RECOVERY_CODE` stand in for the
@@ -67,10 +69,48 @@ unique old→new replacement that merges with anyone typing elsewhere on the pag
67
69
  `append_document` (a page, or a day's journal entry, created if needed) and `create_page`.
68
70
  One running instance serves one graph.
69
71
 
70
- ## What it keeps on your computer
72
+ ## Searching by meaning
73
+
74
+ `search` matches words. With one more step it can also match **meaning** - "when do I pay my
75
+ taxes" finds the note that says "due 31 January" - by running a small embedding model on this
76
+ computer; nothing is sent anywhere, and protected documents are never embedded. Once per
77
+ computer:
78
+
79
+ ```sh
80
+ npx @appsoftwareltd/etherpk-mcp semantic setup # ~300 MB runtime (via your npm) + a 23 MB model, into the cache dir
81
+ ```
82
+
83
+ Semantic setup installs the native runtime into `~/.cache/etherpk/mcp/runtime/` and the three
84
+ model files into `~/.cache/etherpk/mcp/models/all-MiniLM-L6-v2-int8/`.
85
+
86
+ - **Any order, no restart.** Run it before or after registering the agent, even while an agent
87
+ is connected: a running `serve` notices within 30 seconds and starts building; until
88
+ then a search by meaning is refused with this command in the message, so the agent can tell
89
+ you what to run. Nothing in the registration changes (`--no-semantic` on `serve` is the only
90
+ switch, to keep one agent text-only).
91
+ - **What the agent gets.** `search` accepts `mode: "semantic"` (and `"hybrid"`, both groups
92
+ side by side). Every result carries the document, its kind, the breadcrumb of headings and
93
+ parent bullets, the passage's 0-based line range and its text with a similarity score - the
94
+ agent is told to cite them. Passage text has bullet markers and `[[ ]]` stripped: right for
95
+ quoting, wrong as the `old` text of `edit_document`, which should come from `read_document`.
96
+ - **Progress.** The first pass over a large graph takes minutes and runs in the background;
97
+ after that only edits are processed. `semantic status` lists each cached graph with how many
98
+ passages are done; every semantic result says `embedded`/`total` and `complete`; run by
99
+ hand, `serve` prints a line every 30 seconds. `semantic remove` deletes runtime and model.
100
+ - **Load on the machine.** The first pass uses a quarter of the cores, at most four, and pauses
101
+ between model calls; `ETHERPK_MCP_SEMANTIC_THREADS=8` in the registration's `env` makes it
102
+ faster and hotter. `ETHERPK_MCP_DEBUG_MEMORY=1` logs the process's memory if you ever need
103
+ to see it.
104
+ - **One cache directory for both.** Setup and `serve` must see the same cache root - by default
105
+ `~/.cache/etherpk/mcp` (`C:\Users\<you>\.cache\etherpk\mcp` on Windows). If you set
106
+ `ETHERPK_MCP_CACHE_DIR` in your shell, put it in the agent registration's `env` too, since
107
+ the agent spawns `serve` with its own environment.
108
+
109
+ ## What this client keeps on your computer
71
110
 
72
111
  - **Keys**: `~/.config/etherpk/mcp.json`, one entry per Sync Server, readable only by your user -
73
- the same trust as a browser you've signed in on.
112
+ the same trust as a browser you've signed in on. (On Windows both paths sit under your user
113
+ folder: `C:\Users\<you>\.config\etherpk\` and `C:\Users\<you>\.cache\etherpk\`.)
74
114
  - **A cache of each graph you serve**: `~/.cache/etherpk/mcp/`, so a restart catches up on what
75
115
  changed instead of downloading everything again. It holds your notes readably, like a signed-in
76
116
  browser's own storage does. It is never the source of truth: on every start the Sync Server is
@@ -78,7 +118,8 @@ One running instance serves one graph.
78
118
  newer version of this program discards a cache it no longer understands and rebuilds it.
79
119
 
80
120
  Revoke the token at the portal to cut the agent off, and `npx @appsoftwareltd/etherpk-mcp logout`
81
- to forget that server's keys and delete its cache on that computer (`--all` for every server).
121
+ to forget that server's keys and delete its cache on that computer (`--all` for every server,
122
+ which also removes the semantic runtime and model).
82
123
 
83
124
  ## Building and publishing
84
125