@membank/mcp 0.0.0-dev-20260427133418
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/dist/index.d.mts +5 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +300 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +32 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";iBAIsB,WAAA,CAAA,GAAe,OAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
2
|
+
import { DatabaseManager, EmbeddingService, MemoryRepository, QueryEngine, listMemoryTypes, resolveScope } from "@membank/core";
|
|
3
|
+
import { Server } from "@modelcontextprotocol/sdk/server";
|
|
4
|
+
import { CallToolRequestSchema, ErrorCode, ListToolsRequestSchema, McpError } from "@modelcontextprotocol/sdk/types";
|
|
5
|
+
//#region src/server.ts
|
|
6
|
+
const SERVER_NAME = "membank";
|
|
7
|
+
const SERVER_VERSION = "0.1.0";
|
|
8
|
+
function initCore(options = {}) {
|
|
9
|
+
const db = options.useInMemoryDb ? DatabaseManager.openInMemory() : DatabaseManager.open(options.dbPath);
|
|
10
|
+
const embedding = new EmbeddingService();
|
|
11
|
+
const repo = new MemoryRepository(db, embedding);
|
|
12
|
+
return {
|
|
13
|
+
db,
|
|
14
|
+
embedding,
|
|
15
|
+
repo,
|
|
16
|
+
query: new QueryEngine(db, embedding, repo)
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function createServer(core) {
|
|
20
|
+
const server = new Server({
|
|
21
|
+
name: SERVER_NAME,
|
|
22
|
+
version: SERVER_VERSION
|
|
23
|
+
}, { capabilities: { tools: {} } });
|
|
24
|
+
server.setRequestHandler(ListToolsRequestSchema, () => ({ tools: [
|
|
25
|
+
{
|
|
26
|
+
name: "list_memory_types",
|
|
27
|
+
description: "Returns the ordered list of memory type values supported by membank.",
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: "object",
|
|
30
|
+
properties: {},
|
|
31
|
+
required: []
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "save_memory",
|
|
36
|
+
description: "Save a new memory. Handles deduplication automatically — near-identical memories (cosine similarity >0.92, same type and scope) overwrite the existing record.",
|
|
37
|
+
inputSchema: {
|
|
38
|
+
type: "object",
|
|
39
|
+
properties: {
|
|
40
|
+
content: {
|
|
41
|
+
type: "string",
|
|
42
|
+
description: "Memory content to save"
|
|
43
|
+
},
|
|
44
|
+
type: {
|
|
45
|
+
type: "string",
|
|
46
|
+
enum: [
|
|
47
|
+
"correction",
|
|
48
|
+
"preference",
|
|
49
|
+
"decision",
|
|
50
|
+
"learning",
|
|
51
|
+
"fact"
|
|
52
|
+
],
|
|
53
|
+
description: "Memory type"
|
|
54
|
+
},
|
|
55
|
+
tags: {
|
|
56
|
+
type: "array",
|
|
57
|
+
items: { type: "string" },
|
|
58
|
+
description: "Optional tags"
|
|
59
|
+
},
|
|
60
|
+
scope: {
|
|
61
|
+
type: "string",
|
|
62
|
+
description: "Scope (defaults to resolved project scope)"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
required: ["content", "type"]
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "update_memory",
|
|
70
|
+
description: "Update the content and/or tags of an existing memory by id.",
|
|
71
|
+
inputSchema: {
|
|
72
|
+
type: "object",
|
|
73
|
+
properties: {
|
|
74
|
+
id: {
|
|
75
|
+
type: "string",
|
|
76
|
+
description: "Memory id to update"
|
|
77
|
+
},
|
|
78
|
+
content: {
|
|
79
|
+
type: "string",
|
|
80
|
+
description: "New content for the memory"
|
|
81
|
+
},
|
|
82
|
+
tags: {
|
|
83
|
+
type: "array",
|
|
84
|
+
items: { type: "string" },
|
|
85
|
+
description: "Replacement tags (optional)"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
required: ["id", "content"]
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "delete_memory",
|
|
93
|
+
description: "Delete a memory by id.",
|
|
94
|
+
inputSchema: {
|
|
95
|
+
type: "object",
|
|
96
|
+
properties: { id: {
|
|
97
|
+
type: "string",
|
|
98
|
+
description: "Memory id to delete"
|
|
99
|
+
} },
|
|
100
|
+
required: ["id"]
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "query_memory",
|
|
105
|
+
description: "Search memories by semantic similarity. Returns results ranked by confidence score.",
|
|
106
|
+
inputSchema: {
|
|
107
|
+
type: "object",
|
|
108
|
+
properties: {
|
|
109
|
+
query: {
|
|
110
|
+
type: "string",
|
|
111
|
+
description: "Search text"
|
|
112
|
+
},
|
|
113
|
+
type: {
|
|
114
|
+
type: "string",
|
|
115
|
+
enum: [
|
|
116
|
+
"correction",
|
|
117
|
+
"preference",
|
|
118
|
+
"decision",
|
|
119
|
+
"learning",
|
|
120
|
+
"fact"
|
|
121
|
+
],
|
|
122
|
+
description: "Filter by memory type"
|
|
123
|
+
},
|
|
124
|
+
scope: {
|
|
125
|
+
type: "string",
|
|
126
|
+
description: "Filter by scope"
|
|
127
|
+
},
|
|
128
|
+
limit: {
|
|
129
|
+
type: "number",
|
|
130
|
+
description: "Maximum results to return (default 10)"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
required: ["query"]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
] }));
|
|
137
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
138
|
+
if (request.params.name === "list_memory_types") try {
|
|
139
|
+
return { content: [{
|
|
140
|
+
type: "text",
|
|
141
|
+
text: JSON.stringify(listMemoryTypes())
|
|
142
|
+
}] };
|
|
143
|
+
} catch (err) {
|
|
144
|
+
return {
|
|
145
|
+
content: [{
|
|
146
|
+
type: "text",
|
|
147
|
+
text: err instanceof Error ? err.message : String(err)
|
|
148
|
+
}],
|
|
149
|
+
isError: true
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
if (request.params.name === "save_memory") {
|
|
153
|
+
const args = request.params.arguments;
|
|
154
|
+
const content = args?.content;
|
|
155
|
+
const type = args?.type;
|
|
156
|
+
if (typeof content !== "string" || content.trim() === "") throw new McpError(ErrorCode.InvalidParams, "content is required and must be a non-empty string");
|
|
157
|
+
if (typeof type !== "string" || ![
|
|
158
|
+
"correction",
|
|
159
|
+
"preference",
|
|
160
|
+
"decision",
|
|
161
|
+
"learning",
|
|
162
|
+
"fact"
|
|
163
|
+
].includes(type)) throw new McpError(ErrorCode.InvalidParams, "type is required and must be one of: correction, preference, decision, learning, fact");
|
|
164
|
+
const tags = Array.isArray(args?.tags) ? args.tags : void 0;
|
|
165
|
+
const scope = typeof args?.scope === "string" ? args.scope : await resolveScope();
|
|
166
|
+
try {
|
|
167
|
+
const memory = await core.repo.save({
|
|
168
|
+
content,
|
|
169
|
+
type,
|
|
170
|
+
tags,
|
|
171
|
+
scope
|
|
172
|
+
});
|
|
173
|
+
return { content: [{
|
|
174
|
+
type: "text",
|
|
175
|
+
text: JSON.stringify(memory)
|
|
176
|
+
}] };
|
|
177
|
+
} catch (err) {
|
|
178
|
+
return {
|
|
179
|
+
content: [{
|
|
180
|
+
type: "text",
|
|
181
|
+
text: err instanceof Error ? err.message : String(err)
|
|
182
|
+
}],
|
|
183
|
+
isError: true
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
if (request.params.name === "update_memory") {
|
|
188
|
+
const args = request.params.arguments;
|
|
189
|
+
const id = args?.id;
|
|
190
|
+
const content = args?.content;
|
|
191
|
+
if (typeof id !== "string" || id.trim() === "") throw new McpError(ErrorCode.InvalidParams, "id is required and must be a non-empty string");
|
|
192
|
+
if (typeof content !== "string" || content.trim() === "") throw new McpError(ErrorCode.InvalidParams, "content is required and must be a non-empty string");
|
|
193
|
+
const tags = Array.isArray(args?.tags) ? args.tags : void 0;
|
|
194
|
+
try {
|
|
195
|
+
const memory = await core.repo.update(id, {
|
|
196
|
+
content,
|
|
197
|
+
tags
|
|
198
|
+
});
|
|
199
|
+
return { content: [{
|
|
200
|
+
type: "text",
|
|
201
|
+
text: JSON.stringify(memory)
|
|
202
|
+
}] };
|
|
203
|
+
} catch (err) {
|
|
204
|
+
return {
|
|
205
|
+
content: [{
|
|
206
|
+
type: "text",
|
|
207
|
+
text: err instanceof Error ? err.message : String(err)
|
|
208
|
+
}],
|
|
209
|
+
isError: true
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if (request.params.name === "delete_memory") {
|
|
214
|
+
const id = request.params.arguments?.id;
|
|
215
|
+
if (typeof id !== "string" || id.trim() === "") throw new McpError(ErrorCode.InvalidParams, "id is required and must be a non-empty string");
|
|
216
|
+
try {
|
|
217
|
+
if (!(core.db.db.prepare(`SELECT id FROM memories WHERE id = ?`).get(id) !== void 0)) return {
|
|
218
|
+
content: [{
|
|
219
|
+
type: "text",
|
|
220
|
+
text: `Memory not found: ${id}`
|
|
221
|
+
}],
|
|
222
|
+
isError: true
|
|
223
|
+
};
|
|
224
|
+
await core.repo.delete(id);
|
|
225
|
+
return { content: [{
|
|
226
|
+
type: "text",
|
|
227
|
+
text: JSON.stringify({
|
|
228
|
+
success: true,
|
|
229
|
+
id
|
|
230
|
+
})
|
|
231
|
+
}] };
|
|
232
|
+
} catch (err) {
|
|
233
|
+
return {
|
|
234
|
+
content: [{
|
|
235
|
+
type: "text",
|
|
236
|
+
text: err instanceof Error ? err.message : String(err)
|
|
237
|
+
}],
|
|
238
|
+
isError: true
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
if (request.params.name === "query_memory") {
|
|
243
|
+
const args = request.params.arguments;
|
|
244
|
+
const queryText = args?.query;
|
|
245
|
+
if (typeof queryText !== "string" || queryText.trim() === "") throw new McpError(ErrorCode.InvalidParams, "query is required and must be a non-empty string");
|
|
246
|
+
const type = args?.type;
|
|
247
|
+
const scope = args?.scope;
|
|
248
|
+
const limit = typeof args?.limit === "number" ? args.limit : 10;
|
|
249
|
+
try {
|
|
250
|
+
const serialised = (await core.query.query({
|
|
251
|
+
query: queryText,
|
|
252
|
+
type,
|
|
253
|
+
scope,
|
|
254
|
+
limit
|
|
255
|
+
})).map((r) => ({
|
|
256
|
+
id: r.id,
|
|
257
|
+
content: r.content,
|
|
258
|
+
type: r.type,
|
|
259
|
+
tags: r.tags,
|
|
260
|
+
scope: r.scope,
|
|
261
|
+
pinned: r.pinned,
|
|
262
|
+
score: r.score
|
|
263
|
+
}));
|
|
264
|
+
return { content: [{
|
|
265
|
+
type: "text",
|
|
266
|
+
text: JSON.stringify(serialised)
|
|
267
|
+
}] };
|
|
268
|
+
} catch (err) {
|
|
269
|
+
return {
|
|
270
|
+
content: [{
|
|
271
|
+
type: "text",
|
|
272
|
+
text: err instanceof Error ? err.message : String(err)
|
|
273
|
+
}],
|
|
274
|
+
isError: true
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
throw new Error(`Unknown tool: ${request.params.name}`);
|
|
279
|
+
});
|
|
280
|
+
return server;
|
|
281
|
+
}
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region src/index.ts
|
|
284
|
+
async function startServer() {
|
|
285
|
+
let core;
|
|
286
|
+
try {
|
|
287
|
+
core = initCore();
|
|
288
|
+
} catch (err) {
|
|
289
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
290
|
+
process.stderr.write(`membank: failed to initialise core: ${message}\n`);
|
|
291
|
+
process.exit(1);
|
|
292
|
+
}
|
|
293
|
+
const server = createServer(core);
|
|
294
|
+
const transport = new StdioServerTransport();
|
|
295
|
+
await server.connect(transport);
|
|
296
|
+
}
|
|
297
|
+
//#endregion
|
|
298
|
+
export { startServer };
|
|
299
|
+
|
|
300
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/server.ts","../src/index.ts"],"sourcesContent":["import type { MemoryType } from \"@membank/core\";\nimport {\n DatabaseManager,\n EmbeddingService,\n listMemoryTypes,\n MemoryRepository,\n QueryEngine,\n resolveScope,\n} from \"@membank/core\";\nimport { Server } from \"@modelcontextprotocol/sdk/server\";\nimport {\n CallToolRequestSchema,\n ErrorCode,\n ListToolsRequestSchema,\n McpError,\n} from \"@modelcontextprotocol/sdk/types\";\n\nconst SERVER_NAME = \"membank\";\nconst SERVER_VERSION = \"0.1.0\";\n\nexport interface CoreServices {\n db: DatabaseManager;\n embedding: EmbeddingService;\n repo: MemoryRepository;\n query: QueryEngine;\n}\n\nexport interface ServerOptions {\n dbPath?: string;\n useInMemoryDb?: boolean;\n}\n\nexport function initCore(options: ServerOptions = {}): CoreServices {\n const db = options.useInMemoryDb\n ? DatabaseManager.openInMemory()\n : DatabaseManager.open(options.dbPath);\n const embedding = new EmbeddingService();\n const repo = new MemoryRepository(db, embedding);\n const query = new QueryEngine(db, embedding, repo);\n return { db, embedding, repo, query };\n}\n\nexport function createServer(core: CoreServices): Server {\n const server = new Server(\n { name: SERVER_NAME, version: SERVER_VERSION },\n { capabilities: { tools: {} } }\n );\n\n server.setRequestHandler(ListToolsRequestSchema, () => ({\n tools: [\n {\n name: \"list_memory_types\",\n description: \"Returns the ordered list of memory type values supported by membank.\",\n inputSchema: { type: \"object\", properties: {}, required: [] },\n },\n {\n name: \"save_memory\",\n description:\n \"Save a new memory. Handles deduplication automatically — near-identical memories (cosine similarity >0.92, same type and scope) overwrite the existing record.\",\n inputSchema: {\n type: \"object\",\n properties: {\n content: { type: \"string\", description: \"Memory content to save\" },\n type: {\n type: \"string\",\n enum: [\"correction\", \"preference\", \"decision\", \"learning\", \"fact\"],\n description: \"Memory type\",\n },\n tags: {\n type: \"array\",\n items: { type: \"string\" },\n description: \"Optional tags\",\n },\n scope: { type: \"string\", description: \"Scope (defaults to resolved project scope)\" },\n },\n required: [\"content\", \"type\"],\n },\n },\n {\n name: \"update_memory\",\n description: \"Update the content and/or tags of an existing memory by id.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\", description: \"Memory id to update\" },\n content: { type: \"string\", description: \"New content for the memory\" },\n tags: {\n type: \"array\",\n items: { type: \"string\" },\n description: \"Replacement tags (optional)\",\n },\n },\n required: [\"id\", \"content\"],\n },\n },\n {\n name: \"delete_memory\",\n description: \"Delete a memory by id.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\", description: \"Memory id to delete\" },\n },\n required: [\"id\"],\n },\n },\n {\n name: \"query_memory\",\n description:\n \"Search memories by semantic similarity. Returns results ranked by confidence score.\",\n inputSchema: {\n type: \"object\",\n properties: {\n query: { type: \"string\", description: \"Search text\" },\n type: {\n type: \"string\",\n enum: [\"correction\", \"preference\", \"decision\", \"learning\", \"fact\"],\n description: \"Filter by memory type\",\n },\n scope: { type: \"string\", description: \"Filter by scope\" },\n limit: { type: \"number\", description: \"Maximum results to return (default 10)\" },\n },\n required: [\"query\"],\n },\n },\n ],\n }));\n\n server.setRequestHandler(CallToolRequestSchema, async (request) => {\n if (request.params.name === \"list_memory_types\") {\n try {\n return {\n content: [{ type: \"text\", text: JSON.stringify(listMemoryTypes()) }],\n };\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n return { content: [{ type: \"text\", text: message }], isError: true };\n }\n }\n\n if (request.params.name === \"save_memory\") {\n const args = request.params.arguments as Record<string, unknown> | undefined;\n const content = args?.content;\n const type = args?.type;\n\n if (typeof content !== \"string\" || content.trim() === \"\") {\n throw new McpError(\n ErrorCode.InvalidParams,\n \"content is required and must be a non-empty string\"\n );\n }\n\n if (\n typeof type !== \"string\" ||\n ![\"correction\", \"preference\", \"decision\", \"learning\", \"fact\"].includes(type)\n ) {\n throw new McpError(\n ErrorCode.InvalidParams,\n \"type is required and must be one of: correction, preference, decision, learning, fact\"\n );\n }\n\n const tags = Array.isArray(args?.tags) ? (args.tags as string[]) : undefined;\n const scope = typeof args?.scope === \"string\" ? args.scope : await resolveScope();\n\n try {\n const memory = await core.repo.save({\n content,\n type: type as MemoryType,\n tags,\n scope,\n });\n\n return {\n content: [{ type: \"text\", text: JSON.stringify(memory) }],\n };\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n return { content: [{ type: \"text\", text: message }], isError: true };\n }\n }\n\n if (request.params.name === \"update_memory\") {\n const args = request.params.arguments as Record<string, unknown> | undefined;\n const id = args?.id;\n const content = args?.content;\n\n if (typeof id !== \"string\" || id.trim() === \"\") {\n throw new McpError(\n ErrorCode.InvalidParams,\n \"id is required and must be a non-empty string\"\n );\n }\n\n if (typeof content !== \"string\" || content.trim() === \"\") {\n throw new McpError(\n ErrorCode.InvalidParams,\n \"content is required and must be a non-empty string\"\n );\n }\n\n const tags = Array.isArray(args?.tags) ? (args.tags as string[]) : undefined;\n\n try {\n const memory = await core.repo.update(id, { content, tags });\n return { content: [{ type: \"text\", text: JSON.stringify(memory) }] };\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n return { content: [{ type: \"text\", text: message }], isError: true };\n }\n }\n\n if (request.params.name === \"delete_memory\") {\n const args = request.params.arguments as Record<string, unknown> | undefined;\n const id = args?.id;\n\n if (typeof id !== \"string\" || id.trim() === \"\") {\n throw new McpError(\n ErrorCode.InvalidParams,\n \"id is required and must be a non-empty string\"\n );\n }\n\n try {\n const exists =\n core.db.db\n .prepare<[string], { id: string }>(`SELECT id FROM memories WHERE id = ?`)\n .get(id) !== undefined;\n\n if (!exists) {\n return {\n content: [{ type: \"text\", text: `Memory not found: ${id}` }],\n isError: true,\n };\n }\n\n await core.repo.delete(id);\n return { content: [{ type: \"text\", text: JSON.stringify({ success: true, id }) }] };\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n return { content: [{ type: \"text\", text: message }], isError: true };\n }\n }\n\n if (request.params.name === \"query_memory\") {\n const args = request.params.arguments as Record<string, unknown> | undefined;\n const queryText = args?.query;\n\n if (typeof queryText !== \"string\" || queryText.trim() === \"\") {\n throw new McpError(\n ErrorCode.InvalidParams,\n \"query is required and must be a non-empty string\"\n );\n }\n\n const type = args?.type as MemoryType | undefined;\n const scope = args?.scope as string | undefined;\n const limit = typeof args?.limit === \"number\" ? args.limit : 10;\n\n try {\n const results = await core.query.query({ query: queryText, type, scope, limit });\n\n const serialised = results.map((r) => ({\n id: r.id,\n content: r.content,\n type: r.type,\n tags: r.tags,\n scope: r.scope,\n pinned: r.pinned,\n score: r.score,\n }));\n\n return {\n content: [{ type: \"text\", text: JSON.stringify(serialised) }],\n };\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n return { content: [{ type: \"text\", text: message }], isError: true };\n }\n }\n\n throw new Error(`Unknown tool: ${request.params.name}`);\n });\n\n return server;\n}\n","import { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\r\nimport type { CoreServices } from \"./server.js\";\r\nimport { createServer, initCore } from \"./server.js\";\r\n\r\nexport async function startServer(): Promise<void> {\r\n let core: CoreServices;\r\n try {\r\n core = initCore();\r\n } catch (err) {\r\n const message = err instanceof Error ? err.message : String(err);\r\n process.stderr.write(`membank: failed to initialise core: ${message}\\n`);\r\n process.exit(1);\r\n }\r\n\r\n const server = createServer(core);\r\n const transport = new StdioServerTransport();\r\n await server.connect(transport);\r\n}\r\n"],"mappings":";;;;;AAiBA,MAAM,cAAc;AACpB,MAAM,iBAAiB;AAcvB,SAAgB,SAAS,UAAyB,EAAE,EAAgB;CAClE,MAAM,KAAK,QAAQ,gBACf,gBAAgB,cAAc,GAC9B,gBAAgB,KAAK,QAAQ,OAAO;CACxC,MAAM,YAAY,IAAI,kBAAkB;CACxC,MAAM,OAAO,IAAI,iBAAiB,IAAI,UAAU;AAEhD,QAAO;EAAE;EAAI;EAAW;EAAM,OAAA,IADZ,YAAY,IAAI,WAAW,KACV;EAAE;;AAGvC,S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}
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@membank/mcp",
|
|
3
|
+
"version": "0.0.0-dev-20260427133418",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"import": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.mts"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
16
|
+
"@membank/core": "0.0.0-dev-20260427133418"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/node": "^25.6.0",
|
|
20
|
+
"typescript": "^6.0.3",
|
|
21
|
+
"vitest": "^3.2.4"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsdown",
|
|
25
|
+
"dev": "tsdown --watch",
|
|
26
|
+
"typecheck": "tsc --noEmit",
|
|
27
|
+
"lint": "biome check ./src",
|
|
28
|
+
"test": "vitest run",
|
|
29
|
+
"test:watch": "vitest",
|
|
30
|
+
"clean": "rm -rf dist *.tsbuildinfo"
|
|
31
|
+
}
|
|
32
|
+
}
|