Skip to main content
Glama

OpenMem

npm version License openmem-mcp GitHub

openmem-mcp

NOTE

Context management moved to Smarter Compact. OpenMem 0.10 removed its context proxy, session store, smart_compact_* tools and OpenCode 2 trim. OpenMem covers memory: providers, the indexer, memory_* MCP tools and coding-agent hooks. For trimming long sessions, install Smarter Compact (docs).

OpenMem. Pluggable memory providers (Hindsight, mem0, Cognee) and one setup wizard for coding-agent memory — retain, recall, and index your sources.

Your sources become memory any agent can query.

Docs: bcmyguest.github.io/openmem/

MCP: npx -y -p @bcmyguest/openmem openmem-mcp (after the wizard — it needs a running provider)

Start here: Concepts · Quickstart · Compatibility · Development (clone, tests, prek)

Quickstart

Step

Command

1. Wizard

npx @bcmyguest/openmem setup

2. Check

npx @bcmyguest/openmem doctor

3. Coding agents

npx @bcmyguest/openmem install-coding-agent --yes

From a git clone: Development guide (npm install, npm run setup, tests, prek).

Needs (wizard): Docker Compose v2, Node ≥ 24, and an LLM route for Hindsight — see Quickstart.

Later: npx @bcmyguest/openmem up / down / switch <provider> --yes / doctor.

Wizard dry-run (what first setup plans — no writes):

Full guide: Quickstart · Concepts · Architecture

Related MCP server: mem0-mcp

Architecture

The diagram at the top shows the memory flow.

flowchart LR
  S["<b>Sources</b><br/>Git repos: docs, code outlines<br/>Obsidian vaults · notes · papers · bookmarks<br/>RSS · OpenAlex feeds"] -->|index| I["<b>OpenMem indexer</b><br/>polls repos, watches folders"]
  I -->|retain| P[("<b>Memory provider</b><br/>one active, swappable<br/>Hindsight (default) · mem0 · Cognee · …")]
  P <--> M["<b>OpenMem MCP</b><br/>memory_recall · memory_add<br/>memory_search · memory_reflect<br/>memory_pages_* + export/import, status…"]
  M <-->|tools| A["<b>Coding agents</b><br/>Claude Code · Codex · Cursor · OpenCode"]
  A -.->|"session hooks: recall at start · retain at stop"| M
  classDef om fill:#e8eaf9,stroke:#4651a6,color:#1b1d2a
  class I,M om

See architecture for memory runtime paths and provider-specific behavior.

Providers and portability

  • Providers — Provider status lists every provider and its support level from the manifests. Contributor details: adding a provider.

  • MCP — unified memory_* plus optional native/NotebookLM servers: MCP setup.

  • Portable memory — memory_export / memory_import speak PMM: Portable memory.

  • Switch — npx @bcmyguest/openmem switch <provider> does not migrate data by itself; export/import (or re-index) moves content.

Compose runs the shared indexer and the services required by the selected provider. Hindsight uses litellm and hindsight (127.0.0.1:8888); mem0 and Cognee use their own APIs and do not include LiteLLM by default. LiteLLM can also be added for memory_reflect synthesis on mem0/Cognee. See Architecture for runtime paths.

OpenMem is not affiliated with these projects; they shape the problem or the pattern.

OpenFeature

Inspiration for a vendor-agnostic interface + pluggable providers (there: feature flags; here: coding-agent memory).

mise / asdf

One CLI over many backends; declarative config and tasks without replacing each tool’s own settings.

LiteLLM

Model proxy used on Hindsight stacks.

Hindsight coding agents

Reference implementation for knowledge pages, initiative capture and ingest status; OpenMem's hooks replace it in openmem mode.

rtk

Compresses shell command output before the agent sees it; install-coding-agent runs rtk init when it is installed.

Meridian

Bridges a Claude subscription to an Anthropic-compatible API; optional Hindsight model backend (guide).

OpenCode / Claude Code hooks / Codex hooks

The agent hook and plugin APIs OpenMem translates between (compatibility).

More setup analogues: Pluggable memory providers.

Formerly personal-memory. Use the openmem CLI and MCP server name; installers drop the old personal-memory MCP entry.

References

Papers and preprints on agent memory (full list):

Reference

Link

MemGPT (Packer et al., 2023)

arXiv:2310.08560

LoCoMo (An et al., 2024)

arXiv:2402.17753

LongMemEval (Wu et al., 2024)

arXiv:2410.10813

MemoryAgentBench (2025)

arXiv:2507.05257

Reports: references.md. Context-management references moved to Smarter Compact.

License

Apache License 2.0 — see LICENSE (Copyright 2026 B Guest).

Contributing

Contributions are welcome. See CONTRIBUTING.md and the development guide for tests and CI.

Available Tools

15 tools
memory_addStore a memoryA

Store durable facts, decisions or session notes in the active provider. Pass bank from memory_project_scope for project work. Hindsight ingests async by default.

Inputs: content (required), bank, async, metadata.

memory_capture_initiativeCapture an initiativeA

Record an approved feature plan as a knowledge page before writing code; relates_to_page_id records a plan change. Skip bug fixes and small tweaks. Hindsight only.

Inputs: title (required), summary (required), bank, relates_to_page_id.

memory_consolidateConsolidate / cognifyA

Rebuild the provider's graph or index after bulk ingest (Cognee cognify; no-op on mem0).

Inputs: bank.

memory_exportExport memories (PMM)A
Read-onlyIdempotent

Export memories as PMM v1 JSON or JSONL for backup or migration. Pass bank for large stores.

Inputs: bank, format.

memory_forgetDelete memoriesA
DestructiveIdempotent

Delete memories: mem0 needs memory_id; on Hindsight a bank without memory_id drops the whole bank. Confirm with the user first. Not available on Cognee.

Inputs: bank, memory_id.

memory_importImport memories (PMM)A

Import a PMM v1 payload from memory_export. Content and scope carry over; embeddings and graphs do not.

Inputs: data (required), merge_strategy.

memory_pages_listList knowledge pagesA
Read-onlyIdempotent

List a bank's knowledge pages (ids, names, folders; no bodies). Hindsight only.

Inputs: bank.

memory_pages_readRead a knowledge pageA
Read-onlyIdempotent

Read one knowledge page by id (from a page listing, search, or [[page:]] link). Hindsight only.

Inputs: page_id (required), bank.

memory_project_scopeResolve project bankA
Read-onlyIdempotent

Resolve the project bank (user_id / dataset) and access policy for a workspace path. Call it instead of guessing a bank name. Local mapping only.

Inputs: cwd.

memory_provider_statusProvider statusB
Read-onlyIdempotent

Report the active provider id and backend URL.

Inputs: no named parameters.

memory_recallRecall context for a questionB
Read-onlyIdempotent

Retrieve stored context for a natural-language question (Hindsight recall; search on mem0 and Cognee).

Inputs: query (required), bank, limit.

memory_reflectReflect / synthesize an answerA
Read-onlyIdempotent

Synthesize a reasoned answer from stored memories, with evidence. The answer is not stored.

Inputs: query (required), bank, limit.

memory_statusIngest statusA
Read-onlyIdempotent

Report whether async ingest has drained (ready, active and failed counts, memory_add operation ids). Check before recalling just-stored content. Hindsight only; mem0 is always ready.

Inputs: bank, operation_ids.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 15 tools

    Disambiguation4/5

    The three retrieval tools (search/recall/reflect) overlap conceptually, but each description explicitly says when to use which (raw hits vs. context vs. synthesized answer), which resolves most of the confusion. memory_status vs. memory_provider_status are also close (ingest drain vs. provider id/URL) but are distinguishable by their stated outputs; memory_add vs. memory_import is clear from the PMM payload requirement.

    Naming Consistency4/5

    Every name uses the memory_ prefix in snake_case, giving a strong shared convention. The only deviation is word order: memory_pages_list/search/read put the verb last while memory_add, memory_search and memory_forget put it directly after the prefix, so the pattern is predictable but not perfectly uniform.

    Tool Count4/5

    15 tools sits at the top of the sensible band and is justified by the breadth of the surface: three provider backends, ingest lifecycle, pages and export/import. Nothing looks like filler, though the provider-specific optionality (Hindsight-only, mem0-only, Cognee-only tools) means several tools are dead for any given user.

    Completeness3/5

    Storage, retrieval, sync, backup and page reading are covered, but there are clear gaps: no memory_update/overwrite tool, and knowledge pages can be listed, searched and read but not edited or deleted except by dropping a whole bank via memory_forget. Page creation exists only through memory_capture_initiative for feature plans, so an agent cannot add or revise a convention page directly.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Self-hosted Mem0 MCP server integrating Qdrant, Neo4j, and Ollama for semantic memory search, graph entity relationships, and memory management via OpenMemory API.
      6
      4
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Provides persistent, searchable memory across AI coding agent and chat history (Claude Code, Codex, Gemini CLI, ChatGPT, and more) via retrieval-augmented generation, enabling semantic and hybrid search to retain context across sessions.
      5
      MIT