Memharness logo

Memharness

Bi-temporal SQLite memory for AI agents with provenance, revision history, audit queries, and seven MCP tools.

Install Memharness

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "memharness": {
      "command": "npx",
      "args": [
        "-y",
        "@memharness/mcp"
      ],
      "env": {
        "MEMHARNESS_DB": "YOUR_VALUE_HERE",
        "MEMHARNESS_HYBRID": "YOUR_VALUE_HERE",
        "XDG_DATA_HOME": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env MEMHARNESS_DB=YOUR_VALUE_HERE --env MEMHARNESS_HYBRID=YOUR_VALUE_HERE --env XDG_DATA_HOME=YOUR_VALUE_HERE --transport stdio memharness -- npx -y @memharness/mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

npx -y @memharness/mcp

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The memharness MCP server gives AI agents a local, bi-temporal memory store backed by one SQLite file. It exposes tools for recording facts, recalling current or past beliefs, revising facts without deleting history, inspecting provenance, comparing changes, forgetting by source, and viewing statistics. The storage layer makes no LLM or network calls, while optional local embeddings add semantic recall. Reach for it when an agent needs durable history, auditability, provenance-based deletion, or corrections that remain explainable.

Use cases

  • Store durable user and project facts across sessions
  • Query what an agent believed at an earlier date
  • Audit why a fact was used in a decision
  • Compare memories learned or revised since a date
  • Forget memories associated with a session or source

Key features

  • Bi-temporal fact storage
  • Provenance and revision chains
  • SQLite-backed local persistence
  • Keyword recall with confidence and recency ranking
  • Optional local hybrid semantic recall
  • Source-scoped forgetting

Tools7

What Memharness lets your agent do. Expand a tool for its parameters.

Verified live~1.7k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 84d

What it can do

From the 7 tools this server returned when we ran it.

Makes network requests · 1Read-only tools · 7
Network at startup3 connections
Files written at startup3
Install scriptsNone
npm provenanceNot published
Package age130 days
Maintainers1

Observed 2026-10-26 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · @memharness/mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars6Stargazers on the source repository.
npm downloads207Package downloads in the last 30 days.
Last commit5mo agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Tools exposed7Callable tools this server registers over MCP.

How Memharness works

What memharness does

The memharness MCP server stores atomic facts for AI agents in SQLite rather than treating memory as an undifferentiated text archive. Each fact can include confidence and provenance, including who supplied it, where it came from, and when it was recorded. The data model separates when a fact was true from when the agent learned it, allowing historical queries about past beliefs.

The memharness MCP server is designed for cases where memory must remain inspectable. Corrections supersede earlier facts and preserve the revision chain. This supports questions such as what the agent believed at a particular time, what changed after a given date, and why a fact is currently trusted. Provenance-based forgetting can remove records by fact ID or source.

How it works

The server uses a local SQLite database and has no background daemon, model dependency, or network requirement in its storage path. The default database is ~/.memharness/memory.db, with the location configurable through MEMHARNESS_DB; Linux installations also honor XDG_DATA_HOME.

Current recall uses SQLite FTS5 keyword search, confidence, and recency ranking. Queries can use an as_of time to reconstruct beliefs as held at an earlier transaction point. A substring fallback handles partial words and typos. Optional hybrid recall adds a local BGE-small embedding model, downloaded once from Hugging Face and then used offline; it is not installed by default.

Setup and configuration

Install and launch the stdio package with npx -y @memharness/mcp. Claude Code can register it with claude mcp add memharness -- npx -y @memharness/mcp. Claude Desktop and Cursor use an MCP configuration containing the npx command and package argument, while Codex uses the equivalent TOML configuration.

The first remember call creates the database. No API key or signup is needed. To enable semantic recall, install @memharness/embed alongside the MCP package and set MEMHARNESS_HYBRID=1. A bundled memharness-context command can also be used from a Claude Code SessionStart hook to inject relevant memories at session start.

Tools and capabilities

The seven MCP tools are:

  • remember records an atomic fact with confidence and provenance.
  • recall returns ranked beliefs, optionally as they existed at a specified time.
  • revise replaces a belief while retaining the earlier version.
  • diff reports facts learned, revised, or retracted since a date.
  • why returns provenance and the fact's revision chain.
  • forget tombstones a fact by ID or removes memories associated with a source.
  • stats reports counts, subjects, and the schema version.

The underlying TypeScript packages also provide a library interface through @memharness/core. The optional @memharness/embed package supplies semantic indexing for hybrid recall.

Limitations and notes

The memharness MCP server does not automatically extract facts from raw conversations. A client, agent, or skill must decide what should be stored and call remember. It is therefore a storage and retrieval layer, not an LLM-based memory ingestion service.

For small, static histories that fit comfortably in a prompt or CLAUDE.md, a simpler file may be more appropriate. Hybrid recall requires an optional model download of roughly 130 MB, and the default keyword mode remains fully offline without that package. The server uses stdio transport as described in the setup instructions.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Memharness

memharness is an MCP server that connects AI agents to a local SQLite memory store. Its main tools remember facts, recall current or historical beliefs, revise facts while preserving history, inspect provenance with why, compare changes with diff, forget by source or ID, and report database statistics.

Install it with `npx -y @memharness/mcp` through your MCP client's server configuration. Claude Code supports `claude mcp add memharness -- npx -y @memharness/mcp`; Claude Desktop, Cursor, and Codex use the corresponding JSON or TOML configuration shown in the README.

Yes, memharness works with Cursor through its MCP configuration file. Add a server entry that runs `npx` with `-y` and `@memharness/mcp`, then restart Cursor so it loads the server.

Yes, `recall` accepts an `as_of` time and uses transaction history to return beliefs held at that point. Revisions do not erase earlier facts, so `as_of`, `why`, and `diff` can explain how memory changed.

No, memharness does not perform automatic fact extraction. The client, agent, or skill decides what is worth remembering and calls `remember`; the storage layer itself makes no LLM or network calls.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMemharness AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/memharness?style=directory)](https://allmcps.com/mcp/memharness)
HTML Embed
<a href="https://allmcps.com/mcp/memharness"><img src="https://allmcps.com/api/badge/memharness?style=directory" alt="Memharness on AllMCPs" /></a>