Skip to main content
Glama

Dense-Mem is a standalone HTTP MCP memory server using Streamable HTTP. AI clients choose what to remember; Dense-Mem stores exact Evidence, preserves its sources and lifecycle, and retrieves authorized memory across conversations.

PostgreSQL with pgvector is the durable authority. Redis is coordination only: a single-node deployment can use process memory; a multi-instance deployment requires Redis or equivalent distributed coordination.

Try the demo

Open the hosted demo to create a temporary, isolated team and try disposable memory before self-hosting.

Related MCP server: Strata

Why Dense-Mem

  • Keep the source. Exact Evidence retains occurrences, source revisions, provenance, and an append-only lifecycle.

  • Control access. Private and team-shared memory have explicit destinations; shared visibility does not grant permission to change another owner's Evidence.

  • Follow the history. Recall returns eligible Evidence; Trace explains its provenance, and corrections or retractions preserve lineage.

  • Organize without inventing facts. Derived topics help discovery while Evidence remains canonical memory.

See Using Dense-Mem for the memory workflow and Architecture for the system design.

Quickstart

Install Docker with Compose. This fresh-install example pins the image and configuration files to the same published release:

mkdir dense-mem-local
cd dense-mem-local
export DENSE_MEM_VERSION=v2.8.0
export DENSE_MEM_IMAGE="ghcr.io/markhuangai/dense-mem:${DENSE_MEM_VERSION}"

curl -fsSLo docker-compose.yml \
  "https://raw.githubusercontent.com/markhuangai/dense-mem/${DENSE_MEM_VERSION}/examples/docker-compose.base.yml"
curl -fsSLo .env.example \
  "https://raw.githubusercontent.com/markhuangai/dense-mem/${DENSE_MEM_VERSION}/examples/.env.example"
cp .env.example .env
${EDITOR:-vi} .env

Set these values in .env:

Setting

Purpose

POSTGRES_PASSWORD

Password for the local PostgreSQL instance

CONTROL_PORTAL_TOKEN

Private control-portal access token

AI_API_KEY

Model-provider credential

AI_VERIFIER_MODEL

Chat model used to assess Evidence

The example supplies OpenAI embedding defaults. For other providers, change the endpoint, model, and dimensions together; see Configuration.

docker compose up -d
docker compose ps
curl -fsS http://127.0.0.1:8080/ready

Startup applies migrations before readiness. Keep the image pin for later starts; consult the Operations Runbook before changing an existing database.

Connect your AI client

  1. Open the private control portal at http://127.0.0.1:8090/ with CONTROL_PORTAL_TOKEN. Create a team, then create its first credential.

  2. Open the user portal at http://127.0.0.1:8080/ui. Its Connect page shows the MCP connection details. The local MCP endpoint is http://127.0.0.1:8080/mcp.

  3. Configure your host using the MCP client guide, then try a Remember, Recall, and Trace workflow.

The control listener stays private. Configured hosted model providers can receive Evidence and queries; use self-hosted providers when that traffic must stay within your infrastructure. External memory automation uses /mcp.

Documentation

Goal

Guide

Learn how memory works

Evidence walkthrough · Using Dense-Mem

Configure and operate a server

Configuration · Operations

Choose deployment examples

Examples · Grafana

Integrate a client

Python / ADK / LangChain · stdio MCP proxy

Develop and test

Scripts · Evaluation · ADRs

The documentation site holds interactive walkthroughs and detailed reference. Directory READMEs cover the files they accompany. For documented behavior changes, link a companion gh-pages PR or explain why the site needs no update.

Dense-Mem is part of the research preprint Governed Enterprise AI Memory Beyond RAG: From Vector Retrieval to Permissioned Knowledge Graphs.

License

Apache-2.0

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
      Self-hosted, governed long-term memory and knowledge-graph server for AI agents with access control, hybrid retrieval, and typed graph linking.
      AGPL 3.0
    • F
      license
      Not graded
      quality
      D
      maintenance
      Self-hosted AI memory server that provides persistent memory for MCP-compatible AI agents with semantic search, file vault, and per-agent API keys.
      6
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Self-hosted, local-first knowledge graph and memory server for AI agents. Enables agents to persist, recall, and organize knowledge through MCP with automatic distillation, deduplication, and cross-linking.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides a self-hosted shared memory service that lets AI agents capture and recall durable facts, decisions, and context across multiple tools and MCP-capable clients.
      3
      MIT