Labsco
MCP SERVER

AI Memory

by alphaonedev

A persistent memory store any MCP client can share — local SQLite or Postgres, relevance-ranked recall, tiers with expiry, and a default surface of seven tools instead of a hundred.

Agent Memory
Summary
Start on `--profile core`; the full surface is a context-window decision, not a feature decision.

Seven tools cover storing, recalling and listing, which is what a memory layer is for day to day — and eager-loading clients pay for every schema they are shown, which is why the profile exists. Ramp up to `--profile full` when you actually need the archive, link-graph or coordination tooling. Worth knowing before you deploy over HTTP: unsigned direct writes to the HTTP API are rejected by default, while the MCP store path stays permissive.

What it is

A memory substrate for AI assistants, written in Rust. Memories are stored locally, ranked by relevance on recall rather than returned in insertion order, tiered so short-lived notes expire while important knowledge is promoted to permanent storage, and linked to each other with typed relations. It runs on two production backends behind one identical API — embedded SQLite with FTS5, and PostgreSQL with Apache AGE — and any MCP-capable assistant can read the same store.

What you get
  • The everyday surface: store with deduplication by title and namespace, relevance-ranked recall, exact keyword search, filtered listing and get-by-id — `memory_store`, `memory_recall`, `memory_search`, `memory_list`, `memory_get`
  • Two always-on loaders and a bootstrap tool that reports the active feature tier and what else is reachable — `memory_load_family`, `memory_smart_load`, `memory_capabilities`
  • Lifecycle control: partial update, delete, promotion to long-term with expiry cleared, bulk forget by pattern, namespace or tier, and consolidation of several memories into one summary — `memory_update`, `memory_delete`, `memory_promote`, `memory_forget`, `memory_consolidate`
  • Typed links between memories and the store's own statistics — `memory_link`, `memory_get_links`, `memory_stats`
  • An archive that is separate from deletion: list, restore, purge and archive statistics — `memory_archive_list`, `memory_archive_restore`, `memory_archive_purge`, `memory_archive_stats`
  • LLM-assisted helpers at the smart tier and above: query expansion, auto-tagging and contradiction detection between two memories — `memory_expand_query`, `memory_auto_tag`, `memory_detect_contradiction`
  • A profile switch that decides how much of this the model sees: 7 tools at `--profile core`, 101 at `--profile full`
Requirements

No account and no key for the default local setup. Install via the project's shell installer, `cargo install` from the repository (Rust 1.96+), the container image `ghcr.io/alphaonedev/ai-memory`, or the published packages — `ai-memory` on crates.io, `@alphaone/ai-memory` on npm, `ai-memory-mcp` on PyPI. The client runs `ai-memory --db <path> mcp --tier semantic` over stdio; `AI_MEMORY_DB` sets the database path if you prefer an environment variable, and the compiled default is relative to the current directory. The `smart` and `autonomous` tiers call an LLM backend, configured once in the `[llm]` section of `~/.config/ai-memory/config.toml` with `api_key_env` naming the environment variable rather than holding the key. PostgreSQL with Apache AGE is the alternative backend behind the same API.

Setup effort

One command — ai-memory --db ~/.claude/ai-memory.db mcp --tier semantic