DEV Community

Cover image for I got tired of Claude Code forgetting everything. So I built Glutamate.
Dmitry
Dmitry

Posted on

I got tired of Claude Code forgetting everything. So I built Glutamate.

Every session with Claude Code starts the same way.

You open a new terminal. You type your first message. And then you spend the next 10 minutes re-explaining what you were doing yesterday, why a certain function works the way it does, and which bugs you've already fixed.

The agent isn't dumb. It just has amnesia. Every. Single. Session.

I tried prompting my way out of it. CLAUDE.md files, detailed system prompts, elaborate context dumps at the start of each session. It helped, but it didn't scale. So I built Glutamate - an MCP toolkit that hooks into Claude Code's lifecycle and gives the agent persistent, structured memory across sessions.


What it does

Failure Memory

When the agent debugs a bug and finds the fix, Glutamate logs it. Next session, same bug - instant recall.

"This took 3 hours last time. Now 30 seconds."

Agents have a habit of re-introducing the same bugs and re-discovering the same fixes. Failure Memory breaks that loop.

Code Intelligence

Glutamate runs a local stdio MCP server that uses tree-sitter to give the agent structural code understanding across 8 languages.

Instead of reading 2000 lines of a file to find one function, the agent reads 20 lines of exactly the right symbol.

The compound effect matters: an agent reads code dozens of times per session. Each read is 20 lines instead of 2000. By the end of a long session, context isn't polluted and quality doesn't degrade.

Parallel Session Awareness

Running multiple Claude Code windows on the same project? They see each other and coordinate. No other tool solves this - existing memory systems work with one agent's memory, Glutamate coordinates between agents.

Decision Archaeology

Pass a commit hash, get every task doc written during that session. Full history of why the code looks the way it does, tied directly to git. Three months later, you won't ask "why did we do this?" - you'll know.

Post-commit Stale Detection

After every git commit, Glutamate finds docs that reference the files you just changed and flags them as stale. The agent gets a nudge: regenerate these while the context is still fresh. Documentation doesn't silently rot.

LiveDocs Task Tracking

Real-time visibility into what the agent is doing - what's open, what's done, what's next.


How it works under the hood

Two MCP servers run side by side:

Remote HTTP server (Docker) - owns the database. Handles livedocs, knowledge base, rules, failure memory, analytics, sessions, patterns. Passes project_root on each tool call, so one server handles multiple projects. New projects auto-register on first call.

Local stdio server - stateless tree-sitter tools. No database, just structural code analysis. Runs on the host machine, configured in .mcp.json.

Three Claude Code hooks wire everything together:

  • UserPromptSubmit - before every prompt, runs hybrid FTS5 + vector search across KB and task history, injects relevant context automatically
  • PostToolUse (git commit) - finds docs that went stale and tells the agent to regenerate them while the knowledge is fresh
  • SessionStart - loads rules, past failures, and the project boundary map so the agent starts oriented

The intent classifier (local Ollama model) tags each prompt as feature, debug, refactor, or question and loads different context profiles accordingly. A debug prompt loads failure memory. A feature prompt loads patterns and module docs.


Why "Glutamate"

Glutamate is an amino acid that acts as a neurotransmitter in your brain. Its job is to pass signals between neurons. Without it, memory doesn't form, connections don't build.

Same idea here, except for your AI dev.


What's not built yet

  • pip install glutamate-mcp onboarding (currently requires manual Docker setup)
  • Multi-tenant hosted version (currently single-user, self-hosted)

Running a closed beta now. Landing page and demo video: beta.glutamate.pro

Happy to answer questions about the architecture, the hook system, or anything else.

Top comments (0)