Project Memory MCP
A Model Context Protocol (MCP) server that provides AI-driven project memory management through structured prompts. This server acts as a pure prompt provider - it never touches your files directly. Instead, it returns instructions for Claude to execute using its standard tools.
What is This?
project-memory-mcp helps Claude manage your project context by:
Parsing tasks from specs and implementation plans
Reviewing code before commits
Syncing project memory with commit history
Maintaining project documentation (architecture, conventions, commands)
All operations are performed by Claude using its Read, Write, Edit, and Bash tools after getting your approval.
Key Features
✅ Pure prompt provider - No file access, only returns instructions ✅ Interface-agnostic - Works with Claude Desktop, Claude Code CLI, or custom clients ✅ No API costs - Uses your existing Claude subscription ✅ User approval required - Claude asks before making any changes ✅ Project-specific prompts - Customized during initialization for your stack ✅ 200-line limit - Prevents context bloat
Installation
Install globally from GitHub:
Setup
Configure MCP in Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
Configure MCP in Claude Code CLI
Add to your MCP settings (~/.config/claude/mcp_settings.json):
Restart Claude
Restart Claude Desktop or Claude Code CLI to load the MCP server.
Usage
Initialize Project Memory
In your project directory, ask Claude:
Claude will:
Create
.project-memory/folder structureAnalyze your project (language, frameworks, structure, conventions)
Generate and customize project-specific prompts (base.md, parse-tasks.md, review.md, sync.md)
Populate initial documentation files (architecture.md, conventions.md, useful-commands.md) with detected project info
Add minimal IMPORTANT reference to
claude.md
Important: Each prompt file is limited to ≤ 200 lines to prevent context bloat.
Parse Tasks from Specs
Add a spec file to .project-memory/specs/feature-name.md, then ask Claude:
Claude will:
Read the spec file
Extract tasks with IDs, descriptions, acceptance criteria, dependencies
Show you the parsed tasks
After approval, add them to
.project-memory/tasks/tasks-active.json
Review Code Before Committing
Before committing, ask Claude:
Claude will:
Get
git diffandgit diff --cachedRead current tasks and architecture
Analyze code for issues
Propose task status updates
After approval, update project memory
Sync After Commits
After committing, ask Claude:
Claude will:
Get recent commit history
Determine completed tasks
Update commit log (last 20 commits)
Update architecture if changed
After approval, apply updates
Organize Existing CLAUDE.md
For existing projects with verbose CLAUDE.md files, ask Claude:
Claude will:
Read and analyze your CLAUDE.md
Identify sections: architecture, conventions, commands, tasks, specs
Show migration plan with line numbers
After approval, migrate content to
.project-memory/filesReplace verbose sections with minimal references in CLAUDE.md
Example migration:
Architecture (75 lines) →
.project-memory/architecture.mdConventions (60 lines) →
.project-memory/conventions.mdCommands (30 lines) →
.project-memory/useful-commands.mdTasks →
.project-memory/tasks/tasks-active.jsonSpecs →
.project-memory/specs/*.md
Result: CLAUDE.md stays clean with just references, detailed content lives in organized files.
Proactive Prompting
After initialization, Claude will automatically prompt you:
When you provide a spec: "Would you like me to parse tasks?"
Before commits: "Would you like me to review your changes?"
After commits: "Would you like me to sync project memory?"
Session start: Check for pending reviews/syncs
Project Structure
After initialization, your project will have:
Task Schema
Tasks follow this structure:
MCP Tools
The server exposes 5 tools (all return prompts only):
init
Initialize project memory system. Run once per project.
parse-tasks
Parse tasks from spec files or implementation plans.
review
Review uncommitted code changes against project context.
sync
Sync project memory with recent commits.
organize
Organize existing CLAUDE.md into project-memory structure. Migrates architecture, conventions, commands, tasks, and specs from verbose CLAUDE.md to organized files.
How It Works
Architecture Principles
MCP is a pure prompt provider
Only returns text instructions
Never reads/writes project files
Never executes git commands
Claude does all the work
Uses standard tools (Read, Write, Edit, Bash)
User sees all operations
Requires approval via AskUserQuestion
Project-specific customization
Prompts tailored to your tech stack
Language-specific guidelines
Framework conventions
200-line limit per prompt
Prevents context bloat
Keeps prompts focused
Enforced during init
Development
Testing
Run the test suite:
Tests cover:
Prompt length validation (200-line limit)
Prompt composition
Edge cases
Contributing
Contributions welcome! Please:
Fork the repository
Create a feature branch
Make your changes
Add tests
Submit a pull request
License
MIT
Links
Spec - Detailed specification
Support
For issues, questions, or feedback:
Note: This MCP server requires Claude Desktop, Claude Code CLI, or another MCP-compatible client to function.