# projectmem

Local-first memory for coding agents that stores past decisions and warns before repeating failed code fixes.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 866
- Author: riponcm
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/riponcm/projectmem
- Updated: 2026-10-03
- HTML: https://affpapa.org/en/nevibecode/mcp/projectmem

## What it does

The server maintains project history directly in your repository inside the `.projectmem/` folder. Instead of re-reading raw chat transcripts, it records typed events: issues encountered, attempted changes, decisions, and notes in an `events.jsonl` file.

It exposes 17 tools to the AI agent over MCP. The core safeguard is a pre-commit warning that triggers before the agent applies a fix that already failed earlier in the project. Project health and visual summaries run locally via the companion `pjm` CLI.

Storage stays entirely local without cloud accounts or telemetry. Adding memory to a repository takes `pjm init`, but you must fully restart your coding client after updating the MCP configuration or the server will fail to load.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add projectmem -- uvx projectmem
```
uvx runs the command named after the package; if the README names another one, use uvx --from projectmem <command>

### Codex

**Platform CLI**
```bash
codex mcp add projectmem -- uvx projectmem
```
uvx runs the command named after the package; if the README names another one, use uvx --from projectmem <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "projectmem": {
            "command": "uvx",
            "args": [
                "projectmem"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from projectmem <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "projectmem": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "projectmem"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from projectmem <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add projectmem uvx projectmem
```
uvx runs the command named after the package; if the README names another one, use uvx --from projectmem <command>

## When to use it
- persist debugging decisions and fixes across separate agent sessions
- stop the agent from reapplying previously failed bug fixes
- keep project memory strictly local inside `.projectmem/` without cloud sync
- inspect past failures and resolved cases with `pjm visualize`

## Example prompts
- Check `projectmem` before patching this bug to see what failed previously.
- Record our fix for the connection timeout issue into project memory.
- Run a pre-check on my changes against past failed attempts.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
