Claude Code Project Memory MCP
Custom built Memory MCP to support the SDLC found in the CC-Startup-LArge template.
Installation
npx claude-code-project-memory-mcpAsk AI about Claude Code Project Memory MCP
Powered by Claude Β· Grounded in docs
I know everything about Claude Code Project Memory MCP. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Claude Code Long-Term Memory MCP Server
A development-time memory service for Claude Code - not runtime memory for your application. This MCP server helps Claude maintain context across coding sessions by storing project decisions, code patterns, and requirements. It's tooling that helps Claude build your application better.
Enables context persistence, duplicate detection, design alignment verification, and consistency enforcement across multi-session software development projects.
Architecture
The MCP server runs locally on your machine (not in Docker), while databases run as shared Docker infrastructure:
Developer Machine
+--------------------------------------------------+
| |
| +-------------------------------------------+ |
| | Project Directory | |
| | .mcp.json (project config) | |
| +-------------------------------------------+ |
| | |
| | stdio |
| v |
| +-------------------------------------------+ |
| | MCP Server (local Node.js process) | |
| | node mcp-server/bin/claude-memory-mcp.js | |
| +-------------------------------------------+ |
| | |
| +------------+------------+ |
| v v |
| +---------------+ +------------------+ |
| | Docker | | Docker | |
| | Qdrant | | Neo4j | |
| | (shared) | | (shared) | |
| +---------------+ +------------------+ |
+--------------------------------------------------+
Features
- Project Isolation: Each project has isolated data via
--project-idnamespacing - Semantic Search: Find relevant context using natural language queries
- Duplicate Detection: Identify similar code patterns before implementation
- Design Alignment: Validate changes against project requirements and ADRs
- Requirements Traceability: Track implementation status of requirements
- Code Indexing: Parse and index codebases for semantic search
- Session Continuity: Persist context across development sessions
Quick Start
Prerequisites
- Node.js 20+
- Docker and Docker Compose
- Voyage AI API key (Get one here)
Installation
1. Start the database infrastructure (one-time setup):
git clone <repository-url>
cd claude-code-memory-service/docker
# Configure Neo4j password
cp .env.example .env
# Edit .env and set NEO4J_PASSWORD
# Start databases
docker-compose up -d
2. Create global configuration:
mkdir -p ~/.config/claude-memory
cat > ~/.config/claude-memory/config.toml << 'EOF'
[voyage]
api_key = "your-voyage-api-key"
[qdrant]
url = "http://localhost:6333"
[neo4j]
uri = "bolt://localhost:7687"
user = "neo4j"
password = "your-neo4j-password"
EOF
Claude Code Integration
From your project directory, run:
claude mcp add memory -- node /path/to/claude-code-project-memory-mcp/mcp-server/bin/claude-memory-mcp.js --project-id my-project
Replace /path/to/ with the actual absolute path to this repository. Use a unique --project-id for each project (lowercase, hyphens, underscores only).
Warning: Do not use
npx claude-memory-mcp. There is a different, unrelated package with that name on npm.
After adding, restart Claude Code. The 23 memory tools are automatically discovered via MCP -- no changes needed to your project's CLAUDE.md.
Memory Inspector UI
A web-based UI for browsing, searching, and managing memories stored by the MCP server.
Prerequisites
- Databases running (see Quick Start above)
- Global config at
~/.config/claude-memory/config.toml(same as the MCP server)
Running the Inspector
cd inspector-ui
npm install
npm run dev
This starts both the API server (port 3002) and the frontend dev server (port 5173). Open http://localhost:5173 in your browser.
To start them individually:
# Backend API only
npm run dev:server
# Frontend only
npm run dev:client
Configuration
The Inspector reads database credentials from the same ~/.config/claude-memory/config.toml used by the MCP server. You can override settings with environment variables or a .env file (copy .env.example):
| Variable | Default | Description |
|---|---|---|
INSPECTOR_PORT | 3002 | Backend API port |
INSPECTOR_PROJECT_ID | default | Default project to display |
The UI supports switching between projects at runtime via the project selector.
Documentation
| Document | Description |
|---|---|
| Quick Reference | Concise tool usage guide |
| API Reference | Complete tool documentation |
| Deployment Guide | Docker setup and configuration |
| Integration Template | Full CLAUDE.md integration examples |
Configuration
Global Configuration
Located at ~/.config/claude-memory/config.toml:
[voyage]
api_key = "your-voyage-api-key"
[qdrant]
url = "http://localhost:6333"
[neo4j]
uri = "bolt://localhost:7687"
user = "neo4j"
password = "your-password"
Configuration Precedence
- Environment variables (highest priority)
- Global config file
- Built-in defaults
Environment Variables
| Variable | Description |
|---|---|
CLAUDE_MEMORY_QDRANT_URL | Qdrant URL |
CLAUDE_MEMORY_NEO4J_URI | Neo4j connection URI |
CLAUDE_MEMORY_NEO4J_USER | Neo4j user |
CLAUDE_MEMORY_NEO4J_PASSWORD | Neo4j password |
CLAUDE_MEMORY_VOYAGE_API_KEY | Voyage AI API key |
Project Isolation
Each project's data is isolated via --project-id. Multiple projects share the same Qdrant/Neo4j databases without data mixing.
How it works:
- Qdrant collections are prefixed:
myproject_functions,myproject_designs, etc. - Neo4j nodes include
project_idproperty with automatic filtering - Project ID is set once at server startup via
--project-id
For multiple projects:
Create separate .mcp.json files in each project with different --project-id values. Each project automatically uses its isolated memory space.
CLI Usage
# Start MCP server (requires --project-id)
node /path/to/claude-code-project-memory-mcp/mcp-server/bin/claude-memory-mcp.js --project-id my-project
# Show help
node /path/to/claude-code-project-memory-mcp/mcp-server/bin/claude-memory-mcp.js --help
Memory Types
| Type | Purpose |
|---|---|
requirements | Project requirements and specifications |
design | ADRs and architectural decisions |
code_pattern | Reusable code patterns and templates |
component | System components and modules |
function | Indexed functions and methods |
test_history | Test execution history |
session | Development session summaries |
user_preference | User preferences and settings |
MCP Tools (23 tools)
Memory CRUD (5 tools)
memory_add- Create new memoriesmemory_get- Retrieve memoriesmemory_update- Update existing memoriesmemory_delete- Soft delete memoriesmemory_bulk_add- Batch create memories
Search (5 tools)
memory_search- Semantic search across memoriescode_search- Find similar code patternsgraph_query- Execute Cypher queriesfind_duplicates- Detect duplicate contentget_related- Get related entities
Indexing (4 tools)
index_file- Index single fileindex_directory- Index directory recursivelyindex_status- Check indexing statusreindex- Re-index codebase
Analysis (4 tools)
check_consistency- Verify pattern compliancevalidate_fix- Validate fix against designget_design_context- Get design contexttrace_requirements- Trace requirement implementation
Maintenance (5 tools)
normalize_memory- Run normalizationnormalize_status- Check normalization statusmemory_statistics- Get system statisticsexport_memory- Export to JSONLimport_memory- Import from JSONL
Technology Stack
- TypeScript/Node.js 20+ - Runtime
- @modelcontextprotocol/sdk - Official MCP SDK
- Qdrant - Vector database for semantic search
- Neo4j - Graph database for relationships
- Voyage-Code-3 - Code embedding model (1024 dimensions)
- MCP Protocol - Claude Code integration
Project Structure
βββ mcp-server/ # TypeScript MCP server
β βββ src/
β β βββ index.ts # CLI entry point
β β βββ server.ts # MCP server setup
β β βββ context.ts # Shared tool context
β β βββ config.ts # TOML config loading
β β βββ tools/ # 23 tool implementations
β β βββ storage/ # Qdrant and Neo4j adapters
β β βββ embedding/ # Voyage AI client
β β βββ utils/ # Logging utilities
β βββ package.json
β βββ tsconfig.json
βββ inspector-ui/ # Memory Inspector web UI
β βββ src/ # React frontend (Vite + TailwindCSS)
β βββ server/ # Express backend API
β βββ package.json
β βββ vite.config.ts
βββ docker/ # Database docker-compose
βββ project-docs/ # Architecture and design docs
βββ user-docs/ # User documentation
βββ CLAUDE.md # Development workflow
Development
Building
cd mcp-server
npm install
npm run build
Running locally
cd mcp-server
node dist/index.js --project-id test-project
Running tests
cd mcp-server
npm test
Migrating from Python MCP
If you were using the earlier Python-based MCP server:
- Update your
.mcp.jsonto use npx instead of the Python command - Your existing data in Docker volumes will be preserved
- No changes needed to database infrastructure
License
MIT License
