Skip to main content
Glama

memory-mcp

Disclaimer: This codebase was generated with Codex assistance.

Disclaimer: This project was created for personal use; you may use, modify, and distribute it as you like (MIT), but no support is provided.

Local Memory MCP server with:

  • SQLite + sqlite-vec for embedded storage/search

  • OpenAI embeddings (configurable model)

  • Queue maintenance flow (take_memory_log + ack_memory_log)

What This Is

memory-mcp is a local-first MCP server for agent memory. It separates:

  • Fast capture (log_memory)

  • Runtime retrieval (search_memory)

  • Maintenance curation (take_memory_log + ack_memory_log + CRUD tools)

The intended flow is:

  1. Agents log candidate memory during normal work.

  2. A maintenance process takes one log item at a time.

  3. It converts relevant items into persistent searchable facts.

  4. It acknowledges the processed log item and continues.

Related MCP server: claude-memory-mcp

Use With MCP Clients

Codex

[mcp_servers.memory]
startup_timeout_sec = 60
command = "uv"
args = ["run", "memory-mcp"]

[mcp_servers.memory.env]
MEMORY_DB_PATH = "/full/path/to/memory/file"
OPENAI_API_KEY = "your-openai-key"

Claude Desktop

{
  "mcpServers": {
    "memory": {
      "command": "uv",
      "args": ["run", "memory-mcp"],
      "env": {
        "MEMORY_DB_PATH": "/full/path/to/memory/file",
        "OPENAI_API_KEY": "your-openai-key"
      }
    }
  }
}

Environment

Supported env vars:

  • MEMORY_DB_PATH (default ./data/memory.db)

  • OPENAI_API_KEY (required)

  • OPENAI_BASE_URL (optional)

  • MEMORY_EMBEDDING_MODEL (default text-embedding-3-small)

  • MEMORY_MAX_SEARCH_K (default 50)

Install

uv venv .venv
source .venv/bin/activate
uv pip install -e .

Option B: Build and install wheel

uv build
pip install dist/memory_mcp-0.1.1-py3-none-any.whl

Install once, run many times:

uv venv .venv
source .venv/bin/activate
uv pip install -e .
memory-mcp

Why this is faster:

  • Avoids repeated uv run environment resolution overhead on each boot.

  • Startup time is mostly server init instead of wrapper/setup work.

Run

export OPENAI_API_KEY=your_key_here
memory-mcp

Optional:

export MEMORY_DB_PATH=./data/memory.db
export OPENAI_BASE_URL=https://api.openai.com/v1
export MEMORY_EMBEDDING_MODEL=text-embedding-3-small
export MEMORY_MAX_SEARCH_K=50

uv run Mode (convenient, usually slower)

OPENAI_API_KEY=... uv run --no-sync memory-mcp

MCP Tools

Primary:

  • log_memory

  • search_memory

Maintenance:

  • take_memory_log

  • ack_memory_log

  • create_memory

  • update_memory

  • delete_memory

Notes

  • tags accepts either ["a","b"] or "a,b" on relevant tools.

  • Queue semantics enforce a single in_flight log item at a time.

  • Embedding model support is currently constrained to configured OpenAI embedding models in code.

License

MIT. See LICENSE.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to store and retrieve memories with semantic search capabilities using vector embeddings. Provides persistent memory storage with SQLite backend for context retention across conversations.
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides persistent long-term memory for LLMs via local SQLite storage and semantic search, enabling recall across sessions without external APIs.
      5
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables agents to persist, search, and manage short- and long-term memories using local SQLite storage and offline embeddings, with tools for recall, update, confirmation, and consolidation without external services.
      4 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to save, recall, and forget persistent memories stored entirely on the local machine in SQLite, using hybrid semantic and keyword search with on-device embeddings, plus spaces and profile context injection.
      MIT