Skip to main content
Glama
mcp-openmemory
by dedsxc

mcp-openmemory

A FastMCP server that exposes mem0 long-term memory to MCP clients (e.g. an AI coding agent) over SSE.

It is a thin, stateless MCP layer over an existing mem0 REST server (http://mem0:8000) — it does not run its own vector store. This keeps a single source of truth for memory (the mem0 pgvector store) instead of introducing a second, disconnected memory silo.

Tools

Tool

Purpose

search_memory(query, user_id?, limit?)

Recall memories relevant to a query. Call at the start of a task.

add_memory(text, user_id?, role?)

Store a fact/preference/exchange. Use automatically when you learn something durable, or on explicit request.

list_memories(user_id?)

List stored memories for a bucket.

delete_memory(memory_id)

Forget a single memory by id.

Memory is isolated per user_id ("bucket"). When a caller omits user_id, MEM0_DEFAULT_USER_ID is used, giving the agent a single shared memory.

Related MCP server: mem0-agent-memory

Configuration

Environment variables (prefix MEM0_):

Variable

Default

Description

MEM0_MEM0_URL

http://mem0:8000

Base URL of the mem0 REST server

MEM0_API_KEY

(none)

Admin API key, sent as X-API-Key

MEM0_DEFAULT_USER_ID

coder-agent

Bucket used when no user_id is passed

MEM0_IDENTITY_HEADER

x-mem0-user-id

Primary trusted header carrying the end-user identity

MEM0_IDENTITY_HEADERS

(none)

Extra identity headers, tried after MEM0_IDENTITY_HEADER (comma-separated, e.g. x-coder-owner-id). First non-empty wins.

MEM0_SEARCH_LIMIT

5

Default number of memories per search

MEM0_TIMEOUT

10

HTTP timeout (s) for reads (search/list)

MEM0_WRITE_TIMEOUT

60

HTTP timeout (s) for writes (add runs a server-side LLM extraction)

MEM0_SERVER_HOST

0.0.0.0

Bind host for the SSE server

MEM0_SERVER_PORT

8000

Bind port for the SSE server

Run

pip install -e .
openmemory-mcp-sse   # SSE at http://0.0.0.0:8000/sse
# or
openmemory-mcp       # stdio mode

Container

Built by the release-containers workflow (release-please) to ghcr.io/dedsxc/openmemory-mcp:<version> for linux/amd64,linux/arm64.

Available Tools

4 tools
add_memoryA

Store a new memory (a fact, preference, or exchange) in long-term memory.

Use this automatically when you learn something durable about the user or project, or on explicit request ("remember that ..."). mem0 runs a server-side extraction to decide what is worth keeping, so not every call creates a stored entry.

The memory bucket is determined automatically from your authenticated identity; you cannot and need not specify whose memory to write.

Inputs: text (required), role. Returns: object

delete_memoryA

Delete a single memory by its id.

Note: mem0 deletes by id without a user filter, so ids should only be obtained from this identity's own search_memory / list_memories results (both scoped to the caller's bucket).

Inputs: memory_id (required). Returns: object

list_memoriesA

List all stored memories for your authenticated identity's bucket.

Returns: A list of memory objects with their ids and remembered text.

Inputs: no named parameters. Returns: result

search_memoryA

Search long-term memory for entries relevant to a query.

Call this at the start of a task (or whenever prior context would help) to recall what was learned in earlier sessions.

The memory bucket is determined automatically from your authenticated identity; you cannot and need not specify whose memory to read.

Inputs: query (required), limit. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: search, add, list, and delete memory. There is no overlap or ambiguity between them, and the descriptions reinforce their unique roles.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (search_memory, add_memory, list_memories, delete_memory). The plural in list_memories is a natural fit for listing multiple items, similar to standard API conventions.

    Tool Count5/5

    Four tools is well-scoped for a memory management server, covering the essential operations without unnecessary bloat. It sits comfortably within the ideal 3-15 tool range.

    Completeness4/5

    The server provides create, read (search and list), and delete operations, but lacks an update operation. This is a minor gap, as memories can be deleted and re-added, but it slightly limits full lifecycle coverage.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that provides persistent memory capabilities for AI agents using Mem0, enabling storage, search, and management of contextual information across conversations with support for multiple backends and LLM providers.
      18
      34 PyPI
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      A long-term memory MCP server for AI agents that stores memories (facts, decisions, etc.) in a single SQLite database with hybrid search and full edit history, ensuring consistency across sessions.
      43
      MIT