Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Provides persistent, inspectable memory storage for AI agents using SQLite. Agents can store, recall, and search memories across sessions via three MCP tools.

README.md

identity-storage

Portable, auditable long-term memory for AI agents. Runs as a local MCP server backed by a single SQLite file. Agents recall memories through MCP tools; a Stop hook stores session transcripts automatically — no agent discipline required.

Why

Agents like Claude Code are stateless between sessions. identity-storage gives them a memory that survives restarts and stays fully inspectable — no ORM, no migration framework, no hidden state. Point sqlite3 at the file and read everything.

Install

The package is not on PyPI yet. Install directly from GitHub:

pip install git+https://github.com/MikSkrzyp/identity-storage-mcp.git

Or run it without installing:

uvx --from git+https://github.com/MikSkrzyp/identity-storage-mcp.git identity-storage-mcp

This installs one console script:

  • identity-storage-mcp — the MCP server (agent calls tools through it)

Configure Claude Code

1. Add the MCP server

claude mcp add identity-storage -s user -- uvx --from git+https://github.com/MikSkrzyp/identity-storage-mcp identity-storage-mcp

2. Add memory instructions to CLAUDE.md

Add this to ~/.claude/CLAUDE.md (global, all projects) or your project's CLAUDE.md:

# Memory — MANDATORY

identity-storage MCP is connected. Follow these rules EVERY session:

1. SEARCH: Call memory_search when the user references past work or you need
   context from previous sessions. Pass the user's prompt as query.

2. STORE: Call memory_store after every non-trivial turn:
   - episodic: events/actions (fixed bug, refactored module, user asked for X)
   - semantic: durable facts (user preferences, project info, tech stack)
   - procedural: how-tos (commands, steps, procedures)
   One memory per distinct thing. Skip idle chat.

3. SESSION END: When the user says exit/quit, store anything not yet saved.

Forgetting to store = permanent loss of the session.
Forgetting to search = working blind.

Configure opencode

1. Add the MCP server

Add to ~/.config/opencode/opencode.jsonc:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "identity-storage": {
      "type": "local",
      "command": [
        "uvx",
        "--from",
        "git+https://github.com/MikSkrzyp/identity-storage-mcp",
        "identity-storage-mcp"
      ]
    }
  }
}

2. Add memory instructions to AGENTS.md

Add the same memory instructions (from the Claude Code section above) to ~/.config/opencode/AGENTS.md (global) or your project's AGENTS.md.

Tools

The agent sees three tools, each scoped by memory_type (episodic, semantic, procedural, personality, emotional):

| Tool | Purpose | | ---------------- | ------------------------------------------------------------- | | memory_search | Full-text search via FTS5 — when the user references past work | | memory_store | Store a memory with type classification (episodic/semantic/procedural) | | memory_recall | Browse by type, tags, and time window (newest first) |

See docs/usage.md for the full input/output schemas.

Configuration

| Env var | Default | Purpose | | --------------------- | ------------------------------ | ------------------------- | | IDENTITY_STORAGE_DB | ~/.identity-storage/memory.db| SQLite database file path |

The parent directory is created on first run. The schema is applied idempotently on every start, so pointing at a fresh path is safe.

Audit

The database is a regular SQLite file. Read it while the server runs (WAL mode allows concurrent reads):

sqlite3 ~/.identity-storage/memory.db
SELECT id, created_at, content FROM memory
WHERE type='episodic'
ORDER BY created_at DESC;

SELECT * FROM memory
WHERE EXISTS (SELECT 1 FROM json_each(tags) WHERE value='auth');

SELECT m.*
FROM memory m
JOIN memory_fts f ON f.rowid = m.rowid
WHERE f.content MATCH 'auth bug'
ORDER BY rank;

The schema lives in schemas/schema.sql and is the single source of truth. Run .schema in the sqlite3 CLI to see exactly what is in the file.

Other clients

Claude Code and opencode are supported. Both use the same MCP server and the same memory database. For other MCP-compatible clients (Codex, Cursor, etc.), add the MCP server per their docs and add the memory instructions to their equivalent of CLAUDE.md (e.g. .cursorrules for Cursor).

Documentation

how to add a memory type or a backend

Status

Alpha. The MCP contract and the SQLite schema are stable for the episodic case. Semantic memory, procedural memory, consolidation, and embeddings are planned — see docs/architecture.md for the roadmap shape.

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Databases servers.