INTEGRATION
Give Cursor persistent project memory with AXME Code
Connect the axme-code MCP server in Cursor — reload oracle, decisions, memories, safety rules, and handoff at every session start.
AXME Code for Cursor is an MCP integration that adds a local .axme-code knowledge base — oracle, decisions, memories, safety rules, backlog, and session handoff — so Cursor agents resume context instead of starting from zero.
Cursor agents start every chat without durable memory. Teams paste the same stack rules, conventions, and open tasks into project rules — and still lose decisions, incidents, and handoffs when the window closes.
AXME Code is a stdio MCP server — axme-code serve — with nineteen axme_* tools.
All knowledge lives in .axme-code/ at the repo root: human-readable Markdown and YAML, no external database.
Cursor gets full MCP tools; hook-based blocking is Claude Code–only — plan explicit close rituals in Cursor.
What AXME Code adds to Cursor
Persistent structured memory, architectural decisions with enforcement levels, safety rules, backlog, and session handoff — loaded via axme_context at session start instead of a 200-line rules paste.
AXME Code is implemented as a Model Context Protocol server plus a CLI (axme-code). In Cursor you connect that server through MCP configuration; the agent calls tools such as axme_context, axme_save_memory, and axme_finalize_close rather than editing .axme-code/ files by hand for routine updates.
After axme-code setup in a repository, the scan seeds oracle (stack, structure, patterns, glossary), applies safety presets, and writes MCP config. Multiple Cursor users on the same repo share one .axme-code/ directory — writes use atomic updates and an append-only worklog.
Step 1 — Install axme-code
# macOS / Linux (standalone installer) curl -fsSL https://raw.githubusercontent.com/AxmeAI/axme-code/main/install.sh | bash # Or clone and link locally # git clone https://github.com/AxmeAI/axme-code cd your-repo axme-code setup
Step 2 — Add MCP server to Cursor
// .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
"mcpServers": {
"axme": {
"command": "axme-code",
"args": ["serve"]
}
}
}
// Restart Cursor after saving.Step 3 — Require axme_context at session start
# In .cursor/rules or your project rules file:
# At the start of every session, call axme_context with this repo's absolute path.
# Example tool call (agent-initiated):
# axme_context({ "path": "/Users/you/projects/my-app" })KNOWLEDGE BASE
Seven modules under .axme-code/
Each answers what to store and why it should not live only in chat scrollback.
Oracle
Stack, repo layout, patterns, glossary — stop re-guessing folders every session.
Learn more →Decisions
ADR-style records with required vs advisory enforcement.
Learn more →Memory
Patterns that worked and feedback from incidents — durable lessons.
Learn more →Safety
Git, shell, and path rules in safety/rules.yaml — auditable like code.
Learn more →Backlog
Cross-session tasks with stable IDs — not ephemeral chat todos.
Handoff
Where work stopped, blockers, next steps for the following session.
Learn more →Worklog
Structured session history in worklog.jsonl for audit and standups.
Tuesday morning — with and without AXME
Cursor only
# New chat — user pastes: # - FastAPI + pytest stack # - PR #12 auth middleware # - Never force-push main # (200 lines, still incomplete)
Cursor + AXME Code
# Agent calls axme_context(path="/repo") # Returns: D-001 deploy-via-CI, # oracle summary, safety rules, # handoff: "finish integration tests"
CLIENT SUPPORT
Cursor vs Claude Code (same MCP server)
Full tool surface in Cursor; harness-level hooks are Claude Code–only today.
MCP tools (19+)
Full in Cursor — context, saves, backlog, close flow.
Pre-tool safety hooks
Not on Cursor — rules are advisory unless the host adds hooks.
Session-end auditor
Not automatic in Cursor — use axme_begin_close / axme_finalize_close.
File-change tracking
Claude Code automatic; Cursor relies on explicit saves during work.
Safety without hooks in Cursor
On Claude Code, pre-tool-use hooks block dangerous git commands before they run. In Cursor, encode axme_safety checks in project rules and code review — and save incidents with axme_save_memory when something slips through. Required decisions still surface every session via axme_context.
A week with AXME in Cursor (illustrative)
How oracle, decisions, memory, and handoff compound — adapted from the AXME Code product overview.
Monday: the team runs axme-code setup with presets essential-safety and ai-agent-guardrails. The scan ingests CLAUDE.md and layout into the oracle. Decision D-001 is saved: all production deploys go through GitHub Actions. Close flow handoff notes: open PR #12 for auth middleware; next step integration tests.
Tuesday: a new Cursor chat starts. Project rules tell the agent to call axme_context — it loads D-001, oracle, safety rules, and yesterday's handoff without a giant paste. Mid-session someone attempts git push --force; in Cursor nothing blocks at the harness — the team catches it in review and records a memory about protected branches.
Wednesday: after fixing flaky async tests, the agent saves a pattern memory: isolate FastAPI TestClient per test class. Thursday: the laptop closes without formal close — on Cursor, unstored context may be lost unless you saved during the session; run axme_begin_close before long breaks when possible.
Friday: product defers OAuth scope. Backlog B-004 and an open question for the PM are filed — next week axme_list_open_questions surfaces them instead of chat archaeology.
DAILY WORKFLOW
MCP tools your Cursor agent should use
Representative set from the axme-code server.
axme_context
Session start — oracle, decisions, memories, safety, handoff.
axme_save_memory
After debugging wins or incident lessons.
axme_save_decision
When architecture choices need enforcement metadata.
axme_update_safety
When policy changes (branches, denied commands).
axme_begin_close
End of session — checklist before you leave.
axme_finalize_close
Commit handoff and related KB updates atomically.
Formal session close (recommended in Cursor)
# Before ending a long Cursor session: # 1. axme_begin_close → returns checklist # 2. Extract any new memories/decisions # 3. axme_finalize_close → writes handoff + updates # If you skip close, call axme_save_* during work # so the next session still has durable context.
TEAM SETUP
Presets and multi-repo workspaces
Bootstrap guardrails once; scale across monorepos and multi-root workspaces.
essential-safety
Protected branches, no secrets in git, no force push — applied at setup.
ai-agent-guardrails
Verification expectations, no autonomous prod deploys.
Multi-repo
Per-repo .axme-code/ with merged workspace context where applicable.
Learn more →Cursor + AXME FAQ
- Global or project MCP config?
- Use .cursor/mcp.json in the repo for team-shared setup; ~/.cursor/mcp.json for personal defaults. Project config wins for that workspace.
- Does Cursor Marketplace install AXME automatically?
- When listed, marketplace install should wire the same MCP server entry. Until then, use axme-code setup and the JSON config above.
- Can Claude Code and Cursor share one knowledge base?
- Yes — both clients read the same .axme-code/ in the repo. Use explicit close or saves in Cursor; Claude Code can also run the background auditor.
- What about telemetry?
- axme-code sends anonymous lifecycle metrics only — not source code or KB content. Disable with AXME_TELEMETRY_DISABLED=1 or DO_NOT_TRACK=1.
Go deeper
Related links
Ship your first durable agent — in under 10 minutes.
Free tier. No credit card. Self-host or hosted — your choice.