@membank/mcp 0.1.1 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +105 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,105 @@
1
+ # @membank/mcp
2
+
3
+ MCP server for membank. Exposes memory tools to LLMs via the [Model Context Protocol](https://modelcontextprotocol.io).
4
+
5
+ ## Overview
6
+
7
+ Runs as a stdio MCP server. LLM harnesses (Claude Code, GitHub Copilot, etc.) connect to it and can call five tools to query, save, update, and delete memories.
8
+
9
+ In most cases you don't need to use this package directly — `@membank/cli` starts the server via the `--mcp` flag and `membank setup` writes the harness config automatically.
10
+
11
+ ## Usage
12
+
13
+ ### Start the server
14
+
15
+ ```typescript
16
+ import { startServer } from '@membank/mcp'
17
+
18
+ await startServer()
19
+ ```
20
+
21
+ Or via the CLI:
22
+
23
+ ```bash
24
+ npx @membank/cli --mcp
25
+ ```
26
+
27
+ ### MCP config (manual)
28
+
29
+ If you're configuring a harness by hand, point it at:
30
+
31
+ ```json
32
+ {
33
+ "command": "npx",
34
+ "args": ["@membank/cli@latest", "--mcp"]
35
+ }
36
+ ```
37
+
38
+ ## Tools
39
+
40
+ ### `query_memory`
41
+
42
+ Semantic search over stored memories.
43
+
44
+ ```
45
+ query string required Natural language search query
46
+ type enum optional Filter by memory type
47
+ scope string optional Filter by project scope
48
+ limit number optional Max results (default: 10)
49
+ ```
50
+
51
+ Returns an array of memories with scores.
52
+
53
+ ### `save_memory`
54
+
55
+ Store a new memory. Deduplication runs automatically.
56
+
57
+ ```
58
+ content string required Memory content
59
+ type enum required correction | preference | decision | learning | fact
60
+ tags array optional String tags for grouping
61
+ scope string optional Project scope (auto-resolved if omitted)
62
+ ```
63
+
64
+ Returns the saved Memory object.
65
+
66
+ ### `update_memory`
67
+
68
+ Update the content or tags of an existing memory.
69
+
70
+ ```
71
+ id string required Memory ID
72
+ content string required New content
73
+ tags array optional Replacement tags
74
+ ```
75
+
76
+ Returns the updated Memory object.
77
+
78
+ ### `delete_memory`
79
+
80
+ Remove a memory permanently.
81
+
82
+ ```
83
+ id string required Memory ID to delete
84
+ ```
85
+
86
+ Returns `{ success: true, id }`.
87
+
88
+ ### `list_memory_types`
89
+
90
+ Returns the ordered list of valid memory type values. No input required.
91
+
92
+ ## Architecture
93
+
94
+ ```
95
+ LLM Harness (Claude Code, Copilot, etc.)
96
+ │ stdio
97
+
98
+ @membank/mcp ←→ @membank/core ←→ ~/.membank/memory.db
99
+ ```
100
+
101
+ The MCP server is thin — it validates inputs, delegates all logic to `@membank/core`, and serializes results.
102
+
103
+ ## Requirements
104
+
105
+ - Node.js >=24
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@membank/mcp",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  ],
19
19
  "dependencies": {
20
20
  "@modelcontextprotocol/sdk": "^1.29.0",
21
- "@membank/core": "0.1.1"
21
+ "@membank/core": "0.2.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/node": "^25.6.0",