Skip to main content
Glama
mutheejj
by mutheejj

🧠 agent-memory-server

A self-hosted, git-backed memory layer that any AI agent can plug into.

CI License: MIT Node Sponsor

Sessions · Tasks · Decisions · Full-text search · Zero vendor lock-in


Why

AI agents are stateless by default. Every framework ships its own memory format, every SaaS wants you to pipe your agent's brain through their API, and none of it composes.

agent-memory-server is the boring, durable alternative: a small HTTP + MCP server that stores agent memory as plain files in a git repository. Your agent's history becomes:

  • Readable — it's just markdown and JSON on disk

  • Portable — clone it, back it up, diff it, sync it

  • Yours — no vendor, no API key, no lock-in

  • Searchable — full-text search across everything, out of the box

Related MCP server: mem-universe

Features

Capability

Description

📝 Sessions

Append-only session logs with checkpoints and handoffs between agents

Tasks

Claim/lease/complete task semantics so multiple agents can coordinate safely

🧭 Decisions

Lightweight decision records with context and rationale

🔍 Search

Full-text search across the entire memory store

📦 Git-backed

Every write is a commit — full audit history for free

🔌 MCP-native

Speaks Model Context Protocol so MCP-aware agents plug in directly

🏠 Self-hosted

One binary, one config file, one git repo

Quickstart

git clone https://github.com/mutheejj/agent-memory-server
cd agent-memory-server
npm install && npm run build

# point it at a git repo to use as the memory store
npx agent-memory-server --store ~/my-agent-memory --port 7800

Write a memory:

curl -X POST localhost:7800/sessions \
  -H 'Content-Type: application/json' \
  -d '{"agent": "coder", "summary": "Refactored auth module", "next": "write tests"}'

Search it:

curl 'localhost:7800/search?q=auth+module'

Use with any MCP client

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "agent-memory-server", "--store", "~/my-agent-memory", "--mcp"]
    }
  }
}

Architecture

┌──────────────┐     HTTP / MCP      ┌───────────────────────┐
│  Your agents  │ ──────────────────▶ │  agent-memory-server  │
│ (any framework)│ ◀────────────────── │  (single process)     │
└──────────────┘                      └──────────┬────────────┘
                                                 │ reads/writes
                                                 ▼
                                      ┌───────────────────────┐
                                      │   git repo (store)    │
                                      │  markdown + JSONL     │
                                      │  full history on disk │
                                      └───────────────────────┘

Status

🚧 v0.x — API surface is stabilizing. Core write paths (sessions, tasks, decisions) and search work today. MCP transport is in active development.

Roadmap

  • Session/task/decision stores with git persistence

  • Full-text search

  • MCP stdio + streamable HTTP transports

  • Lease expiry & task reclaim for crashed agents

  • Optional encryption-at-rest for the store

  • Multi-agent namespaces

  • One-line adapters (Python, Go, Rust)

Who is this for

  • Teams running multiple agents that need shared, durable state

  • Developers who want agent history they can read and audit

  • Anyone allergic to shipping their agent's memory through a third-party API

Contributing

PRs welcome — see the roadmap for good first issues. Keep PRs small and focused.

💖 Support

I build tools for the multi-agent era in the open. If this saves you time, consider sponsoring.

MIT © John Muthee

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Git-native long-term memory for AI agents: your markdown files are the source of truth, the search index is a disposable projection rebuilt from git, and every memory the agent writes is a reviewable git commit. Served over one OAuth-secured MCP endpoint with hybrid lexical+semantic recall and a gated, git-first commit_note write tool.
    7
    8
    AGPL 3.0
  • A
    license
    A
    quality
    C
    maintenance
    Self-hosted MCP memory server that gives a multi-agent fleet one shared, git-backed memory for search, read, and write.
    8
    1
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    A self-hosted MCP server that gives AI agents shared, long-term memory over a git-backed folder of markdown, enabling persistent knowledge search, read, and write without a database.
    16
    138 npm
    11
    MIT