# Claude Code Memory Integration via MCP | SuperLocalMemory

Claude Code memory through MCP and optional lifecycle hooks: run slm connect claude-code, verify recall across sessions and inspect hook behavior.

Source: https://www.superlocalmemory.com/integrations/claude-code

Integration

# Claude Code Integration.

Connect SuperLocalMemory to Claude Code via MCP and optional lifecycle hooks. Memories persist across sessions in a local SQLite store; hook behavior and recalled scope must be verified in the installed release.

New to persistent memory in Claude Code? Read the [Claude Code memory guide](https://qualixar.com/learn/guides/claude-code-memory), or see [SuperLocalMemory on qualixar.com](https://qualixar.com/products/superlocalmemory).

AGPL v3 MCP stdio Lifecycle hooks

Quick Start

## Install, connect, verify.

Package installation is separate from configuration. Review and approve hook and MCP changes during setup, then verify the connection. See [client setup in the product docs](https://github.com/qualixar/superlocalmemory/blob/main/docs/getting-started.md#how-it-works-with-your-ide).

1

### Install SuperLocalMemory

Use pipx or uv with Python 3.12–3.14. Mode A does not require a model-provider key for its core path; optional modes and features have separate requirements.

terminal

```
pipx install superlocalmemory
slm setup
```

2

### Connect to Claude Code

**Recommended: the plugin.** It adds the MCP server, sixteen skills, four agents, session and recall hooks and the `/slm-loop` command in one install.

terminal

```
claude plugin marketplace add qualixar/superlocalmemory
claude plugin install superlocalmemory@qualixar
```

Or wire only the MCP server:

Run the connect command to review and apply the Claude Code MCP configuration and optional hook setup. Review each proposed change before confirming.

terminal

```
slm connect claude-code
```

Or configure manually — add the server to your Claude Code MCP settings:

MCP configuration

```
{
  "mcpServers": {
    "superlocalmemory": {
      "command": "slm",
      "args": ["mcp"]
    }
  }
}
```

3

### Verify the connection

Restart Claude Code. Ask it to call `get_status` — you should see the active mode, profile, provider boundary, and store counts. Then run a remember → recall round trip.

terminal

```
slm status
# Expected: mode: A · provider: none · fact_count: 0
```

Lifecycle Hooks

## Three hook points.

After explicit setup via `slm connect claude-code`, Claude Code can fire optional hooks at session lifecycle events. Inspect hook configuration, latency, and recalled evidence before relying on them.

SessionStart

### Context at Session Open

SessionStart can inject bounded recalled context before the first message. Inspect scope, provenance, truncation, and failure behavior — recalled context is not a complete restore of all prior facts.

PostToolUse

### Observe During Work

PostToolUse can observe supported tool events when configured. Verify event coverage, rate limits, redaction, and whether the captured event becomes durable memory. An observation is not automatically a confirmed fact.

Stop

### Checkpoint at Session End

The Stop hook can generate a session summary with available git context. Verify the stored result and the failure path. The next session receives bounded recalled context — critical state should still be re-verified.

Hook failures are designed to be absorbed without blocking the Claude Code session. Verify timeout, error, and parallel-session behavior in the installed release. Run `slm hooks remove` to opt out and verify the resulting configuration.

Memory Scope

## What persists and where.

Core memory state is SQLite-backed in the configured data root. Claude Code, optional providers, connectors, backups, proxies, and model downloads retain their own network behavior and require separate assessment.

Architecture Decisions

### Project Structure

Folder conventions, module boundaries, dependency choices, and the reasoning behind them — stored explicitly and available for selective recall.

Conventions

### Code Patterns

Naming patterns, formatting preferences, TypeScript strictness, import ordering, and testing conventions you store explicitly during sessions.

Session Context

### Debugging History

Known issues, workarounds, edge cases investigated, and bugs fixed — available for selective recall across sessions, subject to retrieval quality.

Common Questions

## Questions about Claude Code memory.

Mode A keeps the core memory-content path in the configured local data root. Claude Code, model downloads, backups, connectors, proxies, and optional providers can still use the network; assess the complete deployment.

After explicit setup, the SessionStart hook can inject bounded recalled context before the first message. Inspect omissions, provenance, truncation, and failure behavior. Retrieval is selective — not a promise that every prior fact will be loaded.

Run `slm hooks remove` to opt out and verify the resulting client configuration. You can still use the MCP tools directly in Claude Code without lifecycle hooks.

Documented clients can target the same configured SLM profile. Each client still needs install, identity, scope, remember, recall, update, forget, restart, upgrade, and uninstall verification.

Only when the client actually exposes the configured SLM tools to that subagent. Verify tool visibility and agent identity for each subagent type; a parent client configuration is not by itself proof of inheritance or shared scope.

Get started

## Claude Code sessions, with persistent context.

Install, connect, then verify the memory round trip in Claude Code before treating it as active.

[Install SuperLocalMemory](https://www.superlocalmemory.com/install) [Architecture](https://www.superlocalmemory.com/architecture)

Read the guides[Plugins, skills and hooks](https://github.com/qualixar/superlocalmemory/blob/main/docs/plugins.md) · [Auto-memory](https://github.com/qualixar/superlocalmemory/blob/main/docs/auto-memory.md) · [SETUP_FOR_AGENTS.md](https://github.com/qualixar/superlocalmemory/blob/main/SETUP_FOR_AGENTS.md)
