1. Conduid
  2. Developer Tools
  3. Memory
MCP server · Developer Tools

Memory

Go MCP server for HMLR hierarchical memory system with semantic search

Unclaimed last commit 8 months ago devtools
48Fair

Scored 4 hours ago · breakdown

About Memory

Memory is an MCP server published by harperreed in the Developer Tools category: go MCP server for HMLR hierarchical memory system with semantic search.

The repository has 5 stars and 1 forks, with the last commit 8 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/harperreed/memory

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Memory

Powered by Claude · Grounded in docs

I know everything about Memory. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 4 hours ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • !License declaredNo license file. Legally you have no right to use it in a product.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.5.1v0.5.1 · 1 Feb 2026Changelog Features 4910d145d7fbfe03ef6af320bc625b646c200d54: feat: add install-skill command for Claude Code (@harperreed)
v0.5.0v0.5.0 · 1 Feb 2026Changelog Features 536460986308aae398701d96a76ac0005dd9d733: feat: add stale sync support using charm v0.19.0 (@harperreed) Other eadcca5b6f3288d5470bb703c7b6c7cbc56543e7: chore(deps): update charm to v0.20.0 (@harperreed)…
v0.4.8v0.4.8 · 24 Dec 2025Changelog Other b3e071f15224b7c831395545fdba0d6a3c49a26f: refactor: remove dead code from Do API migration (@harperreed)
v0.4.7v0.4.7 · 23 Dec 2025Changelog Features 09aac85ee2eb42d80bf7ab76cedc3804de3b4608: feat: upgrade to charm v0.17.0 and add kv repair/reset/wipe commands (@harperreed)
v0.4.6v0.4.6 · 22 Dec 2025Changelog Bug fixes bc25f06c9eeae1a991998cbef139edab02fe2bb1: fix: skip WAL test when CHARM_HOST not configured (@harperreed) Other dc5921e1330fca51e9384561b803bc771e72c878: refactor: improve code quality and robustness (@harperreed)

README

HMLR Go MCP Server

A Go implementation of the HMLR (Hierarchical Memory Lookup & Routing) memory system, exposed as an MCP (Model Context Protocol) server for integration with Claude Code and other MCP clients.

What is HMLR?

HMLR replaces traditional vector-only RAG systems with a structured, state-aware memory architecture that achieves perfect (1.00) faithfulness and context recall across adversarial benchmarks.

Key Features:

  • 🧠 Temporal Resolution: Automatically handles conflicting facts across time
  • 📋 Bridge Blocks: Organizes conversations by topic with smart routing
  • 🎯 4 Routing Scenarios: Continuation, Resumption, New Topic, Topic Shift
  • 🔍 Semantic Recall: Retrieves relevant memories even with zero keyword overlap
  • 💾 XDG Compliant: Stores data in ~/.local/share/remember/

Quick Start

Prerequisites

  • Go 1.23+ installed
  • OpenAI API key (for embeddings and LLM features)

Installation

  1. Clone the repository:
git clone <your-repo-url>
cd remember-standalone
  1. Create .env file with your API keys:
cp .env.example .env
# Edit .env and add your OPENAI_API_KEY

Example .env:

OPENAI_API_KEY=sk-proj-...
ANTHROPIC_API_KEY=sk-ant-...  # Optional, for future features
MEMORY_OPENAI_MODEL=gpt-4o-mini  # Optional, defaults to gpt-4o-mini
  1. Build the server:
go build -o bin/hmlr-server ./cmd/server
  1. Run the server:
./bin/hmlr-server

The server will start on stdio and wait for MCP protocol messages.

Configuration

Environment Variables

Required:

  • OPENAI_API_KEY - Your OpenAI API key for embeddings and LLM features

Optional:

  • MEMORY_OPENAI_MODEL - Chat model to use (default: gpt-4o-mini)
    • Options: gpt-4o-mini, gpt-4o, o1-mini, etc.
    • Affects metadata extraction, fact extraction, and user profile learning
    • gpt-4o-mini is recommended for best balance of speed and quality

Model Selection Guide:

  • gpt-4o-mini: Recommended - Good balance of speed, quality, and cost (~$0.15/1M input tokens)
  • gpt-4o: Highest quality, slower, more expensive (~$2.50/1M input tokens)
  • o1-mini: Advanced reasoning capabilities (~$3/1M input tokens)

Usage with Claude Code

Add to your Claude Code MCP settings (~/.config/claude-code/mcp_settings.json):

{
  "mcpServers": {
    "remember": {
      "command": "/path/to/remember-standalone/bin/hmlr-server",
      "args": [],
      "env": {
        "OPENAI_API_KEY": "your-key-here",
        "MEMORY_OPENAI_MODEL": "gpt-4o-mini"
      }
    }
  }
}

MCP Tools

The server exposes 5 MCP tools:

1. store_conversation

Store a conversation turn in HMLR memory.

Input:

{
  "message": "What's the capital of France?",
  "context": "Optional additional context"
}

Output:

{
  "block_id": "block_20251206_143022",
  "turn_id": "turn_20251206_143022_abc123",
  "routing_scenario": "topic_continuation",
  "facts_extracted": 1
}

2. retrieve_memory

Search for relevant memories.

Input:

{
  "query": "What did we discuss about France?",
  "max_results": 5
}

Output:

{
  "memories": [
    {
      "block_id": "block_20251206_143022",
      "topic_label": "Geography",
      "relevance_score": 0.95,
      "summary": "Discussion about European capitals",
      "turns": [...]
    }
  ],
  "facts": [
    {
      "key": "capital_of_France",
      "value": "Paris",
      "confidence": 1.0
    }
  ]
}

3. list_active_topics

List all active conversation topics.

Output:

{
  "topics": [
    {
      "block_id": "block_20251206_143022",
      "topic_label": "Geography",
      "status": "ACTIVE",
      "turn_count": 3,
      "created_at": "2025-12-06T14:30:22Z"
    }
  ]
}

4. get_topic_history

Get full conversation history for a topic.

Input:

{
  "block_id": "block_20251206_143022"
}

5. get_user_profile

Get the user profile summary.

Output:

{
  "profile": {
    "preferences": {},
    "topics_of_interest": [],
    "last_updated": "2025-12-06T14:30:22Z"
  }
}

Architecture

HMLR Memory System
├── Governor         # Smart routing (4 scenarios)
├── ChunkEngine      # Hierarchical chunking (turn → paragraph → sentence)
├── Storage          # XDG-compliant file + SQLite storage
├── Bridge Blocks    # Topic-based conversation organization
└── MCP Server       # Stdio transport for Claude Code integration

Storage Layout

~/.local/share/remember/
├── bridge_blocks/
│   └── 2025-12-06/
│       ├── block_*.json         # Conversation topics
│       └── day_metadata.json
├── facts.db                      # SQLite fact database
├── embeddings/
│   └── *.json                    # Vector embeddings
└── user_profile.json             # Long-term user profile

Development

Running Tests

# Run all scenario tests (with REAL storage, no mocks!)
go test -v ./.scratch/

# Run specific scenario
go test -v ./.scratch/ -run TestScenario01

Project Structure

remember-standalone/
├── cmd/
│   └── server/           # Main entry point
├── internal/
│   ├── core/            # Governor, ChunkEngine
│   ├── storage/         # Storage implementation
│   ├── models/          # Data structures
│   └── mcp/             # MCP tools and handlers
├── .scratch/            # Scenario tests (not committed)
├── scenarios.jsonl      # Documented test scenarios
└── DESIGN.md           # Full architecture design

Scenario Testing

This project follows scenario-driven testing with zero mocks:

# All tests use REAL storage, REAL SQLite, REAL files
.scratch/scenario_01_store_retrieve_test.go  # Basic storage
.scratch/scenario_02_routing_test.go         # Governor routing
.scratch/scenario_03_chunking_test.go        # Hierarchical chunking

See scenarios.jsonl for documented test scenarios.

Implementation Status

✅ Phase 1: Foundation

  • XDG storage initialization
  • Bridge Block JSON storage
  • SQLite facts database

✅ Phase 2: Core Components

  • Governor with 4 routing scenarios
  • ChunkEngine for hierarchical chunking
  • FactScrubber with LLM-based extraction
  • ContextHydrator for intelligent prompt assembly
  • LatticeCrawler for vector-based candidate retrieval

✅ Phase 3: Background Agents

  • Scribe agent for async user profile learning
  • Goroutine-based async processing

✅ Phase 4: MCP Server

  • Stdio transport
  • All 5 MCP tools implemented
  • .env loading for API keys

✅ Phase 5: Advanced Features

  • Vector embeddings with OpenAI (text-embedding-3-small)
  • LLM-based fact extraction (GPT-4o-mini)
  • Semantic memory search with cosine similarity
  • Dynamic user profiles with intelligent merging

Roadmap

  • Integrate OpenAI embeddings (text-embedding-3-small)
  • Implement FactScrubber with LLM
  • Add vector-based semantic search
  • Implement Scribe agent for user profiles
  • Add ContextHydrator for prompt assembly
  • Implement LatticeCrawler for memory retrieval
  • RAGAS benchmark tests (3/3 passing at 1.00)
  • Performance optimizations
  • Port remaining RAGAS tests (7C, 8, 9, 12)

Contributing

This project uses:

  • TDD - Write tests first, then implement
  • Scenario Testing - Real dependencies, no mocks
  • Subagent-Driven Development - Fresh context per task

See DESIGN.md for full architecture details.

License

MIT License - See LICENSE file

References

README fetched from the repository 4 hours ago. The original is authoritative.

Questions

About Memory

How do I install Memory?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Memory safe to use with an AI agent?

Its trust score is 48 out of 100 (fair). It passes 4 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Memory still maintained?

The last commit was 8 months ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.