# Mem

> Session memory for Claude Code — teaches Claude to maintain MEMORY.md, injects it at every session start

- **Type:** MCP server
- **Install:** `agentstack add mcp-hugolopes45-mem`
- **Verified:** Pending review
- **Seller:** [HugoLopes45](https://agentstack.voostack.com/s/hugolopes45)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [HugoLopes45](https://github.com/HugoLopes45)
- **Source:** https://github.com/HugoLopes45/mem

## Install

```sh
agentstack add mcp-hugolopes45-mem
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# mem — session memory for Claude Code

[](https://github.com/HugoLopes45/mem/actions/workflows/ci.yml)
[](https://crates.io/crates/mem)
[](LICENSE)

Claude forgets everything between sessions. `mem` fixes that in two steps:

1. **Teaches Claude to maintain `MEMORY.md`** — adds a rule to `~/.claude/CLAUDE.md` so Claude updates the file at the end of every session with decisions, rejections, and patterns.
2. **Injects `MEMORY.md` at session start** — wires a `SessionStart` hook so Claude opens every session with full project context already in mind.

```bash
curl -fsSL https://raw.githubusercontent.com/HugoLopes45/mem/main/install.sh | bash
```

That's it. One command, zero manual config.

---

## How it works

```
mem init
  → adds rule to ~/.claude/CLAUDE.md   (Claude writes MEMORY.md at session end)
  → wires SessionStart hook             (MEMORY.md injected at session start)

Every session:
  start  → mem session-start injects MEMORY.md into Claude's context
  end    → Claude updates MEMORY.md per the rule (decisions, rejections, patterns)
```

The file lives at your project root. Claude reads it, Claude maintains it.

---

## Commands

```bash
mem init              # setup: wire hook + add rule to CLAUDE.md
mem status            # verify: hook installed? rule present? files indexed?
mem index             # index all MEMORY.md files for search
mem search     # search across all indexed MEMORY.md files
```

---

## What goes in MEMORY.md

Claude writes this automatically. Example after a few sessions:

```markdown
# myproject

- Auth: JWT, not sessions — mobile client needs stateless (2026-02-18)
- Tried Prisma, switched to raw SQL — too much magic for this schema
- Don't use `any` — Biome enforces strict types, CI will fail
- Payment webhooks must be idempotent — Stripe retries on timeout
- DB migrations: always add column nullable first, backfill, then add constraint
```

Decisions, rejections, patterns. Things Claude would otherwise ask about again.

---

## Install

```bash
curl -fsSL https://raw.githubusercontent.com/HugoLopes45/mem/main/install.sh | bash
```

From source

```bash
cargo install --git https://github.com/HugoLopes45/mem --locked
mem init
```

Requires Rust 1.75+.

---

## Verify

```bash
mem status
```

```
Binary    : /Users/you/.cargo/bin/mem
Hook      : installed
Rule      : installed
Indexed   : 3 MEMORY.md file(s)
```

---

## Search across projects

```bash
mem index                    # index all MEMORY.md files
mem search "jwt"             # find decisions across all projects
mem search "rejected"        # find things you decided not to do
```

---

## License

MIT — see [LICENSE](LICENSE).

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [HugoLopes45](https://github.com/HugoLopes45)
- **Source:** [HugoLopes45/mem](https://github.com/HugoLopes45/mem)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: flagged — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-hugolopes45-mem
- Seller: https://agentstack.voostack.com/s/hugolopes45
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
