I gave my AI coding agents persistent memory via MCP — here's what actually happened
My agents forget everything between sessions — decisions, bug root causes, "why we didn't use MongoDB". All gone when the context window resets. So I tried Memexa, a persistent memory layer for coding agents exposed
My agents forget everything between sessions — decisions, bug root causes, "why we didn't use MongoDB". All gone when the context
window resets.
So I tried Memexa, a persistent memory layer for coding agents exposed as an MCP server.
## Setup: one command
\bash
cd my-project
npx -y memexa-mcp init
\\
Wizard detects your agents (Claude Code, Cursor, Devin, Codex, Gemini…), asks for an API key once, stores it privately. Config
s contain zero secrets — committable to git, teammates get the same setup by cloning.
It also writes usage rules into AGENTS.md/CLAUDE.md so agents call get_context, add_decision, log_bug without being as
ked.
## It broke on me (instructively)
First update_context → 500, retried 4×. Logs showed invalid input value for enum snapshottype: "SESSION" — a Postgres enum c
reated by an old migration never got the new label because a later migration skipped when the column already existed.
ALTER TYPE … ADD VALUE ×4 → fixed in ~30 min. First snapshot written right after.
## What's actually good
-
add_decisionstores the why + rejected alternatives — the stuff diffs don't capture -
log_bugwith root cause → same bug never diagnosed twice - pgvector
search_memoryfinds entries even with different wording - One key → configs for every agent you use
## Honest limits
- Prompt-driven: agents can ignore it. Works with Claude Code/Cursor/Devin; tiny local models won't bother
- Free tier = 2 projects
- Rough edges expected — it's new (I found one in the first hour)
## Verdict
Context now survives sessions. get_context at startup gives agents real project awareness instead of a blank slate.
\bash
npx -y memexa-mcp # key at app.memexa.tech, free tier
\\
Hands-on tryout, not a paid review.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.