home / mcp / memory mcp mcp server
Single-tenant memory MCP server for LibreChat with raw turns, distilled memory, and hybrid retrieval plus auditing.
Configuration
View docs{
"mcpServers": {
"ugurakcil-mcpmemo": {
"url": "https://mcp.datasins.com/mcp",
"headers": {
"LLM_API_KEY": "YOUR_LLM_API_KEY",
"DATABASE_URL": "YOUR_DATABASE_URL",
"SHARED_HMAC_SECRET": "YOUR_HMAC_SECRET"
}
}
}
}Memory MCP is a production-grade, single-tenant memory management server for LibreChat that stores raw conversation turns, distills durable memory, and provides hybrid retrieval plus plan consistency auditing. It empowers you to track decisions, constraints, mistakes, and open questions while enabling reliable retrieval and auditing across planning and memory cycles.
You interact with Memory MCP through an MCP client by issuing tools that manipulate plans, threads, and memory data. Create a plan to organize work, open threads under that plan to represent discussion topics, ingest turns to capture decisions and context, and then distill, retrieve, and audit to maintain coherent memory across your workspace. Use the shared export/import workflow to move memory packages between workspaces while preserving integrity with HMAC signatures. Use the retrieval and audit tools to verify that decisions and constraints remain active and aligned with your current plan.
Prerequisites: ensure you have Docker and a compatible runtime environment installed on your machine. You will also need access to a PostgreSQL database and an API key for your LLM provider.
# 1) Copy environment sample to a real env file
cp .env.example .env
# 2) Start the services with Docker Compose (or Make target if provided)
make up
# 3) Apply database migrations
make migrate
# 4) Run tests to verify the setup
make testConfiguration, security, samples, and notes are provided to help you run Memory MCP reliably. You will configure database access, API keys, and a shared HMAC secret in the environment file. The system logs in JSON format and exports Prometheus metrics for observability. Retention policies are controlled via environment variables prefixed with RETENTION_. The system uses Pydantic validation and strict enums to enforce input validity, and prompts include explicit warnings against prompt injection.
Security features include strict input validation with Pydantic, clear system prompts to prevent prompt injection, HMAC signatures for export/import, and non-logging of API keys. These safeguards help ensure that your memory data remains consistent, auditable, and protected when sharing memory packages between environments.
If EMBEDDING_DIM changes between deployments, run the appropriate migration to align schema and indexes. When ENABLE_LLM_RERANK is set to true, low-confidence deep retrievals enable LLM-based re-ranking. Retention policies are controlled by the RETENTION_* variables in the environment configuration.
1) Start a new plan and thread, then ingest initial decisions. 2) Continue an existing plan by creating or following a thread and extracting new decisions from recent turns. 3) Perform a deep audit by retrieving context with deep mode and explaining the results, then run consistency checks against the plan text and review stale references to update superseded decisions.
Create a new plan to organize memory and work topics.
Create a new thread under a specific plan to capture discussion context.
Ingest a raw turn into a thread, including metadata like role and text.
Extract distilled memory elements such as decisions, constraints, and questions from turns.
Retrieve contextual memory with options for mode, scope, and explanation.
Check the consistency of a proposed plan against observed memory and decisions.
Export memory packs with optional types and expiration using an HMAC signature.
Import memory packs securely using an HMAC-signed payload.