Mneme — Claude Code MCP server: agent memory and guardrails
A local layer between your agent and your code: it screens actions, keeps secrets out of the model, carries memory across sessions and meters saved tokens.
claude mcp add mneme-ai -- npx -y mneme-aiWhat Mneme does
Mneme runs as an MCP server on top of your git history and source tree. The agent asks it for context and gets back only what passed screening — secrets and destructive commands are stopped at the boundary, not after the model has already read them. Memory is signed and travels between assistants, so what one agent learned the next one inherits.
There are over 900 tools inside, and you never have to browse them: the agent searches by task description in English or Thai. Output gets checked too — a trust certificate is refused when a known fault is present. Public claims in the project are bound to probes, and the build fails if one drifts.
Worth setting up if you let an agent loose in a real repository and want a record of what it did. It launches through npx -y mneme-ai, so Node.js and npm have to be on your PATH; without them the server will not start. MIT licensed, with parts built to work without network access.
What it helps with
- keep repository secrets out of the model context
- carry agent memory across sessions and between assistants
- catch a fabricated answer before it reaches the code
- grade an agent's safety surface and find privilege-escalation paths
- cut token spend on reading large files
Example prompts for the agent
- Ask Mneme for a tool that maps file structure and show me the skeleton of
src/server.ts - Have Mneme check whether secrets leaked into this session's context
- Save to Mneme memory that the project builds with
pnpm build
How to install Mneme
Platform CLI
claude mcp add mneme-ai -- npx -y mneme-aiPlatform CLI
codex mcp add mneme -- npx -y mneme-aiConfig file
{
"mcpServers": {
"mneme": {
"command": "npx",
"args": [
"-y",
"mneme-ai"
]
}
}
}Config file
{
"servers": {
"mneme": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mneme-ai"
]
}
}
}Platform CLI
gemini mcp add mneme npx -y mneme-aiStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Mneme
How do I install Mneme in Claude Code?
Run claude mcp add mneme-ai -- npx -y mneme-ai. That registers the server in your MCP configuration and starts it through npx.
What does Mneme do?
It sits locally between your agent and your code: screening actions before they run, keeping secrets away from the model, storing signed memory across sessions and tracking the tokens it saves.
How is Mneme different from plain agent memory?
The memory is signed and lives in git, so the next agent inherits it while poisoned entries get filtered out. Every step also lands in a log you can verify offline.