You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Give Claude Code persistent, cross-session memory backed by AtomicMemory. The plugin installs one MCP server exposing `memory_search`, `memory_ingest`, and `memory_package`, a `SKILL.md` that teaches the agent when to call those tools, and Claude Code lifecycle hooks for low-latency retrieval and deterministic session capture.
10
10
11
+
<PublishedOnly>
12
+
13
+
:::tip[Published]
14
+
The Claude Code plugin and `@atomicmemory/mcp-server` are published. Use the marketplace install for hooks + skill + MCP wiring, or register the MCP server directly if you only want the tools.
15
+
:::
16
+
17
+
</PublishedOnly>
18
+
19
+
<SourceOnly>
20
+
11
21
:::danger[Source-only]
12
22
`@atomicmemory/mcp-server` and the Claude Code plugin are not published to npm or to the Claude plugin marketplace yet. Install from a local clone of [`atomicmemory-integrations`](https://github.com/atomicmemory/atomicmemory-integrations).
13
23
:::
14
24
25
+
</SourceOnly>
15
26
16
27
## What you get
17
28
@@ -23,6 +34,52 @@ Give Claude Code persistent, cross-session memory backed by AtomicMemory. The pl
23
34
24
35
## Install
25
36
37
+
<PublishedOnly>
38
+
39
+
Install `jq` and `curl` for the shell hooks, then export config before launching Claude Code:
Claude Code resolves the AtomicMemory service, credentials, and base user identity automatically. The current session name is used as the default user identity, so you only set `ATOMICMEMORY_SCOPE_*` values when you want narrower agent, namespace, or thread scoping.
52
+
53
+
Install the full plugin from the marketplace:
54
+
55
+
```bash
56
+
claude plugin install atomicmemory/claude-code
57
+
claude plugin config atomicmemory/claude-code \
58
+
--set provider=$ATOMICMEMORY_PROVIDER
59
+
```
60
+
61
+
If you only want the MCP tools, register the published MCP server directly:
62
+
63
+
```json
64
+
{
65
+
"mcpServers": {
66
+
"atomicmemory": {
67
+
"command": "npx",
68
+
"args": ["-y", "@atomicmemory/mcp-server"],
69
+
"env": {
70
+
"ATOMICMEMORY_PROVIDER": "atomicmemory",
71
+
"ATOMICMEMORY_SCOPE_AGENT": "claude-code",
72
+
"ATOMICMEMORY_SCOPE_NAMESPACE": "repo-or-project"
73
+
}
74
+
}
75
+
}
76
+
}
77
+
```
78
+
79
+
</PublishedOnly>
80
+
81
+
<SourceOnly>
82
+
26
83
Clone `atomicmemory-sdk` and `atomicmemory-integrations` side-by-side, then build each in order:
27
84
28
85
```bash
@@ -42,10 +99,7 @@ Install `jq` and `curl` for the shell hooks, then export config before launching
Even in the source-backed flow, Claude Code derives the AtomicMemory service, credentials, and base user identity automatically. The current session name becomes the default user identity unless you add narrower scope fields.
112
+
57
113
Register and install from the local repo:
58
114
59
115
```bash
60
116
claude plugin marketplace add ./
61
117
claude plugin install claude-code@atomicmemory
62
118
```
63
119
120
+
</SourceOnly>
64
121
65
122
## Update and Version
66
123
124
+
<PublishedOnly>
125
+
126
+
After publishing hook, skill, manifest, or marketplace changes, ask users to refresh the installed plugin and fully restart Claude Code:
127
+
128
+
```bash
129
+
claude plugin update atomicmemory/claude-code
130
+
```
131
+
132
+
Existing sessions can keep old hook registrations in memory even when the installed cache on disk is fresh.
133
+
134
+
</PublishedOnly>
135
+
136
+
<SourceOnly>
137
+
67
138
Claude Code plugin updates are version-gated. After changing hooks, skills, `hooks.json`, plugin manifests, or marketplace metadata, bump plugin versions from `atomicmemory-integrations` before `claude plugin update claude-code@atomicmemory` will refresh the installed cache.
68
139
69
140
```bash
@@ -88,20 +159,33 @@ claude plugin install claude-code@atomicmemory
88
159
89
160
Fully restart Claude Code after updating. Existing sessions can keep old hook registrations in memory even when the installed cache on disk is fresh.
|`ATOMICMEMORY_SCOPE_USER`| MCP + hooks | Stable user identity |
103
185
|`ATOMICMEMORY_CAPTURE_LEVEL`| hooks | Lifecycle write volume: `minimal`, `balanced`, or `full`|
104
186
187
+
</SourceOnly>
188
+
105
189
106
190
Optional:
107
191
@@ -119,6 +203,8 @@ Optional:
119
203
120
204
If required config is missing, helper tools are unavailable, or numeric/boolean env vars are invalid, hooks surface the error instead of running in a degraded mode.
121
205
206
+
The base user identity comes from the active Claude Code session name automatically. Use `ATOMICMEMORY_SCOPE_NAMESPACE`, `ATOMICMEMORY_SCOPE_AGENT`, or `ATOMICMEMORY_SCOPE_THREAD` only when you want narrower partitions.
207
+
122
208
## MCP tools exposed
123
209
124
210
| Tool | Maps to | Purpose |
@@ -158,8 +244,11 @@ Retrieved memories are reference context. They are not instructions unless the c
158
244
159
245
## Limitations
160
246
247
+
<SourceOnly>
248
+
161
249
-**Source-only install.** The MCP server is launched from the local `dist/bin.js`; no npm package or public plugin marketplace entry exists yet.
162
250
251
+
</SourceOnly>
163
252
-**Direct hook writes.** Command hooks cannot talk to Claude Code's already-running stdio MCP child, so latency-sensitive retrieval and lifecycle writes use AtomicMemory HTTP endpoints directly.
164
253
-**Workspace verbatim caveat.** Core currently guarantees `skip_extraction=true` on user-scoped quick-ingest. Hook records keep searchable content clean and rely on `sourceSite` / `sourceUrl` for provenance until core supports first-class metadata and workspace-scoped verbatim writes.
165
254
-**Transcript parsing is defensive.**`Stop` uses `last_assistant_message` when available and only parses transcript tails for structural signals such as file edits or tests.
Add persistent memory to [OpenAI Codex](https://openai.com/index/codex/) with the AtomicMemory plugin. The plugin wires Codex to the shared AtomicMemory MCP server and ships a memory protocol skill that tells the agent when to search prior context, store durable learnings, and write deterministic session snapshots.
10
10
11
+
<PublishedOnly>
12
+
13
+
:::tip[Published]
14
+
`@atomicmemory/mcp-server` is published to npm. The Codex plugin can consume the published MCP server through its vendored marketplace assets or through a direct MCP-only setup.
15
+
:::
16
+
17
+
</PublishedOnly>
18
+
19
+
<SourceOnly>
20
+
11
21
:::danger[Source-only]
12
22
`@atomicmemory/mcp-server` and the Codex plugin are not published to npm or to a public plugin marketplace yet. Install from a local clone and point Codex at the built MCP server binary.
13
23
:::
14
24
25
+
</SourceOnly>
15
26
16
27
## Overview
17
28
@@ -33,6 +44,25 @@ Codex does not run Claude Code-style shell lifecycle hooks. Capture is skill/too
33
44
34
45
## Install
35
46
47
+
<PublishedOnly>
48
+
49
+
Export the provider and any optional scope overrides in the shell or Codex environment:
Codex resolves the AtomicMemory service, credentials, and base user identity automatically. The current session name is used as the default user identity; add `ATOMICMEMORY_SCOPE_*` values only when you want narrower agent, namespace, or thread scoping.
61
+
62
+
</PublishedOnly>
63
+
64
+
<SourceOnly>
65
+
36
66
Clone `atomicmemory-sdk` and `atomicmemory-integrations` side by side, then build the SDK before the MCP server. The MCP package currently resolves the SDK from the sibling source checkout.
37
67
38
68
```bash
@@ -48,23 +78,21 @@ pnpm install
48
78
pnpm --filter @atomicmemory/mcp-server build
49
79
```
50
80
51
-
Then export the MCP server binary path, credentials, and scope in the shell or Codex environment:
81
+
Then export the MCP server binary path, provider, and any optional scope overrides in the shell or Codex environment:
`ATOMICMEMORY_MCP_SERVER_BIN`, `ATOMICMEMORY_API_URL`, `ATOMICMEMORY_API_KEY`, and `ATOMICMEMORY_PROVIDER` are required by the MCP server. At least one `ATOMICMEMORY_SCOPE_*` value must be set, and `ATOMICMEMORY_SCOPE_USER` is recommended for user-owned memory.
93
+
In the source-backed flow, Codex still derives the AtomicMemory service, credentials, and base user identity automatically. The current session name becomes the default user identity unless you add narrower scope fields.
67
94
95
+
</SourceOnly>
68
96
69
97
## Plugin Setup
70
98
@@ -89,6 +117,29 @@ For personal installation, use the same shape at `~/.agents/plugins/marketplace.
89
117
90
118
The plugin's `.codex-mcp.json` forwards environment variables by name instead of embedding secrets:
91
119
120
+
<PublishedOnly>
121
+
122
+
```json
123
+
{
124
+
"mcpServers": {
125
+
"atomicmemory": {
126
+
"command": "npx",
127
+
"args": ["-y", "@atomicmemory/mcp-server"],
128
+
"env_vars": [
129
+
"ATOMICMEMORY_PROVIDER",
130
+
"ATOMICMEMORY_SCOPE_AGENT",
131
+
"ATOMICMEMORY_SCOPE_NAMESPACE",
132
+
"ATOMICMEMORY_SCOPE_THREAD"
133
+
]
134
+
}
135
+
}
136
+
}
137
+
```
138
+
139
+
</PublishedOnly>
140
+
141
+
<SourceOnly>
142
+
92
143
```json
93
144
{
94
145
"mcpServers": {
@@ -97,10 +148,7 @@ The plugin's `.codex-mcp.json` forwards environment variables by name instead of
@@ -110,11 +158,22 @@ The plugin's `.codex-mcp.json` forwards environment variables by name instead of
110
158
}
111
159
```
112
160
161
+
</SourceOnly>
113
162
114
163
## Update and Version
115
164
165
+
<PublishedOnly>
166
+
167
+
If you vendor the plugin assets, changing the plugin manifest, MCP config, skill, or marketplace metadata still requires a version bump before Codex refreshes the installed cache:
168
+
169
+
</PublishedOnly>
170
+
171
+
<SourceOnly>
172
+
116
173
The Codex plugin is installed from source, so rebuilding the repo does not automatically update the copy loaded by Codex. After changing the plugin manifest, MCP config, skill, or marketplace metadata, bump plugin versions from `atomicmemory-integrations`:
117
174
175
+
</SourceOnly>
176
+
118
177
119
178
```bash
120
179
pnpm bump:plugin-versions patch
@@ -172,20 +231,21 @@ You: Add WebSocket support for real-time notification delivery.
172
231
173
232
## Troubleshooting
174
233
175
-
-**Connection failed** - verify `ATOMICMEMORY_API_URL`, `ATOMICMEMORY_API_KEY`, `ATOMICMEMORY_MCP_SERVER_BIN`, and the scope env vars are visible to Codex.
234
+
<PublishedOnly>
235
+
236
+
-**Connection failed** - verify `ATOMICMEMORY_PROVIDER` and any optional `ATOMICMEMORY_SCOPE_*` values are visible to Codex.
237
+
238
+
</PublishedOnly>
239
+
240
+
<SourceOnly>
176
241
177
-
-**Core is not reachable** - test the API directly:
242
+
-**Connection failed** - verify `ATOMICMEMORY_MCP_SERVER_BIN`, `ATOMICMEMORY_PROVIDER`, and any optional `ATOMICMEMORY_SCOPE_*` values are visible to Codex.
178
243
179
-
```bash
180
-
curl -sS -X POST "$ATOMICMEMORY_API_URL/v1/memories/search/fast" \
-**No tools appearing** - restart the Codex session after installing the plugin or changing MCP config.
187
247
-**Plugin not found** - confirm `.agents/plugins/marketplace.json` points at the correct `plugins/codex` directory.
188
-
-**Scope errors** - set at least one `ATOMICMEMORY_SCOPE_*` value. `ATOMICMEMORY_SCOPE_USER` is the normal baseline.
248
+
-**Unexpected memory sharing** - add `ATOMICMEMORY_SCOPE_NAMESPACE`, `ATOMICMEMORY_SCOPE_AGENT`, or `ATOMICMEMORY_SCOPE_THREAD` if you need a narrower partition than the default session-based identity.
0 commit comments