mcp-project-memory
Understands Next.js App Router project structure: indexes page, layout, API route, action and component files, maps file paths (stripping route groups) to URL routes, and detects HTTP methods and server actions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-project-memory index this project and list all API routes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-project-memory
A Model Context Protocol (MCP) server that gives Claude a persistent memory of your project structure — so it stops re-scanning your entire codebase at the start of every session.
Why
On large projects, Claude typically spends 8,000–15,000 tokens per session just rediscovering the file structure, routes, and entry points. This server indexes your project once into a local .claude/project_map.json file, then answers structural questions instantly from that index.
Related MCP server: xtage
Tools
Tool | What it does |
| Scans the project once → saves |
| Find files by keyword or tag without globbing |
| Quick summary: routes, stats, framework, dependencies |
| Record an architectural decision for future sessions |
| Read back the decision journal |
Supported frameworks
Auto-detects Next.js (App Router), Nuxt, SvelteKit, Remix, React, Vue.
Classifies files as: page, layout, route-api, action, component, type, constant, lib, migration, config.
Installation
1. Clone and build
git clone https://github.com/YOUR_USERNAME/mcp-project-memory.git
cd mcp-project-memory
npm install
npm run build2. Register the server
Claude Code (CLI):
claude mcp add project-memory node /absolute/path/to/mcp-project-memory/dist/index.jsClaude Desktop — edit claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"project-memory": {
"command": "node",
"args": ["/absolute/path/to/mcp-project-memory/dist/index.js"]
}
}
}Restart Claude Desktop after editing.
Usage
Index your project (once per session or after major refactors)
index_project { "projectPath": "/path/to/your/project" }Output:
✅ my-app indexed (Next.js 14.x)
📁 191 files | 🗺 45 routes | ⚡ 13 server actions
Pages (36):
/dashboard app/(dashboard)/page.tsx
/settings app/(dashboard)/settings/page.tsx
...
API Routes (6):
[GET] /api/users app/api/users/route.ts
[POST] /api/auth/login app/api/auth/login/route.tsFind files without scanning
search_context {
"projectPath": "/path/to/project",
"query": "signArret",
"tag": "action"
}Get a session overview
get_project_map {
"projectPath": "/path/to/project",
"section": "routes" // "summary" | "routes" | "dependencies" | "actions"
}Record an architectural decision
add_decision {
"projectPath": "/path/to/project",
"topic": "PDF generation library",
"decision": "Use @react-pdf/renderer instead of Puppeteer",
"rationale": "Puppeteer exceeds Vercel's 50MB function limit. react-pdf renders natively server-side with no headless browser needed.",
"files": ["lib/pdf/arret.tsx", "app/api/arret/[id]/pdf/route.tsx"],
"tags": ["pdf", "performance", "vercel"]
}What gets indexed
All
.ts,.tsx,.js,.jsx,.sqlfiles under 100KBSkips:
node_modules,.git,.next,dist,build,.vercel,coverageExtracts exported function/component names from TypeScript files
Maps Next.js App Router file paths to URL routes (strips route groups)
Detects HTTP methods from API route files
Stored files
your-project/
└── .claude/
├── project_map.json ← file index + route map
└── decisions.json ← architectural decision logThese files are local to each project. Add .claude/ to your .gitignore if you don't want to commit them (or commit decisions.json to share architectural context with your team).
Update after changes
cd mcp-project-memory
npm run rebuildThen re-run index_project in your Claude session.
License
MIT
Available Tools
5 toolsadd_decisionB
Enregistre une décision architecturale dans .claude/decisions.json pour mémoire future.
Inputs: topic (required), decision (required), rationale (required), projectPath (required), +2 more.
get_decisionsC
Récupère le journal des décisions architecturales, avec filtres optionnels.
Inputs: projectPath (required), tag, topic.
get_project_mapC
Retourne le résumé de l'index : routes, stats, framework. Utile au démarrage d'une session.
Inputs: projectPath (required), section.
index_projectA
Scanne un projet et indexe sa structure dans .claude/project_map.json. À lancer une fois en début de session ou après des refactors importants.
Inputs: projectPath (required).
search_contextB
Recherche dans l'index du projet pour trouver des fichiers pertinents par mot-clé ou tag, sans scanner tout le répertoire.
Inputs: query (required), projectPath (required), tag.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
The decision tools (get_decisions vs add_decision) are clearly distinct read/write pairs, and index_project is clearly a write/scan operation. The two read tools over the index (get_project_map for a summary, search_context for keyword/tag lookup) are close in purpose and could occasionally be confused at session start, though the descriptions differentiate them adequately.
All five tools follow a consistent verb_noun snake_case pattern (get_decisions, add_decision, index_project, get_project_map, search_context). The convention is predictable and readable throughout.
Five tools is well-scoped for a project-memory/indexing server: two for the decision journal, three for indexing and querying the project map. Each tool earns its place with no filler.
The decision journal supports append and read, which fits an append-only architectural log, but there is no update/delete or invalidation path for superseded decisions. The index side covers scan, summary, and search well; only a targeted re-index or stale-entry cleanup is missing, which agents can work around by re-running index_project.
Maintenance
Related MCP Connectors
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Shared work memory for Claude Code, Codex, Cursor and chat, scoped to each repository.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides semantic code intelligence to help users search, navigate, and analyze entire codebases using plain English. It enables Claude to perform architectural overviews, bug detection, and refactor suggestions through local semantic search and keyword indexing.MIT
- AlicenseNot gradedqualityBmaintenanceProvides Claude with persistent, semantic knowledge of a codebase across sessions by maintaining a local knowledge base of structural maps, compressed file summaries, and insights.7 npm1MIT
- AlicenseNot gradedqualityCmaintenanceProvides persistent codebase memory for Claude Code, enabling semantic understanding of the project structure and action history across sessions to reduce redundant file reads.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude Code to query a local, import-aware graph of a repository, so questions like who calls a function, what breaks if it changes, and what imports a file are answered in one lookup instead of a search-and-read loop. It also persists durable session notes and offers full-text search over past session transcripts, all through MCP tools.MIT