AI Memory logo

AI Memory

Persistent MCP memory backed by SQLite or PostgreSQL, with ranked recall, lifecycle controls, links, archives, and optional LLM features.

Install AI Memory

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "ai-memory": {
      "command": "uvx",
      "args": [
        "ai-memory-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio ai-memory -- uvx ai-memory-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

uvx ai-memory-mcp

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The ai-memory MCP server gives MCP-compatible AI assistants persistent memory through local SQLite or PostgreSQL with Apache AGE. It stores, searches, ranks, updates, links, promotes, archives, and consolidates memories through MCP tools, with optional LLM-backed capabilities for query expansion, tagging, and contradiction detection. Use it when separate AI sessions or agents need shared knowledge about architecture, preferences, corrections, or other durable context. The repository supports core and full tool profiles, plus desktop, server, and on-device deployments.

Use cases

  • Remember architecture decisions across AI sessions
  • Recall project preferences and corrections
  • Link related facts into a memory graph
  • Archive or promote memories by lifecycle
  • Share durable context across multiple agents

Key features

  • Persistent SQLite or PostgreSQL-backed memory
  • Fuzzy ranked recall and exact keyword search
  • Namespaces, tiers, tags, expiry, and filters
  • Typed links and memory consolidation
  • Archive, restore, and purge workflows
  • Optional LLM query, tagging, and contradiction features

Tools21

What AI Memory lets your agent do. Expand a tool for its parameters.

Self-reported~357 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

34/38 checks healthy over the last 117d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 15d ago via OSV.dev · ai-memory-mcp (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars60Stargazers on the source repository.
Last commitTodayMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Tools exposed21Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How AI Memory works

What ai-memory does

The ai-memory MCP server provides a persistent memory store for AI assistants that support MCP. It can retain information across sessions instead of requiring each conversation to rebuild the same context. The repository describes support for embedded SQLite and PostgreSQL with Apache AGE behind the same API.

Memories can be organized with namespaces, tiers, tags, dates, expiry, and typed relationships. The server can keep short-lived information, promote selected entries to permanent storage, merge several entries into a long-term summary, or remove data individually and in bulk. Archive operations provide a separate path for listing, restoring, and permanently purging archived records.

How it works

Storage and retrieval are exposed as MCP tools. memory_store creates a memory and deduplicates entries using title and namespace; it also reports contradictions. memory_recall performs fuzzy OR matching and ranks results using six factors, while memory_search uses exact keyword matching with AND semantics. Other tools retrieve individual records, apply partial updates, list records with filters, and return store statistics or available capabilities.

Relationships are represented with typed links between memories. Agents can create links, inspect a memory's links, and consolidate multiple memories into a durable summary. The system also includes archive-specific operations for reviewing, restoring, and purging older records.

On smart+ tiers, optional LLM features can expand a query into related terms, generate tags, and check two memories for contradictions.

Setup and configuration

The ai-memory MCP server has installation paths for a single developer, single-node deployments, multi-server or federated environments, and PostgreSQL plus Apache AGE deployments. The project publishes packages for Rust crates.io, npm, and PyPI. Its documentation separates quick-start installation from production, enterprise, and PostgreSQL deployment guidance.

The MCP profile controls the available surface: the README identifies a core profile with seven tools and a full profile with 101 tools in the current release, including the always-available memory_capabilities bootstrap tool. LLM configuration uses an MCP environment block; the documented backend choices include hosted providers and local servers. Operators can also configure agent attestation behavior. HTTP direct writes require attestation by default, while MCP memory_store follows the operator-as-actor path unless stricter enforcement is enabled.

Tools and capabilities

The ai-memory MCP server includes tools for:

  • Storing, recalling, searching, listing, retrieving, updating, and deleting memories.
  • Promoting records to permanent storage, forgetting records in bulk, and consolidating records.
  • Creating and reading typed memory links.
  • Inspecting statistics and active capability tiers.
  • Expanding queries, auto-tagging memories, and detecting contradictions on smart+ tiers.
  • Listing, restoring, purging, and measuring archived memories.

Limitations and notes

LLM-assisted features are tier-dependent rather than universally available. The README distinguishes seven core tools from the larger full profile, so deployments should verify the selected profile before relying on a particular capability. HTTP direct-write behavior includes a secure-default attestation requirement in the current release, and the documentation warns that attestation and hook-enforcement changes are breaking security-default changes. Choose SQLite or PostgreSQL with Apache AGE according to the deployment and scale requirements described by the project.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about AI Memory

ai-memory is an MCP server that connects AI assistants to persistent memory stored in SQLite or PostgreSQL with Apache AGE. Its main tools store, recall, search, list, update, delete, promote, link, consolidate, and archive memories, with optional LLM features for query expansion, tagging, and contradiction detection.

Install it using the project’s quick-start, production, enterprise, or PostgreSQL deployment documentation. Packages are published for crates.io, npm, and PyPI, and the repository provides a separate path for single-developer installations.

Yes. The available MCP client configuration depends on the client and the deployment path you choose.

Yes. The project supports PostgreSQL with Apache AGE as a production backend alongside embedded SQLite, and it provides a dedicated PostgreSQL and Apache AGE deployment guide.

Yes. The documented local options include Ollama, LMStudio, vLLM, and a llama.cpp server. These backends are used for optional LLM-assisted capabilities such as query expansion, automatic tagging, and contradiction checks.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAI Memory AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/ai-memory?style=directory)](https://allmcps.com/mcp/ai-memory)
HTML Embed
<a href="https://allmcps.com/mcp/ai-memory"><img src="https://allmcps.com/api/badge/ai-memory?style=directory" alt="AI Memory on AllMCPs" /></a>