Skip to main content
MCP server CX Codex

hmem — Claude Code MCP server: what it does, how to install

Keeps project knowledge in a SQLite store across sessions and devices, loading detail only when the agent asks for it.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env HMEM_STORAGE_DIR=<HMEM_STORAGE_DIR> --transport stdio hmem-humanlike-memory-for-ai-agents -- npx -y hmem-mcp
Open on GitHub

What hmem — Humanlike Memory for AI Agents does

hmem gives an agent a working memory instead of a blank slate at the start of every chat. A single load_project() call returns a compressed briefing: stack, open bugs, recent decisions, next step — and this works the same way across Claude Code, Codex, Cursor, GitHub Copilot, Windsurf, Cline, Zed and Gemini CLI.

Entries sit in five tiers of detail. Tier one is a one-line summary per entry and loads every time; tiers two through five — a paragraph, full context, extended notes, and the raw original text — only load when the agent actually drills into a record. Conversations get captured automatically through a stop hook, and a background Haiku subagent wakes up every few exchanges to pull out lessons and errors and write a handoff note for whoever picks up the project next.

The server also installs a skills layer: behavior files covering reading, writing, curating and migrating memory entries, updatable on their own schedule via npx hmem update-skills. Setup requires pointing HMEM_STORAGE_DIR at a storage path, since that's where the SQLite database lives.

What it helps with

  • pick up a project's context without re-reading the codebase
  • carry memory across Claude, Gemini and other providers
  • keep a record of bugs and decisions that the next session actually sees
  • get a project briefing in one call instead of recapping manually
  • clean up stray or duplicate entries piling up in memory

Example prompts for the agent

  • Load project P0048 and tell me where we left off last session
  • Run the hmem skill update to pull the latest versions
  • Search memory for the rename_id bug we fixed

How to install hmem — Humanlike Memory for AI Agents

Platform CLI

claude mcp add --env HMEM_STORAGE_DIR=<HMEM_STORAGE_DIR> --transport stdio hmem-humanlike-memory-for-ai-agents -- npx -y hmem-mcp

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about hmem — Humanlike Memory for AI Agents

How do I install hmem in Claude Code?

Run claude mcp add hmem-mcp -- npx -y hmem-mcp, or set the storage path explicitly with claude mcp add --env HMEM_STORAGE_DIR=<HMEM_STORAGE_DIR> --transport stdio hmem-humanlike-memory-for-ai-agents -- npx -y hmem-mcp.

What does hmem do?

It stores project knowledge — stack, bugs, decisions, tasks — in SQLite and loads it in tiers of detail so an agent doesn't re-read the codebase every session. The memory carries over between different AI tools and devices.

Is there anything to set up before running hmem?

You need to set the HMEM_STORAGE_DIR environment variable to a storage path, since the server writes its SQLite database there.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor