AXME Code
Claude Code forgets your project every session. We fixed it.
AXME Code is a Claude Code plugin that gives your AI coding agent persistent memory across sessions, pre-execution safety hooks, architectural decision enforcement, and structured session handoff โ via an MCP server, automatically, across every session.
Stop re-explaining your architecture on session 47. Stop losing memory between session handoffs. Stop hoping the agent won't run git push --force to main. AXME Code remembers what happened, enforces your architectural decisions, continues where the last session stopped, and blocks dangerous commands before they execute โ so you can focus on building.
You keep using Claude Code exactly as before. AXME Code works transparently in the background.

โญ Star this repo if it saves you time ยท ๐ Watch releases for new features ยท ๐ฌ Discussions
Quick Start ยท Before & After ยท How It Works ยท Architecture ยท Website
Before & After
Session 1: "We use FastAPI, not Flask. Deploy only via GitHub Actions. Never push to main directly."
Session 2: "Like I said yesterday, we use FastAPI..."
Session 7: "For the third time this week, we use FastAPI..."
Session 47: gives up, mass-pastes 200 lines into CLAUDE.md
Session 1: Agent learns your stack, saves decisions.
Session 2: Agent calls axme_context โ already knows FastAPI, deploy rules, what happened yesterday.
Session 47: Agent has your full project history: 30 decisions, 15 memories, safety rules, and a handoff from session 46.
Agent runs git push --force to main. Your Friday is ruined.
Hook intercepts the command before execution and blocks it. Not a prompt โ hard enforcement at the harness level.
Agent says "Done!" โ but tests don't pass, half the code is stubbed, and the deploy is broken.
Decisions enforce verification requirements: agent must run tests and show proof before reporting completion.
Quick Start
AXME Code supports three IDE paths today, ranked by lowest install friction:
Option 0: Cursor extension (1-click install โ recommended for Cursor users)
For Cursor 0.42+ users โ install the AXME Code extension from the Extensions panel (Open VSX). The extension bundles the binary, registers the MCP server programmatically (no manual Enable click), installs user-level safety hooks at ~/.cursor/hooks.json (apply to every project on your machine), and offers a one-click "Run setup" notification the first time you open a project without .axme-code/.
Cursor โ Extensions โ search "AXME Code" โ Install
Or sideload the .vsix attached to the latest release (Extensions โ ... menu โ "Install from VSIX...").
On first activation a modal asks for an LLM credential for the session auditor: paste an Anthropic API key, a Cursor SDK key (cursor.com โ Integrations), or skip the auditor. If claude CLI is logged in (claude login), the extension auto-uses your Claude subscription โ no paste needed.
Option 1: Claude Code plugin (recommended for Claude Code users)
In Claude Code, run:
/plugin marketplace add anthropics/claude-plugins-community
/plugin install axme-code@claude-community
Or from the terminal:
claude plugin marketplace add anthropics/claude-plugins-community
claude plugin install axme-code@claude-community
The plugin ships with the MCP server, safety hooks, and CLI bundled together; no separate binary to install. On first use in a project, just ask the agent to call axme_context โ the plugin auto-initializes the knowledge base on that session.
Option 2: Standalone binary
Install the CLI system-wide (useful if you want to run axme-code outside Claude Code, e.g. for scripting).
Linux / macOS:
curl -fsSL https://raw.githubusercontent.com/AxmeAI/axme-code/main/install.sh | bash
Installs to ~/.local/bin/axme-code. Requires Node.js 20+ on PATH (the binary is a single-file Node bundle; the installer checks for it). Supports x64 and ARM64.
Windows (native):
irm https://raw.githubusercontent.com/AxmeAI/axme-code/main/install.ps1 | iex
Installs to %LOCALAPPDATA%\Programs\axme-code and adds it to your User PATH. Requires Node.js 20+ on PATH. Supports x64 and ARM64.
Windows via WSL2: if you already live in WSL2, use the Linux install one-liner inside your distro. Install Claude Code and axme-code inside the WSL distro, not on the Windows host.
Then in each project:
cd your-project # or workspace root for multi-repo
axme-code setup
claude # that's it โ use Claude Code as usual
axme-code setup does three things:
- Scans your project and builds the knowledge base โ oracle (stack, structure, patterns, glossary), extracts decisions, memories, and safety rules from your code, configs, CLAUDE.md, and session history
- Installs safety hooks that intercept dangerous commands before execution
- Configures the MCP server in Claude Code settings (
.mcp.json)
After setup, every Claude Code session automatically loads the full knowledge base. No config, no manual steps.
What You Get
Persistent Knowledge Base
Your agent starts every session with full context: stack, decisions, patterns, glossary, and a handoff from the previous session. No more re-explaining your architecture on session 47.
| Category | What it stores | Example |
|---|
| Oracle | Project structure, tech stack, coding patterns, glossary | "TypeScript 5.9, Node 20, ESM, esbuild" |
| Decisions | Architectural decisions with enforcement levels | "All deploys via CI/CD only" [required] |
| Memory | Feedback from mistakes, validated patterns | "Never use sync HTTP in async handlers" |
| Safety | Protected branches, denied commands, filesystem restrictions | git push --force โ BLOCKED |
| Backlog | Persistent cross-session task tracking | "B-003: migrate auth to OAuth2 [in-progress]" |
| Handoff | Where work stopped, blockers, next steps | "PR #17 open, waiting on review. Next: fix flaky test." |
| Worklog | Session history and events | Timeline of all sessions and what was done |
Safety Guardrails (100% Reliable)
Hooks intercept tool calls before execution โ not prompts. Even if the agent hallucinates a reason to run rm -rf /, the hook blocks it. This is hard enforcement at the Claude Code harness level, not a suggestion in a system prompt.
Blocked by default:
git push --force, git reset --hard, direct push to main/master
rm -rf /, chmod 777, curl | sh
npm publish, git tag, gh release create
- Writing to
.env, .pem, .key files
You can add your own custom rules via axme_update_safety or by editing .axme-code/safety/rules.yaml directly.
Automatic Knowledge Extraction
The agent saves discoveries during work via MCP tools. At session close, a structured checklist ensures nothing is missed. If you just close the window โ a background auditor extracts memories, decisions, and safety rules from the full session transcript.
Multi-Repo Workspaces
Each repo gets its own knowledge base (.axme-code/). Workspace-level rules apply to all repos. Repo-specific rules stay scoped. The agent sees merged context โ workspace safety floor + repo-specific decisions.
Supports 14 workspace formats: VS Code multi-root, pnpm/npm/yarn workspaces, Nx, Gradle, Maven, Rush, git submodules, and more.
Why Not Just CLAUDE.md?
CLAUDE.md is great for simple projects with a few rules. But it doesn't scale:
| CLAUDE.md | AXME Code |
|---|
| Memory | Static, manual | Automatic, accumulates across sessions |
| Decisions | Flat text, no enforcement | Structured, required/advisory levels |
| Safety | Prompt-based (~80% compliance) | Hook-based (100% enforcement) |
| Session continuity | None | Handoff + background auditor |
| Scales to | ~50 lines | Hundreds of decisions, memories, rules |
AXME Code complements CLAUDE.md โ it reads your existing CLAUDE.md during setup and extracts decisions and rules from it.
Works With Any MCP Client
AXME Code is a stdio MCP server โ every MCP-compatible AI coding assistant gets the full set of axme_* tools (knowledge base read/write, safety queries, status, worklog).
| Client | MCP Tools | Safety Hooks | Auto Auditor |
|---|
| Claude Code (CLI / VS Code) | โ
Full | โ
Full | โ
Yes |
| Cursor | โ
Full | โ | โ |
| Windsurf | โ
Full | โ | โ |
| Cline (VS Code) | โ
Full | โ | โ |
| Claude Desktop | โ
Full | โ | โ |
| Any other MCP client | โ
Full | โ | โ |
The MCP server entry is identical in every client:
{
"mcpServers": {
"axme": {
"command": "axme-code",
"args": ["serve"]
}
}
}
Just place it in your client's MCP config file:
- Cursor:
~/.cursor/mcp.json or .cursor/mcp.json (per-project)
- Windsurf:
~/.codeium/windsurf/mcp_config.json
- Cline: VS Code Settings โ Cline MCP โ
cline_mcp_settings.json
- Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or equivalent
Pre-execution safety hooks, the post-tool-use file tracker, and the background session auditor are Claude Code-specific (they require Claude Code's hook system). In other clients, the agent must call AXME tools explicitly โ same knowledge base, same .axme-code/ storage, just no automatic enforcement layer.
See docs/MULTI_CLIENT.md for full per-client setup, hook workarounds, and concurrent-client semantics.
Comparison
| AXME Code | MemPalace | Mastra | Zep | Mem0 | Supermemory |
|---|
| Capabilities | | | | | | |
| Structured decisions w/ enforce levels | โ
| โ | โ | โ | โ | โ |
| Pre-execution safety hooks | โ
| โ | โ ๏ธ | โ | โ | โ |
| Structured session handoff | โ
| โ | โ | โ | โ ๏ธ | โ |
| Automatic knowledge extraction | โ
| โ | โ
| โ
| โ
| โ
|
| Project oracle (codebase map) | โ
| โ | โ | โ | โ | โ |
| Multi-repo workspace | โ
| โ | โ | โ | โ | โ |
| Local-only storage | โ
| โ
| โ
| โ | โ | โ |
| Semantic memory search | โ
| โ
| โ
| โ
| โ
| โ
|
| Multi-client support | โ
| โ
| โ
| โ
| โ
| โ
|
| Capabilities total | 9/9 | 3/9 | 4/9 | 3/9 | 3/9 | 3/9 |
| Benchmarks | | | | | | |
| ToolEmu safety (accuracy) | 100.00% | โ | โ | โ | โ | โ |
| ToolEmu safety (FPR) | 0.00% | โ | โ | โ | โ | โ |
| LongMemEval E2E | 89.20% | โ | 84.23% / 94.87% | 71.20% | 49.00% | 85.40% |
| LongMemEval R@5 | 97.80% | 96.60% | โ | โ | โ | โ |
| LongMemEval tokens/correct | ~10K โ | โ | ~105Kโ119K | ~70K | ~31K | ~29K |
Token efficiency