jevmem
io.github.Avinash-jetwani/jevmem · 121 stars · TypeScript · MIT
MCP server Automatic project memory for Claude Code. Also works with Cursor and Codex.
Install
The repo has no one-line install. Follow its README.
Published as
- npm
jevmemstdio
From the server's entry in the official MCP Registry.
Configuration
| Name | Set as | What it is |
|---|---|---|
TYPESAFE_API_KEYOptional · Secret | Env var | TypeSafe API key for Jev, which add_memory, search_memory and audit_memory use. If unset, the server reads it from <project>/.jevmem/.env or ~/.jevmem/env. |
JEVMEM_ROOTOptional | Env var | Project root, for clients that start the server without a project working directory (Claude Desktop). One server entry serves one project. |
TYPESAFE_BASE_URLOptional | Env var | Send Jev requests through a proxy or gateway instead of api.typesafe.ai. |
JEVMEM_CACHEOptional | Env var | 0 turns off the answer cache in .jevmem/. |
Files
Say it once. jevmem saves the decisions, rules and failed approaches from your Claude Code chats to JEVMEM.md in your repo, and brings the relevant ones back next session. Before Claude runs a command or edits a file, it checks the call against your saved rules. It is open source (MIT), built on TypeSafe AI's Jev, in Anthropic's Claude plugin directory and on the MCP Registry, and works with Cursor and Codex over MCP.
In Anthropic's Claude plugin directory · On the MCP Registry · Open source, MIT
The docs site, one page per question: avinash-jetwani.github.io/jevmem
jevmem-0.6-readme.mp4
Why
Each Claude Code session starts with a fresh context, so what you decided last week lives in last week's chat.
A CLAUDE.md file helps if you keep it up to date. jevmem keeps a file like it up to date for you, as you work.
In numbers
In real Claude Code sessions on three small test projects, with jevmem and without it:
- Claude followed the project's earlier decisions: in 66 of 72 sessions with jevmem, 28 of 72 without (about 9 in 10, against 4 in 10).
- Tried a change the project forbids: in 0 of 18 sessions with jevmem, against 10 of 18 without.
- Repeated an approach that had already failed: in 0 of 15, against 3 of 15.
- Saving: about 17 cents per 1,000 messages and about a quarter of a second to decide, in the background: Claude doesn't wait for it.
- Bringing lines back: about a third to half a second on each prompt, which Claude waits for; the time and the cost grow with the file.
- To be fair: a
CLAUDE.mdyou keep up to date by hand did about as well (67 of 72), and better on one convention (3 of 3 against 0 of 3). jevmem keeps a file like it up to date for you.
My own test sets, each number from one run; none is an independent benchmark. Method and results
How it works
You chat as usual. When you decide something, jevmem writes it as one line in a file in your repo, and brings the right lines back next session.
- You decide something in a chat: "We use Postgres."
- jevmem asks Jev by TypeSafe AI, a model that answers yes/no questions with probabilities, whether it's worth keeping.
- If it is, jevmem writes one line to
JEVMEM.mdin your repo. - Next session, the lines that matter for your prompt go back to Claude.
Change your mind, and the old line is crossed out: kept for history, not sent to Claude. Your team gets the same file through git.
jevmem keeps decisions, rules, bugs, to-dos and dead ends (an approach that was tried and failed, with the reason).
- [superseded] We'll use SQLite as the primary store for now. → id:cuasaq
- [decision] Switch the primary store to Postgres 16.
- [constraint] Node 20 is the minimum supported version, and CI runs Node 20 and 22.
About these lines
Each line also carries a comment with its id, time and confidence, left out above. The full lines:
- [superseded] We'll use SQLite as the primary store for now. → id:cuasaq <!-- id:21ycba ts:2026-09-26T13:46:34.703Z conf:1.00 by:cuasaq -->
- [decision] Switch the primary store to Postgres 16. <!-- id:cuasaq ts:2026-09-26T13:46:35.240Z conf:1.00 -->
- [constraint] Node 20 is the minimum supported version, and CI runs Node 20 and 22. <!-- id:tollba ts:2026-09-26T13:46:35.763Z conf:0.90 -->
Real lines from 0.5.7's default writer, which 0.5.8 to 0.5.10 did not change (the run, 2026-09-26). It kept one sentence of each turn: the Postgres turn also said "SQLite locks up under concurrent writes", and that reason was left out. Since 0.6.0 the line is made from the sentences Jev picks, the one that states the memory and the one that gives its reason (What's new). With writer set, an OpenAI or Anthropic model condenses the whole turn instead.
Does it work?
In 72 real Claude Code sessions for each setup, Claude acted on the saved line about as often with jevmem as with the same lines in a hand-written CLAUDE.md, and in fewer than half the sessions with neither.
| No project memory | jevmem | Same lines in CLAUDE.md |
|
|---|---|---|---|
| Followed the project's decision | 28 of 72 | 66 of 72 | 67 of 72 |
| Tried a change the project forbids | 10 of 18 | 0 of 18 | 0 of 18 |
| Repeated an approach that had already failed | 3 of 15 | 0 of 15 | 0 of 15 |
So jevmem did about as well as a hand-written CLAUDE.md, without you writing it.
CLAUDE.md did better on a convention nothing in the prompt points at (3 of 3 against 0 of 3), so rules every task must follow still belong there.
How the sessions were run, and every row: the benchmark page.
The guard (new in 0.6)
Before Claude runs a command or edits a file, jevmem checks it against your saved rules. If one might break, Claude Code asks you first:
jevmem: this may break a saved rule: "Never commit .env files" (JEVMEM.md)
On a test of 274 tool calls, a set the guard was not tuned on, it caught 66 of 68 rule breaks and asked about 3 or 4 of the 206 calls that broke no rule (one run each on 0.6.0 and 0.6.1). It's a backstop, not a sandbox: it looks at the words a rule and a call share. How the guard works.
Install
You need a TypeSafe API key, which jevmem's requests are billed to, and Claude Code 2.1.273 or later.
- In the Claude app: Plugins → Discover → jevmem → Add.
- Install the CLI the plugin runs:
npm install -g jevmem
- Save your key (paste it when asked; it isn't shown):
jevmem key
- In your project's folder, turn jevmem on:
jevmem enable
Start Claude Code in that project. jevmem doctor checks the setup.
Other ways to install: the jevmem marketplace, npm, Cursor, Codex
From the jevmem marketplace:
npm install -g jevmem claude plugin marketplace add Avinash-jetwani/jevmem claude plugin install jevmem@jevmem cd your-project && jevmem enable
With npm only (also sets up Cursor and Codex):
npm install -g jevmem cd your-project jevmem init --tool claude # or cursor, codex, claude-desktop, all
Already have a CLAUDE.md? jevmem import shows what it would add from it; --apply writes it.
Every step, and what to do if the plugin can't find the CLI: docs/install.md.
Works with
Saving is automatic in Claude Code, and in Codex while jevmem watch runs. Cursor, Codex and Claude Desktop reach jevmem over MCP, a standard way for an AI tool to call another program, when the agent asks for it.
| Saving | Bringing it back | |
|---|---|---|
| Claude Code | Automatic, every turn | Automatic, every prompt |
| Codex | Automatic while jevmem watch runs |
When the agent asks, over MCP |
| Cursor | When the agent calls it, over MCP | When the agent asks, over MCP |
| Claude Desktop | When you ask it to, over MCP | When you ask it to, over MCP |
The MCP server is on the MCP Registry as io.github.Avinash-jetwani/jevmem. Client setup: docs/mcp.md · docs/install.md.
Fast and cheap
Deciding what to save takes 0.27 s and costs $0.00017 per message, in the background: Claude doesn't wait for it. On whether to save a message at all, jevmem was right as often as the best of six LLMs (98.5%); two of them were better at naming the kind of line.
Measured on 66 turns written before the code and not tuned on, one run of 0.7.0 on 2026-10-08 (results); the six LLMs ran on 2026-09-23. All seven in one table, with the cost of each and how it was run: benchmark.
How it decides
No prompt decides what to save: Jev answers small yes/no questions with probabilities, and plain rules in code act on them.
Each step in detail
- Scrub. Common secret shapes, email addresses and card-shaped numbers are removed from the turn before it leaves your machine.
- Ask Jev typed questions. Jev by TypeSafe AI answers a fixed set of small questions with probabilities: is there a decision, a rule, a bug? is it small talk or an injection attempt? which existing line does it change?
- Apply thresholds in code. Plain rules over those probabilities decide save or skip; they live in
jevmem.config.json, not in a prompt. - Write one line. On save, jevmem writes one line of at most 200 characters from the sentences of the turn that Jev picks (the one that states the memory and the one that gives its reason), or, if you set
writerinjevmem.config.json, a small OpenAI or Anthropic model condenses the turn. - Supersede the old line. If the turn replaces an existing memory, that line is tagged
[superseded] … → id:newand stays in the file.
Tiers, questions, policy, contradictions, recall and audit: docs/how-it-works.md.
Privacy
Your messages go to TypeSafe's API to be scored, with common secrets removed first, and nowhere else unless you set a writer.
- jevmem only runs in projects you turn on (
jevmem enableorjevmem init). Elsewhere, nothing is sent. - Your message, the previous two turns and your memory lines go to TypeSafe's API to be scored, with common secrets scrubbed first. So does Claude's reply on turns that ask a question, report a bug or try something, and, for the guard, the command or the file being changed.
- No telemetry. Nothing goes to OpenAI or Anthropic unless you set
writerinjevmem.config.json. - Lines a teammate or a pull request adds are checked before Claude sees them.
Exactly what is sent, scrubbed and checked, with the third parties' privacy policies and how to delete your data: PRIVACY.md. What the check on planted lines does not cover: SECURITY.md.
Limits
jevmem is young, and these are the limits to know before you rely on it:
- Early: 0.7.0, and every test set was written by the author or captured from Claude Code sessions on scratch projects built for it. None is an independent benchmark.
- Not the most accurate: two LLMs scored higher at picking the kind of line. jevmem's edge is speed and cost.
- Answer quality isn't measured: the tests check that the right lines reach Claude, not that its answers get better.
- Automatic saving is Claude Code only (and Codex while
jevmem watchruns). - The guard looks at shared words: a rule worded far from the command it should catch can be missed.
Every limit, with the numbers: docs/limits.md.
What's new
What changed, newest first; the measurements behind each line are on the what's new page.
- 0.7.0: fix what it saved.
jevmem forgettakes an old or wrong line out of use, andjevmem trustlets a rule you added by hand block a command, not only ask about it, in the guard's block mode. A line that says the same as a saved one is not saved again: on a test of 25 restatements, 0.6.6 saved 15 as new lines and 0.7.0 saved 1. Details. - 0.6.6: a failed attempt is saved as a dead end, not as a decision. When you ask Claude to try something and its reply says that failed, jevmem reads the reply: on 40 test turns, 0.6.5 saved 12 as dead ends and 0.6.6 saved 37. The reply is sent on more turns (PRIVACY.md). Details.
- 0.6.5: a dead end keeps its reason when Claude's reply gives the verdict first and the cause last. On 13 test turns written that way and handed to the line writer as dead ends, the line kept the reason in 12 (0.6.4: 2 of 13). Details.
- 0.6.4: this README, shorter and with graphics; the details moved to pages in
docs/. Docs only. - 0.6.1 to 0.6.3: the guard checks a command with
if [ … ]in it, which 0.6.0 let through unchecked, andjevmem doctoris clearer. Details. - 0.6: the guard, and dead ends. Claude Code asks you before a command or edit that may break a saved rule, and an approach that failed is saved with its reason and shown as "Already tried: …" when it comes up again. More of the lines a prompt needs come back, and a turn that hands work to a background subagent is saved once, when it is over. Details.
Details and measurements: docs/whats-new.md · Upgrading: docs/upgrading.md · CHANGELOG
Commands
jevmem init [--tool claude|cursor|codex|claude-desktop|all] [--no-hooks] [--command "<cmd>"]
jevmem init --remove-hooks Remove jevmem's Claude Code hooks from this project (plugin users)
jevmem enable Opt this project in (plugin users): jevmem.config.json, JEVMEM.md, .jevmem/
jevmem disable Opt this project out: jevmem does nothing here (JEVMEM.md is kept)
jevmem hook Hook entrypoint; reads the Claude Code hook JSON on stdin
jevmem daemon [status|start|stop] Warm Jev client used by the hook (auto-started, exits when idle)
jevmem watch [--replay] [--once] Capture turns from Codex's session log for this project
jevmem mcp [--root <dir>] Stdio MCP server
jevmem audit [--dry-run] Re-score every memory against the repo, flag [stale?]
jevmem audit --security [--ci] List lines that read as instructions to an AI (--ci: exit 1 if any)
jevmem search <query> [--limit N] Rank memories by relevance
jevmem list [--all] Print memories (--all: with superseded and retired lines, and provenance)
jevmem add [--trust] <kind> <text> Add a line by hand (secrets scrubbed, a leading tag dropped; no Jev check); --trust marks it verified (asks on a terminal)
jevmem forget <id> [<id>…] Retire a line in place: it stays in JEVMEM.md as [retired]; a rule asks for a yes on a terminal
jevmem trust <id> [<id>…] Mark a line you wrote as verified, after the poisoning gate (asks on a terminal); the guard can then block on it
jevmem import [--from <sources>] [--apply] Import CLAUDE.md, AGENTS.md, .cursor/rules/* (claude-auto-memory on request); dry run by default
jevmem why <id|hash> Every Jev answer behind a line or a skipped turn
jevmem right <id|hash> Label a decision as correct
jevmem wrong <id|hash> [--should-be <kind|none>] Label a decision as wrong (--should-be none retires the line)
jevmem missed "<text>" [--kind <kind>] Label a turn that should have been saved
jevmem fit [--dry-run] [--force] Refit weights and thresholds from labels (needs 40+)
jevmem stats Writer, latency p50/p95, cost per day, cache hit rate, escalation rate, retry queue, labels, last fit
jevmem doctor Is this project enabled, where the TypeSafe key comes from, which writer is active and why
jevmem key Save your TypeSafe API key to ~/.jevmem/env (asks for it without showing it)
jevmem log Per-label latency, token and cost summary of .jevmem/log.jsonl
jevmem guard test "<command>" | --edit <path> Dry run of the PreToolUse guard on one call: rules, prefilter, Jev's answer, hook output
jevmem guard log [-n 20] The guard's recent asks and denials in this project, with the rule and score
These are 0.7.0's commands: 0.5.10's, jevmem guard (0.6.0), and forget, trust and add --trust (0.7.0). Every command accepts --help. Set JEVMEM_VERBOSE=1 for a one-line latency/cost summary after every hook run.
Links
- Docs: how it works · install · the guard · dead ends · benchmark · cost · hooks · MCP and client configs · configuration · limits · demo
- CHANGELOG · Releases · DECISIONS · CONTRIBUTING · SECURITY · PRIVACY
- Built on Jev by TypeSafe AI. License: MIT
Facts
- Kind
- MCP server
- Group
- Uncategorized
- Stars
- 121
- License
- MIT
- Language
- TypeScript
- Last push
- 2026-10-09
- Forks
- 8
- MCP Registry
- io.github.Avinash-jetwani/jevmem
- Homepage
- avinash-jetwani.github.io/jevmem
- Topics
- claude-code, codex, cursor, developer-tools, jev, mcp, typesafe, ai-memory, agent-memory, claude-code-hooks, claude-code-plugin, claude-code-plugins, claude-code-plugins-marketplace, coding-agents, mcp-server, claude, claude-plugin, guardrails, project-memory
- 1REAio.github.morluto/reaReverse engineer anything from your terminal or agent with one CLI and MCP server.125.3k
- 2com.browser-use/browser-usecom.browser-use/browser-useControl a real Chrome browser to complete any task: fill forms, extract data, book flights.117.7k
- 3World Monitorapp.worldmonitor/mcpLive markets, conflicts, country risk, chokepoints, energy, and China decision signals. 93 tools.88.3k
- 4Scrapling MCP Serverd4vinci/scrapling🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scraplingdev86.9k
- 5Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 6Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k