@mnemoverse/mcp-memory-server 0.3.1 → 0.3.3
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/LICENSE +21 -0
- package/README.md +4 -1
- package/dist/index.js +82 -40
- package/dist/index.js.map +1 -1
- package/package.json +12 -1
- package/.github/workflows/verify-configs.yml +0 -55
- package/CONTRIBUTING.md +0 -159
- package/docs/configs/claude-code-cli.sh +0 -4
- package/docs/configs/claude-desktop.json +0 -14
- package/docs/configs/cursor-deep-link.txt +0 -1
- package/docs/configs/cursor.json +0 -14
- package/docs/configs/vscode-deep-link.txt +0 -1
- package/docs/configs/vscode.json +0 -15
- package/docs/configs/windsurf.json +0 -14
- package/docs/snippets/claude-code.md +0 -9
- package/docs/snippets/claude-desktop.md +0 -20
- package/docs/snippets/cursor.md +0 -20
- package/docs/snippets/vscode.md +0 -21
- package/docs/snippets/windsurf.md +0 -20
- package/llms.txt +0 -52
- package/scripts/generate-configs.mjs +0 -495
- package/scripts/install-hooks.mjs +0 -76
- package/server.json +0 -29
- package/smithery.yaml +0 -24
- package/src/configs/source.json +0 -28
- package/src/index.ts +0 -422
- package/tsconfig.json +0 -15
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mnemoverse
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -154,7 +154,10 @@ The same API key works across all tools. Write a memory in Claude Code — read
|
|
|
154
154
|
- [API Reference](https://mnemoverse.com/docs/api/reference)
|
|
155
155
|
- [Console (get API key)](https://console.mnemoverse.com)
|
|
156
156
|
- [GitHub](https://github.com/mnemoverse/mcp-memory-server)
|
|
157
|
+
- [Releases](https://github.com/mnemoverse/mcp-memory-server/releases)
|
|
158
|
+
- [MCP Registry entry](https://registry.modelcontextprotocol.io/v0.1/servers?search=mnemoverse)
|
|
159
|
+
- [Contributing](CONTRIBUTING.md)
|
|
157
160
|
|
|
158
161
|
## License
|
|
159
162
|
|
|
160
|
-
MIT
|
|
163
|
+
[MIT](LICENSE) © Mnemoverse
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from "node:module";
|
|
2
3
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
4
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
5
|
import { z } from "zod";
|
|
6
|
+
// Version is read at runtime from package.json so there is exactly one place
|
|
7
|
+
// to bump on each release. Works both from `dist/` during local dev and from
|
|
8
|
+
// `node_modules/@mnemoverse/mcp-memory-server/dist/` after an npm install.
|
|
9
|
+
const require = createRequire(import.meta.url);
|
|
10
|
+
const pkg = require("../package.json");
|
|
5
11
|
const API_URL = process.env.MNEMOVERSE_API_URL || "https://core.mnemoverse.com/api/v1";
|
|
6
12
|
const API_KEY = process.env.MNEMOVERSE_API_KEY || "";
|
|
7
13
|
// Hard cap on tool result size — required by Claude Connectors Directory
|
|
@@ -13,6 +19,19 @@ if (!API_KEY) {
|
|
|
13
19
|
"Get your free key at https://console.mnemoverse.com");
|
|
14
20
|
process.exit(1);
|
|
15
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Fetch from the Mnemoverse core API with authentication.
|
|
24
|
+
*
|
|
25
|
+
* Generic so call sites can declare the expected response shape:
|
|
26
|
+
*
|
|
27
|
+
* const r = await apiFetch<{ stored: boolean; atom_id: string }>("/memory/write", { ... });
|
|
28
|
+
*
|
|
29
|
+
* Handles 204 No Content and empty bodies defensively — FastAPI DELETE
|
|
30
|
+
* handlers may switch to 204 in the future even though today they return
|
|
31
|
+
* a JSON body.
|
|
32
|
+
*
|
|
33
|
+
* @throws Error with message `Mnemoverse API error {status}: {body}` on non-2xx.
|
|
34
|
+
*/
|
|
16
35
|
async function apiFetch(path, options = {}) {
|
|
17
36
|
const res = await fetch(`${API_URL}${path}`, {
|
|
18
37
|
...options,
|
|
@@ -26,23 +45,37 @@ async function apiFetch(path, options = {}) {
|
|
|
26
45
|
const text = await res.text();
|
|
27
46
|
throw new Error(`Mnemoverse API error ${res.status}: ${text}`);
|
|
28
47
|
}
|
|
29
|
-
return
|
|
48
|
+
// 204 No Content or empty body — return an empty object cast as T so
|
|
49
|
+
// call sites using optional chaining still work without crashing.
|
|
50
|
+
if (res.status === 204 || res.headers.get("content-length") === "0") {
|
|
51
|
+
return {};
|
|
52
|
+
}
|
|
53
|
+
return (await res.json());
|
|
30
54
|
}
|
|
31
55
|
/**
|
|
32
56
|
* Truncate a result string to MAX_RESULT_CHARS, appending a notice if truncated.
|
|
33
57
|
* Required by Claude Connectors Directory submission policy.
|
|
58
|
+
*
|
|
59
|
+
* Defensive against splitting UTF-16 surrogate pairs: if the character right
|
|
60
|
+
* before the cut point is a high surrogate (U+D800–U+DBFF), drop it so the
|
|
61
|
+
* result stays well-formed. Otherwise an emoji or non-BMP character at the
|
|
62
|
+
* boundary can produce a lone surrogate and corrupt downstream JSON encoding.
|
|
34
63
|
*/
|
|
35
64
|
function capResult(text) {
|
|
36
65
|
if (text.length <= MAX_RESULT_CHARS)
|
|
37
66
|
return text;
|
|
38
|
-
|
|
67
|
+
let truncated = text.slice(0, MAX_RESULT_CHARS - 200);
|
|
68
|
+
const lastCode = truncated.charCodeAt(truncated.length - 1);
|
|
69
|
+
if (lastCode >= 0xd800 && lastCode <= 0xdbff) {
|
|
70
|
+
truncated = truncated.slice(0, -1);
|
|
71
|
+
}
|
|
39
72
|
return (truncated +
|
|
40
73
|
`\n\n[…truncated to fit 25K token limit. Use a more specific query or smaller top_k to see all results.]`);
|
|
41
74
|
}
|
|
42
75
|
// --- Server setup ---
|
|
43
76
|
const server = new McpServer({
|
|
44
77
|
name: "mnemoverse-memory",
|
|
45
|
-
version:
|
|
78
|
+
version: pkg.version,
|
|
46
79
|
});
|
|
47
80
|
// --- Tool: memory_write ---
|
|
48
81
|
server.registerTool("memory_write", {
|
|
@@ -70,7 +103,7 @@ server.registerTool("memory_write", {
|
|
|
70
103
|
openWorldHint: true,
|
|
71
104
|
},
|
|
72
105
|
}, async ({ content, concepts, domain }) => {
|
|
73
|
-
const
|
|
106
|
+
const r = await apiFetch("/memory/write", {
|
|
74
107
|
method: "POST",
|
|
75
108
|
body: JSON.stringify({
|
|
76
109
|
content,
|
|
@@ -78,13 +111,13 @@ server.registerTool("memory_write", {
|
|
|
78
111
|
domain: domain || "general",
|
|
79
112
|
}),
|
|
80
113
|
});
|
|
81
|
-
const
|
|
82
|
-
if (r
|
|
114
|
+
const importance = (r?.importance ?? 0).toFixed(2);
|
|
115
|
+
if (r?.stored) {
|
|
83
116
|
return {
|
|
84
117
|
content: [
|
|
85
118
|
{
|
|
86
119
|
type: "text",
|
|
87
|
-
text: `Stored (importance: ${
|
|
120
|
+
text: `Stored (importance: ${importance}). ID: ${r.atom_id ?? "unknown"}`,
|
|
88
121
|
},
|
|
89
122
|
],
|
|
90
123
|
};
|
|
@@ -93,7 +126,7 @@ server.registerTool("memory_write", {
|
|
|
93
126
|
content: [
|
|
94
127
|
{
|
|
95
128
|
type: "text",
|
|
96
|
-
text: `Filtered — ${r
|
|
129
|
+
text: `Filtered — ${r?.reason ?? "unknown reason"} (importance: ${importance})`,
|
|
97
130
|
},
|
|
98
131
|
],
|
|
99
132
|
};
|
|
@@ -127,7 +160,7 @@ server.registerTool("memory_read", {
|
|
|
127
160
|
openWorldHint: true,
|
|
128
161
|
},
|
|
129
162
|
}, async ({ query, top_k, domain }) => {
|
|
130
|
-
const
|
|
163
|
+
const r = await apiFetch("/memory/read", {
|
|
131
164
|
method: "POST",
|
|
132
165
|
body: JSON.stringify({
|
|
133
166
|
query,
|
|
@@ -136,19 +169,24 @@ server.registerTool("memory_read", {
|
|
|
136
169
|
include_associations: true,
|
|
137
170
|
}),
|
|
138
171
|
});
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
172
|
+
const items = Array.isArray(r?.items) ? r.items : [];
|
|
173
|
+
if (items.length === 0) {
|
|
141
174
|
return {
|
|
142
175
|
content: [
|
|
143
176
|
{ type: "text", text: "No memories found for this query." },
|
|
144
177
|
],
|
|
145
178
|
};
|
|
146
179
|
}
|
|
147
|
-
const lines =
|
|
148
|
-
(item
|
|
180
|
+
const lines = items.map((item, i) => {
|
|
181
|
+
const relevance = ((item?.relevance ?? 0) * 100).toFixed(0);
|
|
182
|
+
const content = item?.content ?? "(empty)";
|
|
183
|
+
const concepts = Array.isArray(item?.concepts) && item.concepts.length > 0
|
|
149
184
|
? ` (${item.concepts.join(", ")})`
|
|
150
|
-
: ""
|
|
151
|
-
|
|
185
|
+
: "";
|
|
186
|
+
return `${i + 1}. [${relevance}%] ${content}${concepts}`;
|
|
187
|
+
});
|
|
188
|
+
const searchMs = (r?.search_time_ms ?? 0).toFixed(0);
|
|
189
|
+
const text = lines.join("\n\n") + `\n\n(${searchMs}ms)`;
|
|
152
190
|
return {
|
|
153
191
|
content: [
|
|
154
192
|
{
|
|
@@ -175,21 +213,25 @@ server.registerTool("memory_feedback", {
|
|
|
175
213
|
annotations: {
|
|
176
214
|
title: "Rate Memory Helpfulness",
|
|
177
215
|
readOnlyHint: false,
|
|
178
|
-
|
|
216
|
+
// Feedback permanently mutates the memory's valence and importance
|
|
217
|
+
// scores on the backend — per MCP spec, that is a destructive update
|
|
218
|
+
// to the stored state (cf. ToolAnnotations.destructiveHint), even
|
|
219
|
+
// though the caller intends it as quality signal rather than delete.
|
|
220
|
+
destructiveHint: true,
|
|
179
221
|
idempotentHint: false,
|
|
180
222
|
openWorldHint: true,
|
|
181
223
|
},
|
|
182
224
|
}, async ({ atom_ids, outcome }) => {
|
|
183
|
-
const
|
|
225
|
+
const r = await apiFetch("/memory/feedback", {
|
|
184
226
|
method: "POST",
|
|
185
227
|
body: JSON.stringify({ atom_ids, outcome }),
|
|
186
228
|
});
|
|
187
|
-
const
|
|
229
|
+
const count = r?.updated_count ?? 0;
|
|
188
230
|
return {
|
|
189
231
|
content: [
|
|
190
232
|
{
|
|
191
233
|
type: "text",
|
|
192
|
-
text: `Feedback recorded for ${
|
|
234
|
+
text: `Feedback recorded for ${count} memor${count === 1 ? "y" : "ies"}.`,
|
|
193
235
|
},
|
|
194
236
|
],
|
|
195
237
|
};
|
|
@@ -206,13 +248,15 @@ server.registerTool("memory_stats", {
|
|
|
206
248
|
openWorldHint: true,
|
|
207
249
|
},
|
|
208
250
|
}, async () => {
|
|
209
|
-
const
|
|
210
|
-
const
|
|
251
|
+
const r = await apiFetch("/memory/stats");
|
|
252
|
+
const domains = Array.isArray(r?.domains) && r.domains.length > 0
|
|
253
|
+
? r.domains.join(", ")
|
|
254
|
+
: "general";
|
|
211
255
|
const text = [
|
|
212
|
-
`Memories: ${r
|
|
213
|
-
`Associations: ${r
|
|
214
|
-
`Domains: ${
|
|
215
|
-
`Avg quality: valence ${r
|
|
256
|
+
`Memories: ${r?.total_atoms ?? 0} (${r?.episodes ?? 0} episodes, ${r?.prototypes ?? 0} prototypes)`,
|
|
257
|
+
`Associations: ${r?.hebbian_edges ?? 0} Hebbian edges`,
|
|
258
|
+
`Domains: ${domains}`,
|
|
259
|
+
`Avg quality: valence ${(r?.avg_valence ?? 0).toFixed(2)}, importance ${(r?.avg_importance ?? 0).toFixed(2)}`,
|
|
216
260
|
].join("\n");
|
|
217
261
|
return { content: [{ type: "text", text }] };
|
|
218
262
|
});
|
|
@@ -233,13 +277,11 @@ server.registerTool("memory_delete", {
|
|
|
233
277
|
openWorldHint: true,
|
|
234
278
|
},
|
|
235
279
|
}, async ({ atom_id }) => {
|
|
236
|
-
const result = await apiFetch(`/memory/atoms/${encodeURIComponent(atom_id)}`, {
|
|
237
|
-
method: "DELETE",
|
|
238
|
-
});
|
|
239
280
|
// Core API returns { deleted: <count>, atom_id }. count == 0 means
|
|
240
|
-
// the atom didn't exist (or was already removed). count >= 1 means
|
|
241
|
-
|
|
242
|
-
|
|
281
|
+
// the atom didn't exist (or was already removed). count >= 1 means
|
|
282
|
+
// it was deleted.
|
|
283
|
+
const r = await apiFetch(`/memory/atoms/${encodeURIComponent(atom_id)}`, { method: "DELETE" });
|
|
284
|
+
if (!r?.deleted) {
|
|
243
285
|
return {
|
|
244
286
|
content: [
|
|
245
287
|
{
|
|
@@ -278,19 +320,19 @@ server.registerTool("memory_delete_domain", {
|
|
|
278
320
|
idempotentHint: true,
|
|
279
321
|
openWorldHint: true,
|
|
280
322
|
},
|
|
281
|
-
},
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
const
|
|
323
|
+
},
|
|
324
|
+
// The `confirm: z.literal(true)` in the input schema is the safety
|
|
325
|
+
// interlock — Zod rejects any call without confirm === true before it
|
|
326
|
+
// reaches this handler, so no runtime re-check is needed here.
|
|
327
|
+
async ({ domain }) => {
|
|
328
|
+
const r = await apiFetch(`/memory/domain/${encodeURIComponent(domain)}`, { method: "DELETE" });
|
|
329
|
+
const count = r?.deleted ?? 0;
|
|
330
|
+
const domainName = r?.domain ?? domain;
|
|
289
331
|
return {
|
|
290
332
|
content: [
|
|
291
333
|
{
|
|
292
334
|
type: "text",
|
|
293
|
-
text: `Deleted ${
|
|
335
|
+
text: `Deleted ${count} ${count === 1 ? "memory" : "memories"} from domain "${domainName}".`,
|
|
294
336
|
},
|
|
295
337
|
],
|
|
296
338
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,OAAO,GACX,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,oCAAoC,CAAC;AACzE,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,EAAE,CAAC;AAErD,yEAAyE;AACzE,wFAAwF;AACxF,mGAAmG;AACnG,MAAM,gBAAgB,GAAG,MAAM,GAAG,CAAC,CAAC;AAEpC,IAAI,CAAC,OAAO,EAAE,CAAC;IACb,OAAO,CAAC,KAAK,CACX,+DAA+D;QAC7D,qDAAqD,CACxD,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,KAAK,UAAU,QAAQ,CACrB,IAAY,EACZ,UAAuB,EAAE;IAEzB,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,OAAO,GAAG,IAAI,EAAE,EAAE;QAC3C,GAAG,OAAO;QAC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K;QACnB,eAAe,EAAE,IAAI;QACrB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,IAAI;KACpB;CACF;AACD,mEAAmE;AACnE,sEAAsE;AACtE,+DAA+D;AAC/D,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;IACnB,MAAM,CAAC,GAAG,MAAM,QAAQ,CACtB,kBAAkB,kBAAkB,CAAC,MAAM,CAAC,EAAE,EAC9C,EAAE,MAAM,EAAE,QAAQ,EAAE,CACrB,CAAC;IAEF,MAAM,KAAK,GAAG,CAAC,EAAE,OAAO,IAAI,CAAC,CAAC;IAC9B,MAAM,UAAU,GAAG,CAAC,EAAE,MAAM,IAAI,MAAM,CAAC;IAEvC,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAe;gBACrB,IAAI,EAAE,WAAW,KAAK,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,iBAAiB,UAAU,IAAI;aAC7F;SACF;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB;AAEhB,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mnemoverse/mcp-memory-server",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "MCP server for Mnemoverse Memory API — persistent AI memory across Claude Code, Cursor, VS Code, and any MCP client",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
},
|
|
9
9
|
"main": "./dist/index.js",
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE",
|
|
15
|
+
"package.json"
|
|
16
|
+
],
|
|
11
17
|
"scripts": {
|
|
12
18
|
"build": "tsc",
|
|
13
19
|
"dev": "tsc --watch",
|
|
@@ -23,10 +29,15 @@
|
|
|
23
29
|
"mcp",
|
|
24
30
|
"memory",
|
|
25
31
|
"ai",
|
|
32
|
+
"ai-agent",
|
|
26
33
|
"claude",
|
|
27
34
|
"cursor",
|
|
35
|
+
"vscode",
|
|
36
|
+
"chatgpt",
|
|
28
37
|
"mnemoverse",
|
|
29
38
|
"persistent-memory",
|
|
39
|
+
"shared-memory",
|
|
40
|
+
"cross-tool",
|
|
30
41
|
"model-context-protocol"
|
|
31
42
|
],
|
|
32
43
|
"author": "Mnemoverse <hello@mnemoverse.com>",
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
name: verify-configs
|
|
2
|
-
|
|
3
|
-
# Mechanical drift detection for the single-source-of-truth distribution
|
|
4
|
-
# config pipeline. See CONTRIBUTING.md for the design.
|
|
5
|
-
#
|
|
6
|
-
# This workflow MUST pass before any PR can merge into main. It runs the
|
|
7
|
-
# generator in --check mode, which:
|
|
8
|
-
# 1. Re-emits all 14 generated artifacts from src/configs/source.json
|
|
9
|
-
# 2. Re-rewrites the README.md install block from the same source
|
|
10
|
-
# 3. Compares each result to what is committed
|
|
11
|
-
# 4. Exits 1 if anything differs
|
|
12
|
-
#
|
|
13
|
-
# If you see this job fail in your PR, run `npm run generate:configs` locally
|
|
14
|
-
# and commit the regenerated files. Do NOT bypass — the whole point is that
|
|
15
|
-
# bypassing leaves the README/snippets/marketplace listings drifting from
|
|
16
|
-
# the actual npm package.
|
|
17
|
-
|
|
18
|
-
on:
|
|
19
|
-
pull_request:
|
|
20
|
-
paths:
|
|
21
|
-
- "src/configs/source.json"
|
|
22
|
-
- "scripts/generate-configs.mjs"
|
|
23
|
-
- "package.json"
|
|
24
|
-
- "README.md"
|
|
25
|
-
- "docs/configs/**"
|
|
26
|
-
- "docs/snippets/**"
|
|
27
|
-
- "smithery.yaml"
|
|
28
|
-
- "server.json"
|
|
29
|
-
- ".github/workflows/verify-configs.yml"
|
|
30
|
-
push:
|
|
31
|
-
branches: [main]
|
|
32
|
-
paths:
|
|
33
|
-
- "src/configs/source.json"
|
|
34
|
-
- "scripts/generate-configs.mjs"
|
|
35
|
-
- "package.json"
|
|
36
|
-
- "README.md"
|
|
37
|
-
- "docs/configs/**"
|
|
38
|
-
- "docs/snippets/**"
|
|
39
|
-
- "smithery.yaml"
|
|
40
|
-
- "server.json"
|
|
41
|
-
- ".github/workflows/verify-configs.yml"
|
|
42
|
-
|
|
43
|
-
jobs:
|
|
44
|
-
verify:
|
|
45
|
-
runs-on: ubuntu-latest
|
|
46
|
-
steps:
|
|
47
|
-
- uses: actions/checkout@v4
|
|
48
|
-
|
|
49
|
-
- name: Setup Node
|
|
50
|
-
uses: actions/setup-node@v4
|
|
51
|
-
with:
|
|
52
|
-
node-version: "20"
|
|
53
|
-
|
|
54
|
-
- name: Verify all 15 distribution artifacts are in sync with source.json
|
|
55
|
-
run: node scripts/generate-configs.mjs --check
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
# Contributing to mcp-memory-server
|
|
2
|
-
|
|
3
|
-
This package is the public face of Mnemoverse across every AI tool marketplace. A single typo in an install snippet breaks every Cursor / VS Code / Claude Desktop / Smithery / Official MCP Registry / GitHub README copy of it. To make that impossible, we use a **single source of truth** with mechanical drift detection.
|
|
4
|
-
|
|
5
|
-
> **Read this before editing any install snippet, config, or README install section.** The rules are short, but ignoring them produces silent breakage that we only notice when a user reports it.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## The one rule
|
|
10
|
-
|
|
11
|
-
**`src/configs/source.json` is the only file you may edit by hand for distribution metadata.** Everything else is generated and any manual edit will be overwritten — or, worse, will silently drift until CI catches it.
|
|
12
|
-
|
|
13
|
-
Files that are **generated** (never edit by hand):
|
|
14
|
-
|
|
15
|
-
| File | What it powers |
|
|
16
|
-
| ---- | -------------- |
|
|
17
|
-
| `docs/configs/cursor.json` | Cursor `.cursor/mcp.json` snippet |
|
|
18
|
-
| `docs/configs/claude-desktop.json` | Claude Desktop `claude_desktop_config.json` snippet |
|
|
19
|
-
| `docs/configs/windsurf.json` | Windsurf `mcp_config.json` snippet |
|
|
20
|
-
| `docs/configs/vscode.json` | VS Code `.vscode/mcp.json` snippet (uses `servers`, not `mcpServers`) |
|
|
21
|
-
| `docs/configs/cursor-deep-link.txt` | Base64-encoded `cursor://...` install URL |
|
|
22
|
-
| `docs/configs/vscode-deep-link.txt` | URL-encoded `vscode:mcp/install?...` URL |
|
|
23
|
-
| `docs/configs/claude-code-cli.sh` | `claude mcp add ...` shell command |
|
|
24
|
-
| `smithery.yaml` | Smithery.ai `configSchema` + `commandFunction` |
|
|
25
|
-
| `server.json` | Official MCP Registry manifest |
|
|
26
|
-
| `docs/snippets/claude-code.md` | Markdown partial — Claude Code install (consumed by README + docs site) |
|
|
27
|
-
| `docs/snippets/cursor.md` | Markdown partial — Cursor install |
|
|
28
|
-
| `docs/snippets/claude-desktop.md` | Markdown partial — Claude Desktop install |
|
|
29
|
-
| `docs/snippets/vscode.md` | Markdown partial — VS Code install |
|
|
30
|
-
| `docs/snippets/windsurf.md` | Markdown partial — Windsurf install |
|
|
31
|
-
| `README.md` (only the section between `<!-- INSTALL_SNIPPETS_START -->` and `<!-- INSTALL_SNIPPETS_END -->`) | Top-level install section, in-place rewritten by the generator |
|
|
32
|
-
|
|
33
|
-
If your editor pops up a diff in any of these files and you didn't change `src/configs/source.json`, the diff is wrong. Discard it.
|
|
34
|
-
|
|
35
|
-
## How to change a distribution config
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
# 1. Edit the source
|
|
39
|
-
$EDITOR src/configs/source.json
|
|
40
|
-
|
|
41
|
-
# 2. Regenerate everything
|
|
42
|
-
npm run generate:configs
|
|
43
|
-
|
|
44
|
-
# 3. Verify nothing else drifted
|
|
45
|
-
npm run verify:configs
|
|
46
|
-
|
|
47
|
-
# 4. Commit BOTH the source change AND every regenerated file
|
|
48
|
-
git add src/configs/source.json docs/ smithery.yaml server.json README.md
|
|
49
|
-
git commit -m "..."
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
If you forget step 2 and push only the source change, **CI will fail on the drift check** before the PR can merge. This is intentional — mechanical enforcement is the whole point.
|
|
53
|
-
|
|
54
|
-
## CI and the optional pre-push hook
|
|
55
|
-
|
|
56
|
-
There are two layers of drift detection — they catch the same problem at different points and you should not skip either.
|
|
57
|
-
|
|
58
|
-
### Layer 1: GitHub Actions (mandatory)
|
|
59
|
-
|
|
60
|
-
Every PR runs [`.github/workflows/verify-configs.yml`](.github/workflows/verify-configs.yml), which executes `node scripts/generate-configs.mjs --check`. The job fails the build if any of the 15 generated artifacts (or the README install block) does not match what would be re-emitted from `src/configs/source.json`. **The job is required for merge into `main`.** This is the authoritative gate — it works for forks, blocks PRs, can't be bypassed by `--no-verify`, and protects you from your own typos.
|
|
61
|
-
|
|
62
|
-
### Layer 2: Local pre-push hook (recommended, opt-in)
|
|
63
|
-
|
|
64
|
-
Faster feedback (~50 ms vs ~30-60 s for CI). Catches the drift before the commit even hits GitHub. Install once per clone:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
npm run install-hooks
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
This writes `.git/hooks/pre-push` (per-clone, not committed) that runs `npm run verify:configs` before every push. If it fails, your push is aborted and you get the same `✗ Drift detected: ...` message you would have seen in CI — just locally and 1000× faster.
|
|
71
|
-
|
|
72
|
-
If you ever need to bypass it for a one-off (e.g., pushing a temporary branch you don't care about), use `git push --no-verify`. **Do not bypass for branches that target `main`** — CI will reject them anyway.
|
|
73
|
-
|
|
74
|
-
We deliberately avoid `husky` and `pre-commit` — those would add a dependency and force the hook on everyone, including casual contributors who just want to fix a typo. The opt-in script is one command and zero deps.
|
|
75
|
-
|
|
76
|
-
## How `npm run generate:configs` works
|
|
77
|
-
|
|
78
|
-
`scripts/generate-configs.mjs` reads `src/configs/source.json` and emits 15 artifacts:
|
|
79
|
-
|
|
80
|
-
1. **9 distribution configs** in `docs/configs/`, plus `smithery.yaml` and `server.json` at the repo root.
|
|
81
|
-
2. **5 Markdown partials** in `docs/snippets/` — these are the same install snippets, formatted for inclusion in any Markdown context (README, mnemoverse-docs site pages, llms.txt, etc.).
|
|
82
|
-
3. **1 in-place rewrite** of the install section in `README.md`, between the `<!-- INSTALL_SNIPPETS_START -->` and `<!-- INSTALL_SNIPPETS_END -->` HTML comment markers. The rest of the README is human-prose and is left untouched.
|
|
83
|
-
|
|
84
|
-
The generator is **idempotent**: running it twice in a row produces zero changes the second time. CI relies on this property — it runs the generator with `--check`, which verifies every output matches what is committed and fails the build otherwise.
|
|
85
|
-
|
|
86
|
-
## How to add a new distribution channel
|
|
87
|
-
|
|
88
|
-
1. Add a new generator function in `scripts/generate-configs.mjs` that produces the channel's config from the data already in `source.json` (do NOT introduce a parallel data source — extend `source.json` instead if you need new fields).
|
|
89
|
-
2. Add the new artifact to the `OUTPUTS` array.
|
|
90
|
-
3. If the channel needs a Markdown install snippet, also add a `snippet*()` helper and a `docs/snippets/{channel}.md` entry. If the snippet should also appear in README, append it to `readmeInstallBlock()`.
|
|
91
|
-
4. Update this `CONTRIBUTING.md` table above with the new file.
|
|
92
|
-
5. Run `npm run generate:configs && npm run verify:configs`. Both must succeed.
|
|
93
|
-
6. Commit everything together — the source change, the new generator function, the new generated files, and the updated `CONTRIBUTING.md`.
|
|
94
|
-
|
|
95
|
-
## Things you must not do
|
|
96
|
-
|
|
97
|
-
- ❌ **Edit a generated file directly.** Even a one-character fix will be reverted on the next `generate:configs` and CI will fail in the meantime.
|
|
98
|
-
- ❌ **Bypass the drift check.** Do not pass `--no-verify` or skip CI. The check exists because we got bitten by 8 copies of the same install snippet drifting in different directions.
|
|
99
|
-
- ❌ **Hard-code distribution metadata in `src/index.ts`.** The MCP server source code only knows about tools, transport, and the API URL. Channel-specific stuff lives in `source.json`.
|
|
100
|
-
- ❌ **Create a parallel "config" file alongside `source.json`.** If `source.json` is missing a field you need, add it to `source.json` and update the generator. One source.
|
|
101
|
-
|
|
102
|
-
## Versioning and releases
|
|
103
|
-
|
|
104
|
-
`package.json#version` → `src/index.ts#version` (server name reported to MCP clients) → `server.json#version` (Official MCP Registry).
|
|
105
|
-
|
|
106
|
-
Today these are bumped manually and kept in sync by hand. If they drift, the generator's drift check on `server.json` will catch it (because `server.json` is generated from `package.json#version`).
|
|
107
|
-
|
|
108
|
-
When releasing:
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
# 1. Bump version in package.json
|
|
112
|
-
$EDITOR package.json
|
|
113
|
-
|
|
114
|
-
# 2. Match it in src/index.ts (search for version: "...")
|
|
115
|
-
$EDITOR src/index.ts
|
|
116
|
-
|
|
117
|
-
# 3. Regenerate (this updates server.json to match)
|
|
118
|
-
npm run generate:configs
|
|
119
|
-
|
|
120
|
-
# 4. Build and run e2e
|
|
121
|
-
npm run build
|
|
122
|
-
# ... live e2e against production ...
|
|
123
|
-
|
|
124
|
-
# 5. Commit, tag, push, publish
|
|
125
|
-
git add -A && git commit -m "chore: release vX.Y.Z"
|
|
126
|
-
git tag -a vX.Y.Z -m "..."
|
|
127
|
-
git push origin main vX.Y.Z
|
|
128
|
-
npm publish
|
|
129
|
-
gh release create vX.Y.Z --notes "..."
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
A future PR will templatize `src/index.ts#version` so `package.json` is the only place to edit it.
|
|
133
|
-
|
|
134
|
-
## Testing changes locally
|
|
135
|
-
|
|
136
|
-
The fastest feedback loop is:
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
# Build
|
|
140
|
-
npm run build
|
|
141
|
-
|
|
142
|
-
# Pack into an installable tarball
|
|
143
|
-
npm pack
|
|
144
|
-
|
|
145
|
-
# Smoke test in an isolated dir
|
|
146
|
-
mkdir /tmp/mcp-smoke && cd /tmp/mcp-smoke
|
|
147
|
-
npm init -y >/dev/null
|
|
148
|
-
npm install /path/to/mcp-memory-server/mnemoverse-mcp-memory-server-X.Y.Z.tgz
|
|
149
|
-
MNEMOVERSE_API_KEY=mk_test_fake ./node_modules/.bin/mcp-memory-server
|
|
150
|
-
# → should print "Error: MNEMOVERSE_API_KEY environment variable is required" if unset, or start a stdio MCP server if set
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
For end-to-end testing against the live API, set a real `mk_live_*` key and pipe a few JSON-RPC messages on stdin (`initialize`, `notifications/initialized`, `tools/call`).
|
|
154
|
-
|
|
155
|
-
## Who to ask
|
|
156
|
-
|
|
157
|
-
- For the design rationale behind single-source-of-truth: see [PR #6](https://github.com/mnemoverse/mcp-memory-server/pull/6).
|
|
158
|
-
- For the README rewriter design: see [PR #11](https://github.com/mnemoverse/mcp-memory-server/pull/11).
|
|
159
|
-
- For everything else, open an issue.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
cursor://anysphere.cursor-deeplink/mcp/install?name=mnemoverse&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBtbmVtb3ZlcnNlL21jcC1tZW1vcnktc2VydmVyQGxhdGVzdCJdLCJlbnYiOnsiTU5FTU9WRVJTRV9BUElfS0VZIjoibWtfbGl2ZV9ZT1VSX0tFWSJ9fQ==
|
package/docs/configs/cursor.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
vscode:mcp/install?%7B%22name%22%3A%22mnemoverse%22%2C%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40mnemoverse%2Fmcp-memory-server%40latest%22%5D%2C%22env%22%3A%7B%22MNEMOVERSE_API_KEY%22%3A%22mk_live_YOUR_KEY%22%7D%7D
|
package/docs/configs/vscode.json
DELETED