Memory MCP

Memory MCP

Provides persistent AI agent memory using a local vector database for long-term semantic storage and short-term session scratchpads. It enables low-latency memory operations including search, storage, and bulk management without external cloud dependencies.

Category
Visit Server

README

MEMORY MCP

Memory MCP is a small, self-contained Model Context Protocol (MCP) server for persistent AI agent memory. It uses a local vector database (ChromaDB) + offline/supervised embeddings (SentenceTransformers), enabling low-latency memory operations without external cloud dependencies.

๐Ÿš€ What it supports

  • Long-term semantic memory (add_memory, search_memory, update_memory, remove_memory)
  • Short-term scratchpad memory per session (add_to_scratchpad, read_scratchpad, clear_scratchpad)
  • Bulk + lifecycle tools (export_memories, import_memories, clear_all_memory, get_memory_stats)
  • Local persistence via directory/mounted volume (works with Docker or native Python)

๐Ÿ“ฆ Components

  • src/memory_mcp/server.py - MCP tool gateway exposing REST-style calls to clients
  • src/memory_mcp/db.py - vector storage logic (Chroma, SQLite gateway)
  • mcp_client.py - example client for quickly testing call patterns
  • check_db.py/final_check.py - sanity checks for DB state
  • tests/ - existing and future test coverage tasks

๐Ÿ› ๏ธ Endpoint methods (MCP tools)

Short-Term Scratchpad

  • `add_to_scratchpad(note, session_id)
  • `read_scratchpad(session_id)
  • clear_scratchpad(session_id)

Long-Term Memory

  • add_memory(content, tags, context)
  • search_memory(query, session_id, tags, context, limit)
  • update_memory(memory_id, content, tags, context)
  • remove_memory(memory_id)

Administration

  • get_memory_stats()
  • export_memories()
  • import_memories(markdown_content)
  • clear_all_memory(confirmation)

๐Ÿงฉ Install

Option 1: Docker (Recommended)

  1. Build:

    docker build -t memory-mcp .
    
  2. Run (persist data on host):

    docker run -it --rm -v memory_data:/data -p 8000:8000 memory-mcp
    
  3. Configure your MCP client to call the server command as appropriate.

Option 2: Native Python

  1. Create and activate a virtual env:

    python -m venv .venv
    .\.venv\Scripts\Activate.ps1
    pip install -e .
    
  2. Start server directly:

    python -m memory_mcp.server
    

Tip: MEMORY_MCP_STORAGE can override the default data path from ./memory_data.

๐Ÿงช Test

Run tests with:

python -m pytest -q

Validate basic memory API quickly:

python mcp_client.py # (if implemented as interactive example)

๐Ÿ—‚๏ธ Data layout

  • memory_data/ - persistent SQLite/Chroma state for native mode
  • memory_data/vector_db/ - vector DB data
  • memory_data/chroma.sqlite3 - metadata database

๐Ÿงฐ Usage samples

Add memory

client.add_memory('Your fact', tags=['fact'], context='user')

Search memory

client.search_memory('fact about sky', limit=5)

Export & restore

md = client.export_memories()
client.import_memories(md)

โœ… Keeping this README up to date

  • Always reflect actual available methods in src/memory_mcp/server.py
  • Add new methods in Features + Usage sections
  • Ensure install section includes the latest dependency/runtime directives from pyproject.toml

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured