riponcm/projectmem
Local-first AI coding memory for AI agents. Records issues, attempts, fixes and decisions, then warns your agent before it repeats an approach that already failed. Native MCP server for Claude Code, Cursor, Antigravity and Codex. 100% local, no cloud, no telemetry. MIT.
429 ★12 forksPythonUpdated 1d ago
What you need to know
A local-first, event-sourced memory and judgment layer ("AI coding memory") for coding agents that records typed events (issues, attempts, fixes, decisions, notes) in a plain .projectmem/ directory and exposes 15 MCP tools, including a unique pre-commit failure warning.
Install
pip install projectmem cd your-project && pjm init (installs git hooks, starts a file watcher, creates .projectmem/)
Usage
- •Register the MCP server in each client with the absolute path to python and pass the project root via --root: python -m projectmem.mcp_server --root /absolute/path/to/your/project (Claude Desktop, Cursor, Antigravity, or Codex config.toml).
- •Kick off a session by asking the AI to call get_instructions(), then get_summary(), then get_project_map(); log issues/attempts/fixes/decisions/notes as you work and call precheck_file(path) before editing.
- •Use CLI commands directly: pjm brief (session-start briefing), pjm precheck (warnings before commit, --snooze 2h), pjm wrap claude (inject token-budgeted memory), pjm score (A+->F prevention score).
- •Export memory for agents without MCP: pjm export --claude-md writes a marked block into CLAUDE.md or .cursorrules.
Key features
- ✓Pre-commit warnings that fire before you repeat a failed approach, modify a high-churn file, or touch an unresolved issue (unique - requires the memory layer underneath).
- ✓Stale-memory detection: memories are flagged against git history ("predates 7 commits to auth.py - confirm or supersede") and never deleted; supersede with pjm decision "... --supersedes <id>".
- ✓15 native MCP tools (10 read-side such as get_summary, precheck_file, get_plan; 5 write-side such as log_issue, record_attempt) verified against Claude Desktop, Cursor, Antigravity, and Codex.
- ✓100% local: memory in .projectmem/, no cloud, no telemetry, no accounts; distilled files committed, raw events.jsonl gitignored by default.
- ✓Visualization suite: pjm visualize (six-tab dashboard with Story Map failure heatmap, ROI, Project Map, Timeline, Showoff animations) and cross-project global dashboard (pjm dashboard).
Best for
Solo developers and teams doing AI-assisted coding who want the agent to remember what failed/worked across sessions and warn before repeating yesterday's bugs.
Caveats
- ⚠Claude Desktop and Cursor silently ignore the "cwd" field - the project root must be passed via --root (absolute python path required since subprocesses do not inherit PATH).
- ⚠Codex stores config as TOML and the UI Save button did not reliably persist; set reasoning effort to medium+ for full session-start behavior.
- ⚠First use in any MCP client triggers a permission prompt per tool (expected MCP security behavior).
Platforms: macOS · Linux · WindowsClients: Claude Desktop · Cursor · Antigravity · Codex
Documentation ↗Reviewed 2026-08-07
Topics
agent-memoryai-agentsai-memoryai-toolsantigravityclaudeclaude-codecodexcoding-assistantcontext-engineeringcursordeveloper-toolsknowledge-managementllmlocal-firstmcpmcp-servermemorymodel-context-protocolpython
- Stars
- 429★
- Forks
- 12
- Language
- Python
- License
- MIT
- Created
- 2026-05-09
- Last push
- 2026-08-06