@memstack/mcp 0.8.0 → 0.8.1

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 +49 -4
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @memstack/mcp
2
2
 
3
- MCP server for MemStack — persistent AI agent memory via the Model Context Protocol.
3
+ MCP server for MemStack — persistent AI agent memory via the Model Context Protocol. Includes a harness profile that gives Claude Code and Codex one shared memory per project.
4
4
 
5
5
  ## Installation
6
6
 
@@ -45,9 +45,54 @@ Add to your MCP client config (`~/.config/opencode/`, `~/.claude/mcp.json`, or `
45
45
  }
46
46
  ```
47
47
 
48
+ ## Harness profile (Claude Code and Codex)
49
+
50
+ `memstack-mcp --profile harness` is a smaller, project-scoped server for
51
+ coding agents. You normally don't configure it by hand:
52
+ [`memstack connect`](../cli/README.md#claude-code-and-codex) registers it with
53
+ Claude Code and Codex.
54
+
55
+ ```bash
56
+ npm install -g @memstack/cli @memstack/mcp better-sqlite3@^11.10.0
57
+ memstack init && memstack connect claude-code && memstack connect codex
58
+ ```
59
+
60
+ | Tool | Description |
61
+ |---|---|
62
+ | `memory_store` | Save a fact, decision, preference, or rule to project memory (`scope: "global"` for every project) |
63
+ | `memory_retrieve` | Recall memories for a natural-language question; local keyword ranking, no LLM call |
64
+ | `memory_get` | Get one memory by ID |
65
+ | `memory_delete` | Delete a wrong or outdated memory |
66
+ | `memory_stats` | Show the current project and its memory count |
67
+
68
+ - **No `actorId`.** The project comes from `CLAUDE_PROJECT_DIR` (set by
69
+ Claude Code) or the working directory (Codex), identified by the
70
+ repository's first commit. One project can't read or delete another's
71
+ memories, and bulk or destructive tools are not exposed.
72
+ - **Instructions.** The server sends MCP `instructions` telling the agent to
73
+ recall at the start of a task and to save when asked to remember.
74
+ - **Tagging.** `memory_store` asks your LLM for topic tags so category
75
+ questions find specific memories; if tagging fails, the memory is still
76
+ saved.
77
+ - **Settings** come from `~/.memstack/config.json` (written by
78
+ `memstack init`) overlaid with the environment variables below. Stdio only.
79
+ - **`--harness <name>`** labels which agent wrote each memory.
80
+
81
+ ### Session-start hook
82
+
83
+ `memstack-mcp hook session-start` prints the project's most important memories
84
+ (up to 15, at most 6,000 characters) as plain text. `memstack connect`
85
+ installs it as a `SessionStart` hook in Claude Code and Codex, so each new
86
+ session starts with them. It reads the harness's hook input from stdin, makes
87
+ no LLM call, and on any error prints nothing and exits 0, so it never blocks
88
+ a session.
89
+
48
90
  ## Configuration
49
91
 
50
- All configuration is via environment variables. No config files needed.
92
+ The default profile is configured by environment variables only. The harness
93
+ profile also reads `~/.memstack/config.json`; any LLM variable in the
94
+ environment replaces the file's `llm` section, and `MEMSTACK_STORAGE` replaces
95
+ its `storage` section.
51
96
 
52
97
  ### Storage backends
53
98
 
@@ -113,7 +158,7 @@ Without embedding config, retrieval falls back to keyword + importance search.
113
158
 
114
159
  ## Tools
115
160
 
116
- The MCP server exposes these tools to the agent:
161
+ The default profile exposes these tools to the agent:
117
162
 
118
163
  | Tool | Description |
119
164
  |---|---|
@@ -174,7 +219,7 @@ HTTP mode is stateless (`sessionIdGenerator: undefined` per the MCP spec) — ea
174
219
 
175
220
  ## Actor persistence
176
221
 
177
- By default, all memories belong to the `"default"` actor. Set `MEMSTACK_ACTOR` to identify the agent:
222
+ In the default profile, all memories belong to the `"default"` actor by default. Set `MEMSTACK_ACTOR` to identify the agent:
178
223
 
179
224
  ```
180
225
  MEMSTACK_ACTOR=my-agent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memstack/mcp",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "MCP server for MemStack — AI agent memory via Model Context Protocol",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "@modelcontextprotocol/sdk": "^1.0.0",
34
34
  "zod": "^4.4.3",
35
- "@memstack/core": "0.8.0"
35
+ "@memstack/core": "0.8.1"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "better-sqlite3": "^11.10.0",
@@ -54,7 +54,7 @@
54
54
  "tsup": "^8.0.0",
55
55
  "typescript": "^5.7.0",
56
56
  "vitest": "^1.0.0",
57
- "@memstack/config-env": "0.8.0"
57
+ "@memstack/config-env": "0.8.1"
58
58
  },
59
59
  "keywords": [
60
60
  "mcp",