Connect Claude Code
Connect Claude Code
Section titled “Connect Claude Code”This tutorial walks through installing memory and wiring it to Claude Code CLI so your agent can remember and recall facts across conversations.
Prerequisites
Section titled “Prerequisites”- A Linux or macOS machine.
- Claude Code CLI installed and able to run
/mcpor/memory. - Shell access to run
curlandod3sa-memory.
1. Install the binary
Section titled “1. Install the binary”Run the installer:
curl -fsSL https://0d3sa.com/memory/install.sh | shThis downloads the right binary for your platform, verifies its checksum, and installs it to ~/.local/bin/od3sa-memory. If your terminal is interactive, the installer prompts for MEMORY_ORG_ID and writes it to ~/.memory/.env. Leave it empty to configure later, or pre-set it for non-interactive installs:
export MEMORY_ORG_ID=your-orgcurl -fsSL https://0d3sa.com/memory/install.sh | shMake sure ~/.local/bin is on your PATH, or use the full path in the next step.
2. Wire the MCP server
Section titled “2. Wire the MCP server”The easiest way is to run the setup helper from the project directory you launch Claude Code in:
cd ~/project-aod3sa-memory setup claudeSetup prompts for an agent identity (MEMORY_AGENT_ID) and a user identity (MEMORY_USER_ID), then asks whether the project is personal or team/org — the answer sets MEMORY_AUTHORIZATION_MODE (easy for personal, enterprise for default-deny cross-workspace access).
This does four things:
- Writes a project-local
.envwith the database path, identity, scope, and authorization mode, and adds it to.gitignore. - Adds or updates the current project in
~/.claude.jsonas a stdio MCP server. - Removes any stale user-level
memoryMCP entry. - Installs fallback slash commands in
~/.claude/commands/.
If you prefer to edit ~/.claude.json manually, add this under projects["<cwd>"]["mcpServers"]:
{ "memory": { "command": "/home/yourname/.local/bin/od3sa-memory", "args": [ "--db", "/home/yourname/.memory/default.db" ], "env": { "MEMORY_LOG_LEVEL": "INFO" } }}Use absolute paths and replace yourname with your actual username. Do not add --mcp-stdio; it is not a valid flag.
3. Restart Claude Code
Section titled “3. Restart Claude Code”A full restart is required for tool discovery. Exit completely and reopen Claude Code.
4. Verify the connection
Section titled “4. Verify the connection”At the start of a session, ask Claude to check health:
Run memory_health.You can also use the fallback slash command if MCP tools are not yet loaded:
/memory-healthYou should see a JSON health report. If it fails, re-run the install:
curl -fsSL https://0d3sa.com/memory/install.sh | shDo not proceed with memory-dependent work until memory_health succeeds.
5. Remember and recall your first fact
Section titled “5. Remember and recall your first fact”Ask Claude to store a preference:
Remember that I prefer Python examples and short sentences.Then start a new conversation and ask:
What do you know about my communication preferences?Claude should recall the preference from the local store.
Expected output
Section titled “Expected output”od3sa-memory versionprints a version string.memory_healthreturnsstatus: ok.- A remembered fact is returned when you ask about it in a new session.