agent-recall-mcp 2.1.1 → 3.0.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 (3) hide show
  1. package/README.md +204 -0
  2. package/dist/index.js +1 -1
  3. package/package.json +15 -7
package/README.md ADDED
@@ -0,0 +1,204 @@
1
+ # agent-recall-mcp
2
+
3
+ > Persistent memory for AI agents. Session state that survives restarts, handoffs, and cold starts.
4
+
5
+ [![npm](https://img.shields.io/npm/v/agent-recall-mcp?style=flat-square)](https://www.npmjs.com/package/agent-recall-mcp)
6
+ [![License](https://img.shields.io/badge/license-MIT-brightgreen?style=flat-square)](https://github.com/Goldentrii/AgentRecall/blob/main/LICENSE)
7
+ [![MCP](https://img.shields.io/badge/MCP-9_tools-orange?style=flat-square)](#tools)
8
+ [![Node](https://img.shields.io/badge/node-%3E%3D18-green?style=flat-square)](#requirements)
9
+
10
+ **agent-recall-mcp** is an MCP server that gives any AI agent persistent session memory, alignment detection, and cross-session intelligence. Works with Claude Code, Cursor, VS Code Copilot, Windsurf, Claude Desktop, and any MCP-compatible client.
11
+
12
+ **Zero cloud. Zero telemetry. All data stays on your machine.**
13
+
14
+ ---
15
+
16
+ ## Why AgentRecall?
17
+
18
+ | Problem | How AgentRecall solves it |
19
+ |---------|--------------------------|
20
+ | Agent forgets everything between sessions | Three-layer memory persists state across sessions |
21
+ | Cold-start costs 2,000-5,000 tokens of context | Agent reads structured journal in ~200 tokens |
22
+ | Human says one thing, agent builds another | Alignment checks measure the understanding gap |
23
+ | Human contradicts a past decision unknowingly | Nudge protocol surfaces the contradiction |
24
+ | Multi-agent handoff loses context | Machine-readable state transfers cleanly between agents |
25
+
26
+ ---
27
+
28
+ ## Quick Start
29
+
30
+ ### Claude Code
31
+
32
+ ```bash
33
+ claude mcp add agent-recall -- npx -y agent-recall-mcp
34
+ ```
35
+
36
+ ### Cursor
37
+
38
+ `.cursor/mcp.json`:
39
+ ```json
40
+ {
41
+ "mcpServers": {
42
+ "agent-recall": {
43
+ "command": "npx",
44
+ "args": ["-y", "agent-recall-mcp"]
45
+ }
46
+ }
47
+ }
48
+ ```
49
+
50
+ ### VS Code
51
+
52
+ `.vscode/mcp.json`:
53
+ ```json
54
+ {
55
+ "servers": {
56
+ "agent-recall": {
57
+ "command": "npx",
58
+ "args": ["-y", "agent-recall-mcp"]
59
+ }
60
+ }
61
+ }
62
+ ```
63
+
64
+ ### Windsurf / Claude Desktop / Other MCP Clients
65
+
66
+ Add as an MCP server with command: `npx -y agent-recall-mcp`
67
+
68
+ ---
69
+
70
+ ## Tools
71
+
72
+ 9 MCP tools across three categories:
73
+
74
+ ### Journal (Session Memory)
75
+
76
+ | Tool | Description |
77
+ |------|-------------|
78
+ | `journal_read` | Read entry by date or `"latest"`. Filter by section (`brief`, `qa`, `completed`, `status`, `blockers`, `next`, `decisions`, `reflection`, `files`, `observations`). |
79
+ | `journal_write` | Append to or replace today's journal. Target a specific section or use `replace_all` for full overwrite. |
80
+ | `journal_capture` | Lightweight Layer 1 Q&A capture — one question + answer pair, tagged, timestamped. |
81
+ | `journal_list` | List recent entries for a project (date, title, momentum). |
82
+ | `journal_search` | Full-text search across all journal entries. Filter by section. |
83
+ | `journal_projects` | List all tracked projects on this machine. |
84
+
85
+ ### Alignment (Intelligent Distance)
86
+
87
+ | Tool | Description |
88
+ |------|-------------|
89
+ | `alignment_check` | Record what the agent understood, its confidence level, assumptions, and any human correction. Measures the understanding gap over time. |
90
+ | `nudge` | Surface a contradiction between the human's current input and a prior decision. Helps the human clarify their own thinking. |
91
+
92
+ ### Synthesis (Cross-Session Intelligence)
93
+
94
+ | Tool | Description |
95
+ |------|-------------|
96
+ | `context_synthesize` | Generate L3 semantic synthesis — goal evolution, decision history, active blockers, recurring patterns, and contradiction detection across sessions. |
97
+
98
+ ---
99
+
100
+ ## Three-Layer Memory Architecture
101
+
102
+ ```
103
+ L1: Working Memory [per-turn, ~50 tokens] "What happened"
104
+ | synthesized into
105
+ L2: Episodic Memory [daily journal, ~800 tok] "What it means"
106
+ | synthesized into
107
+ L3: Semantic Memory [cross-session, ~200 tok] "What's true across sessions"
108
+ (contradiction detection + goal evolution tracking)
109
+ ```
110
+
111
+ Each layer serves a different consumer:
112
+ - **L1** captures raw events as they happen (fast, append-only)
113
+ - **L2** structures the day's work into a navigable journal (agent reads this on cold start)
114
+ - **L3** synthesizes patterns across sessions (detects contradictions, tracks goal drift)
115
+
116
+ ---
117
+
118
+ ## Resources
119
+
120
+ Two MCP resources for browsing without tool calls:
121
+
122
+ | URI Pattern | Description |
123
+ |-------------|-------------|
124
+ | `agent-recall://{project}/index` | Project journal index |
125
+ | `agent-recall://{project}/{date}` | Specific journal entry |
126
+
127
+ ---
128
+
129
+ ## Project Auto-Detection
130
+
131
+ When `project = "auto"` (default), the server resolves the project by:
132
+
133
+ 1. `AGENT_RECALL_PROJECT` env var
134
+ 2. Git remote origin -> repo name
135
+ 3. Git root directory -> basename
136
+ 4. `package.json` -> `name` field
137
+ 5. Basename of current working directory
138
+
139
+ ---
140
+
141
+ ## Storage
142
+
143
+ ```
144
+ ~/.agent-recall/ (or $AGENT_RECALL_ROOT)
145
+ +-- config.json
146
+ +-- projects/
147
+ +-- {project-slug}/
148
+ +-- journal/
149
+ +-- index.md <- auto-generated index
150
+ +-- YYYY-MM-DD.md <- L2: daily journal
151
+ +-- YYYY-MM-DD-log.md <- L1: raw Q&A capture
152
+ +-- YYYY-MM-DD-alignment.md <- alignment checks + nudges
153
+ ```
154
+
155
+ **Legacy support**: automatically reads existing journals from `~/.claude/projects/*/memory/journal/`. New writes go to `~/.agent-recall/`.
156
+
157
+ ---
158
+
159
+ ## CLI
160
+
161
+ ```bash
162
+ npx agent-recall-mcp # Start MCP server (stdio)
163
+ npx agent-recall-mcp --help # Show help
164
+ npx agent-recall-mcp --list-tools # List all 9 tools as JSON
165
+ ```
166
+
167
+ ---
168
+
169
+ ## Environment Variables
170
+
171
+ | Variable | Default | Description |
172
+ |----------|---------|-------------|
173
+ | `AGENT_RECALL_ROOT` | `~/.agent-recall` | Storage root directory |
174
+ | `AGENT_RECALL_PROJECT` | (auto-detect) | Override project slug |
175
+
176
+ ---
177
+
178
+ ## Requirements
179
+
180
+ - Node.js >= 18
181
+ - Dependencies: `@modelcontextprotocol/sdk`, `zod`
182
+
183
+ ---
184
+
185
+ ## Part of AgentRecall
186
+
187
+ This MCP server is one component of the [AgentRecall](https://github.com/Goldentrii/AgentRecall) ecosystem:
188
+
189
+ - **[SKILL.md](https://github.com/Goldentrii/AgentRecall/blob/main/SKILL.md)** — Claude Code skill with Think-Execute-Reflect quality loops
190
+ - **[agent-recall-mcp](https://www.npmjs.com/package/agent-recall-mcp)** — This MCP server (works with any MCP agent)
191
+ - **[Intelligent Distance Protocol](https://github.com/Goldentrii/AgentRecall/blob/main/docs/intelligent-distance-protocol.md)** — The underlying theory
192
+
193
+ ---
194
+
195
+ ## Feedback & Contributing
196
+
197
+ - Issues & PRs: [github.com/Goldentrii/AgentRecall](https://github.com/Goldentrii/AgentRecall)
198
+ - Email: tongwu0824@gmail.com
199
+
200
+ ---
201
+
202
+ ## License
203
+
204
+ MIT — [Tongwu](https://github.com/Goldentrii)
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ const execFileAsync = promisify(execFile);
11
11
  // ---------------------------------------------------------------------------
12
12
  // Constants
13
13
  // ---------------------------------------------------------------------------
14
- const VERSION = "2.1.0";
14
+ const VERSION = "3.0.0";
15
15
  const JOURNAL_ROOT = process.env.AGENT_RECALL_ROOT ||
16
16
  path.join(os.homedir(), ".agent-recall");
17
17
  const LEGACY_ROOT = path.join(os.homedir(), ".claude", "projects");
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "agent-recall-mcp",
3
- "version": "2.1.1",
4
- "description": "AI session memory with Think-Execute-Reflect quality loopsgive your agent a brain that survives every session",
3
+ "version": "3.0.0",
4
+ "description": "Persistent agent memory and alignment detection via MCP session state, contradiction nudging, and cross-session intelligence for any AI agent",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
8
8
  "agent-recall-mcp": "dist/index.js"
9
9
  },
10
10
  "files": [
11
- "dist"
11
+ "dist",
12
+ "README.md"
12
13
  ],
13
14
  "scripts": {
14
15
  "build": "tsc && node -e \"require('fs').chmodSync('dist/index.js', '755')\"",
@@ -22,18 +23,25 @@
22
23
  "mcp",
23
24
  "mcp-server",
24
25
  "model-context-protocol",
25
- "agent-recall",
26
+ "agent-memory",
26
27
  "ai-memory",
28
+ "ai-session-persistence",
29
+ "agent-recall",
27
30
  "session-memory",
28
- "journal",
31
+ "agent-to-agent",
29
32
  "ai-agents",
30
33
  "claude-code",
31
34
  "cursor",
35
+ "vscode",
36
+ "windsurf",
32
37
  "intelligent-distance",
38
+ "alignment-detection",
39
+ "contradiction-detection",
33
40
  "quality-loop",
34
41
  "think-execute-reflect",
35
- "agent-memory",
36
- "cold-start"
42
+ "cold-start",
43
+ "journal",
44
+ "cross-session"
37
45
  ],
38
46
  "license": "MIT",
39
47
  "repository": {