ai-memory-mcp

ai-memory keeps long-term assistant memory in local SQLite and serves it over MCP, an HTTP API and a CLI

  • 57 ★ on the repository
  • Last commit
  • Apache-2.0
MCP server

Extended access

Why this level

  • The server stores and returns the texts of your conversations and imported chats to assistants
  • The semantic and autonomous tiers may send texts to a third-party language model provider
All reasons and checks

alphaonedev/ai-memory-mcp

Install

Manual install

curl -fsSL https://raw.githubusercontent.com/alphaonedev/ai-memory-mcp/main/install.sh | sh

Read the script before running it.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The server stores and returns the texts of your conversations and imported chats to assistants
  • The semantic and autonomous tiers may send texts to a third-party language model provider

This is third-party code. Review the repository files before installing.

What it does

ai-memory is a persistent memory system for AI assistants, written in Rust. It stores memories in a local SQLite database, ranks them on recall and works with any MCP client: Claude Code, Codex, Gemini CLI, Cursor, Windsurf, Continue and others. In stdio mode five tools are available by default: `memory_store`, `memory_recall`, `memory_list`, `memory_get` and `memory_search`, plus the service `memory_capabilities`. Beyond MCP there is an HTTP daemon on `127.0.0.1:9077` with TLS and optional mTLS, and a CLI. The `keyword`, `semantic` and `autonomous` tiers enable semantic search and background processing through a connected model. A PostgreSQL backend with Apache AGE is available for heavy loads, and the `ai-memory mine` command imports history from Claude, ChatGPT and Slack exports.

Who it is for. Developers and teams who need one shared memory for several AI clients with control over where it is stored.

Good fit when

  • Claude Code and Codex should remember project decisions between sessions
  • History from a Claude or ChatGPT export has to move into agent memory
  • Several agents on one node share memory through the HTTP daemon
  • Memory is kept on a PostgreSQL server for millions of records

Not a fit when

  • A simple note in a file is enough: use `CLAUDE.md`
  • Memory must not be stored on your machine
  • The work environment does not allow installing binaries

Example request

Remember that we chose PostgreSQL in this project and why, and remind me of that decision in the next session

MCP

Transport
stdio, http
Authentication
not required

Environment variables

AI_MEMORY_DB
Path to the SQLite database file

Limitations

Ready binaries install with a `curl | sh` script, through COPR for Fedora and RHEL or by building from Rust sources. Read the install script before running it. The `semantic` and `autonomous` tiers need a connected language model, local through Ollama or cloud, and in the latter case memory texts go to the provider. The project moves fast and the README details security fixes of recent versions, so install a current release. The HTTP daemon listens only on a local address by default.

How to disable. Remove the server from the client configuration and delete the database file, for example `~/.claude/ai-memory.db`. The package is removed with the tool you installed it with.

FAQ

How do I connect ai-memory to Claude Code?

Add a server with the command `ai-memory` and the arguments `--db ~/.claude/ai-memory.db mcp --tier semantic` to `~/.claude.json` or `.mcp.json`.

Which tools are available by default?

Five: `memory_store`, `memory_recall`, `memory_list`, `memory_get`, `memory_search`, plus `memory_capabilities`. The full profile has more than a hundred entries.

Where is data stored?

In a local SQLite database whose path is set with `--db`. PostgreSQL with Apache AGE exists for heavy loads, with the connection string passed through `--store-url`.

Can old chats be imported?

Yes, `ai-memory mine claude`, `mine chatgpt` and `mine slack` read exports and store memories with a source mark.

Which clients does it work with?

Claude Code, Codex CLI, Gemini CLI, Cursor, Windsurf, Continue and OpenClaw over stdio, and Grok API and Llama Stack over remote HTTP.

Discussion

No questions or reviews yet.

iai-memory

iai-memory (Personal Memory Engine)

Official

A local long-term memory MCP server for agents: keeps conversations verbatim and returns the right context at the start of a session

MCP serverExtended access923Repository stars

A local-first MCP memory server for agents: session history, codebase index and a concept graph in one SQLite database

MCP serverExtended access438Repository stars

A self-hosted MCP memory server that keeps preferences and decisions across conversations in Claude Code, Cursor and other clients

MCP serverExtended access283Repository stars

A long-term memory MCP server for agents: one Rust binary that runs offline and never calls a language model

MCP serverBroad access323Repository stars

A long-term memory MCP server for AI agents: facts fade along a forgetting curve and related records are compressed into a summary

MCP serverExtended access272Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
ai-memory-mcp (this card)nonot required57
ai-memorynoAPI key15,717another memory for agents with a separate implementation, while this is a Rust engine with SQLite or PostgreSQL, an HTTP daemon and history import
marm-memorynonot required438memory on a different stack, while this is one memory for many clients over MCP, HTTP and CLI with semantic and autonomous tiers

README in short

The README explains the purpose of the memory, gives installation paths for a developer, an engineer and a decision-maker and describes recent releases. A table of compatible clients, configurations for each, history import and a three-surface architecture of stdio, HTTP and CLI follow.

README badge

Report a problem