@appsoftwareltd/etherpk-mcp 0.2.0 → 0.4.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 +69 -13
- package/dist/main.js +7974 -6715
- package/dist/main.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# @appsoftwareltd/etherpk-mcp
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
your synced [EtherPK](https://etherpk.com) knowledge graphs, run on
|
|
5
|
-
|
|
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
|
|
8
|
-
|
|
9
|
-
|
|
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
|
|
|
@@ -31,11 +33,30 @@ npx @appsoftwareltd/etherpk-mcp login --sync-server https://sync.etherpk.com
|
|
|
31
33
|
# npx @appsoftwareltd/etherpk-mcp login --sync-server https://sync.etherpk.com --recovery-code
|
|
32
34
|
|
|
33
35
|
# Tell the agent about the graph (Claude Code shown; the Agents tab has the others).
|
|
34
|
-
claude mcp add etherpk -- npx @appsoftwareltd/etherpk-mcp serve --graph <graph id>
|
|
36
|
+
claude mcp add etherpk -- npx @appsoftwareltd/etherpk-mcp serve --sync-server https://sync.etherpk.com --graph <graph id>
|
|
37
|
+
```client
|
|
38
|
+
|
|
39
|
+
`npx @appsoftwareltd/etherpk-mcp graphs` lists the graphs each signed-in account can reach, by
|
|
40
|
+
name and id. For a scripted setup, `ETHERPK_PAT` and `ETHERPK_RECOVERY_CODE` stand in for the
|
|
41
|
+
prompts.
|
|
42
|
+
|
|
43
|
+
## More than one Sync Server
|
|
44
|
+
|
|
45
|
+
One computer can be signed in to several Sync Servers at once - your own self-hosted one beside
|
|
46
|
+
the managed service, say. Run `login` once per server; every login lives in the one config file.
|
|
47
|
+
`--sync-server <url>` then says which server a command means:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
npx @appsoftwareltd/etherpk-mcp login --sync-server https://sync.your-domain.example
|
|
51
|
+
npx @appsoftwareltd/etherpk-mcp graphs # every server, in turn
|
|
52
|
+
npx @appsoftwareltd/etherpk-mcp serve --sync-server https://sync.your-domain.example --graph <graph id>
|
|
53
|
+
npx @appsoftwareltd/etherpk-mcp logout --sync-server https://sync.your-domain.example
|
|
35
54
|
```
|
|
36
55
|
|
|
37
|
-
|
|
38
|
-
|
|
56
|
+
While only one server is signed in, `--sync-server` can be left off `graphs`, `serve` and
|
|
57
|
+
`logout`. With two or more, `serve` and `logout` refuse to guess and ask for it. The commands
|
|
58
|
+
the Agents tab shows always include it, so they stay right whatever else the computer is signed
|
|
59
|
+
in to. `logout --all` forgets every server at once.
|
|
39
60
|
|
|
40
61
|
Every command runs through `npx`, which fetches the package but never puts `etherpk-mcp` on your
|
|
41
62
|
PATH. If you'd rather type the short form, `npm install -g @appsoftwareltd/etherpk-mcp` once and
|
|
@@ -48,10 +69,44 @@ unique old→new replacement that merges with anyone typing elsewhere on the pag
|
|
|
48
69
|
`append_document` (a page, or a day's journal entry, created if needed) and `create_page`.
|
|
49
70
|
One running instance serves one graph.
|
|
50
71
|
|
|
51
|
-
##
|
|
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
|
+
```
|
|
52
82
|
|
|
53
|
-
|
|
54
|
-
|
|
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
|
+
- **One cache directory for both.** Setup and `serve` must see the same cache root - by default
|
|
101
|
+
`~/.cache/etherpk/mcp` (`C:\Users\<you>\.cache\etherpk\mcp` on Windows). If you set
|
|
102
|
+
`ETHERPK_MCP_CACHE_DIR` in your shell, put it in the agent registration's `env` too, since
|
|
103
|
+
the agent spawns `serve` with its own environment.
|
|
104
|
+
|
|
105
|
+
## What this client keeps on your computer
|
|
106
|
+
|
|
107
|
+
- **Keys**: `~/.config/etherpk/mcp.json`, one entry per Sync Server, readable only by your user -
|
|
108
|
+
the same trust as a browser you've signed in on. (On Windows both paths sit under your user
|
|
109
|
+
folder: `C:\Users\<you>\.config\etherpk\` and `C:\Users\<you>\.cache\etherpk\`.)
|
|
55
110
|
- **A cache of each graph you serve**: `~/.cache/etherpk/mcp/`, so a restart catches up on what
|
|
56
111
|
changed instead of downloading everything again. It holds your notes readably, like a signed-in
|
|
57
112
|
browser's own storage does. It is never the source of truth: on every start the Sync Server is
|
|
@@ -59,7 +114,8 @@ One running instance serves one graph.
|
|
|
59
114
|
newer version of this program discards a cache it no longer understands and rebuilds it.
|
|
60
115
|
|
|
61
116
|
Revoke the token at the portal to cut the agent off, and `npx @appsoftwareltd/etherpk-mcp logout`
|
|
62
|
-
to forget
|
|
117
|
+
to forget that server's keys and delete its cache on that computer (`--all` for every server,
|
|
118
|
+
which also removes the semantic runtime and model).
|
|
63
119
|
|
|
64
120
|
## Building and publishing
|
|
65
121
|
|