DEV Community

Hardwick Software
Hardwick Software

Posted on

I got tired of Claude forgetting everything, so I built it a brain

the problem nobody talks about

if you use claude code for real work, you already know the pain. you spend 20 minutes getting claude up to speed on your project, explain the auth flow, walk through the database schema, remind it about that one edge case with the refresh tokens... and then the session ends.

next session? blank slate. do it all again.

CLAUDE.md exists, sure. but maintaining a static text file by hand gets old real fast. and it's keyword search only. good luck finding "that thing we discussed about the payment retry logic" in a 500-line markdown file.

what i built

SpecMem is an MCP server that gives claude code actual persistent memory. not a text file. not a cloud service. a local PostgreSQL database with pgvector embeddings that runs on your machine.

here's what that means in practice:

you say "fix the auth bug" and claude already knows your auth architecture. it remembers the JWT refresh flow. it knows about the bugs you fixed last week. it's got the dependency graph of your codebase loaded. you don't explain anything.

how it works

memories get stored automatically from your conversations. architecture decisions, bug reports, code patterns, whatever comes up. they're tagged by type and importance, and you search them by meaning, not keywords.

codebase indexing scans your project with language-specific extractors. right now it handles TypeScript, JavaScript, Python, Go, Rust, Java, Kotlin, C, C++, HTML, and a few more. it's not just "find this function name" -- it builds a graph of definitions, dependencies, imports, and callers.

multi-agent coordination lets claude spawn agent teams that share memory and communicate through team channels. unlimited swarm channels, persistent across sessions.

the privacy angle

your code never leaves your machine. the embedding server runs locally in a docker container. there's no cloud API, no external calls, no "trust us bro" privacy policy. your PostgreSQL instance, your data.

this matters more than people think. every cloud-based alternative ships your code to someone else's server. even if they promise not to train on it, your proprietary code still lives in their infrastructure.

how it compares

i looked at everything else out there before building this:

  • claude-mem has 4 MCP tools. SpecMem has 74+. they use cloud APIs for embeddings, i run them locally. no codebase indexing on their end.
  • cursor requires you to switch your whole IDE. everything runs through their cloud. no persistent memory between sessions.
  • mem0 does memory but nothing else. cloud API costs on every query.
  • continue is open source which is cool, but it doesn't remember anything between sessions. close the window and it's gone.

the comparison table on the github has the full breakdown.

numbers

i tested it on a codebase with 30,000+ files across multiple languages. full index took under 3 minutes. no rate limits because there's nothing to rate limit when the embedding server runs on your own hardware.

try it

sudo npm i -g specmem-hardwicksoftware
specmem init
Enter fullscreen mode Exit fullscreen mode

linux only for now. needs postgresql and docker. free for devs making under 35k/yr.

github: github.com/jonhardwick-spec/specmem
site: justcalljon.pro/specmem

built by Hardwick Software Services. happy to talk architecture if anyone's curious about the pgvector setup or the embedding pipeline.

Top comments (0)