@bsbofmusic/memos-memu-local-memory-tools-for-agent 1.0.0 → 1.0.2

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.
@@ -0,0 +1,85 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * MCP server entry point — memos-memu-local-memory-tools-for-agent
4
+ * Receives stdio JSON-RPC from mcporter and dispatches to tools.
5
+ */
6
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
7
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
8
+ import {
9
+ CallToolRequestSchema,
10
+ ListToolsRequestSchema,
11
+ } from '@modelcontextprotocol/sdk/types.js';
12
+
13
+ import { install_memory_system } from '../src/tools/install.js';
14
+ import { memos_query } from '../src/tools/memos.js';
15
+ import { memuk_search } from '../src/tools/memuk.js';
16
+ import { verify_memory_system } from '../src/tools/verify.js';
17
+
18
+ const server = new Server(
19
+ { name: 'memos-memu-local-memory-tools-for-agent', version: '1.0.1' },
20
+ { capabilities: { tools: {} } }
21
+ );
22
+
23
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
24
+ tools: [
25
+ {
26
+ name: 'install_memory_system',
27
+ description: 'One-shot install of the full memos + memuK memory system.',
28
+ inputSchema: { type: 'object', properties: {} },
29
+ },
30
+ {
31
+ name: 'verify_memory_system',
32
+ description: 'Smoke-test all memory system components.',
33
+ inputSchema: { type: 'object', properties: {} },
34
+ },
35
+ {
36
+ name: 'memos_query',
37
+ description: 'Query memos PostgreSQL for conversation history.',
38
+ inputSchema: {
39
+ type: 'object',
40
+ properties: {
41
+ query: { type: 'string' },
42
+ limit: { type: 'number', default: 10 },
43
+ },
44
+ required: ['query'],
45
+ },
46
+ },
47
+ {
48
+ name: 'memuk_search',
49
+ description: 'Search memuK SQLite for memory summaries.',
50
+ inputSchema: {
51
+ type: 'object',
52
+ properties: {
53
+ query: { type: 'string' },
54
+ limit: { type: 'number', default: 5 },
55
+ },
56
+ required: ['query'],
57
+ },
58
+ },
59
+ ],
60
+ }));
61
+
62
+ server.setRequestHandler(CallToolRequestSchema, async ({ params }) => {
63
+ const { name, arguments: args = {} } = params;
64
+ try {
65
+ switch (name) {
66
+ case 'install_memory_system': return await install_memory_system(args);
67
+ case 'verify_memory_system': return await verify_memory_system(args);
68
+ case 'memos_query': return await memos_query(args);
69
+ case 'memuk_search': return await memuk_search(args);
70
+ default: return { content: [{ type: 'text', text: `Unknown tool: ${name}` }], isError: true };
71
+ }
72
+ } catch (err) {
73
+ return { content: [{ type: 'text', text: `❌ ${err.message}` }], isError: true };
74
+ }
75
+ });
76
+
77
+ async function main() {
78
+ const transport = new StdioServerTransport();
79
+ await server.connect(transport);
80
+ }
81
+
82
+ main().catch(err => {
83
+ console.error('Server fatal:', err);
84
+ process.exit(1);
85
+ });
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@bsbofmusic/memos-memu-local-memory-tools-for-agent",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "MCP server — one-shot install + query for memos (PostgreSQL) and memuK (SQLite) local memory. Designed for OpenClaw agents.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
7
7
  "bin": {
8
- "memos-memu-local-memory-tools-for-agent": "./src/index.js"
8
+ "memos-memu-local-memory-tools-for-agent": "./bin/mcp-server.js"
9
9
  },
10
10
  "scripts": {
11
11
  "start": "node src/index.js",
package/src/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
3
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
4
  import {