Get the FREE Ultimate OpenClaw Setup Guide →

elasticsearch-memory

🧠 Elasticsearch-powered MCP server with hierarchical memory categorization, intelligent auto-detection, and batch review capabilities

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio fredac100-elasticsearch-memory-mcp uvx elasticsearch-memory-mcp \
  --env ELASTICSEARCH_URL="http://localhost:9200"

How to use

This MCP server provides a persistent, intelligent memory system powered by Elasticsearch. It supports hierarchical memory categorization with identity, active_context, active_project, technical_knowledge, and archived categories, along with an auto-detection pipeline, batch review workflows, semantic search, and context loading optimizations. You can save memories with automatic categorization, load initial hierarchical context, review and batch-categorize uncategorized memories, and perform semantic searches across memories with optional category filters. The server is designed to integrate with Claude via MCP endpoints, enabling seamless memory augmentation for conversational agents and workflows.

How to install

Prerequisites: - Python 3.8+ - Elasticsearch 8.0+ - Network access to Elasticsearch (default URL http://localhost:9200)

Installation steps:

  1. Install the MCP server package from PyPI:
pip install elasticsearch-memory-mcp
  1. Start Elasticsearch (example using Docker):
# Start a single-node Elasticsearch instance
docker run -d -p 9200:9200 -e "discovery.type=single-node" elasticsearch:8.0.0
  1. Run/install the MCP server and configure MCP pointing to your Elasticsearch instance:
  • For Claude Desktop integration (uses uvx):
# Claude Desktop will call the MCP via uvx with the following config
# Example config (ClaudeDesktop):
# "mcpServers": {
#   "elasticsearch-memory": {
#     "command": "uvx",
#     "args": ["elasticsearch-memory-mcp"],
#     "env": {
#       "ELASTICSEARCH_URL": "http://localhost:9200"
#     }
#   }
# }
  • If you install from source and run locally:
# Clone and install in development mode
git clone https://github.com/fredac100/elasticsearch-memory-mcp.git
cd elasticsearch-memory-mcp

python -m venv venv
source venv/bin/activate
pip install -e .

# Then configure MCP as shown in the config example below
  1. Example MCP config snippet (used by Claude or client tooling):
{
  "mcpServers": {
    "elasticsearch-memory": {
      "command": "/path/to/venv/bin/uvx",
      "args": ["elasticsearch-memory-mcp"],
      "env": {
        "ELASTICSEARCH_URL": "http://localhost:9200"
      }
    }
  }
}

Additional notes

Tips and notes:

  • Ensure Elasticsearch is reachable at the specified ELASTICSEARCH_URL (default http://localhost:9200).
  • If using Docker for Elasticsearch, expose port 9200 and set discovery.type=single-node as shown in the quick-start example.
  • The MCP server exposes features like save_memory, load_initial_context, review_uncategorized_batch, apply_batch_categorization, search_memory, and auto_categorize_memories. You can combine these through the MCP client (e.g., Claude) or direct API calls.
  • If you upgrade from v5 memories, the server provides automatic fallback and batch-review workflows to migrate uncategorized memories.
  • In Claude, uvx is used by default; if uvx is not installed, install via pip install uvx or run the module with python -m elasticsearch_memory_mcp.

Related MCP Servers

Sponsor this space

Reach thousands of developers ↗