Claude Code Memory Server
A Neo4j-based MCP server providing persistent memory and contextual assistance for Claude Code.
Claude Code Memory Server
A Neo4j-based Model Context Protocol (MCP) server that provides intelligent memory capabilities for Claude Code, enabling persistent knowledge tracking, relationship mapping, and contextual development assistance.
Overview
This MCP server creates a sophisticated memory system that tracks Claude Code's activities, decisions, and learned patterns to provide contextual memory across sessions and projects. It uses Neo4j as a graph database to capture and analyze complex relationships between development concepts, solutions, and workflows.
Features
Core Memory Operations
- Persistent Memory Storage - Store development tasks, solutions, and patterns
- Intelligent Search - Find relevant memories by context, content, or relationships
- Relationship Mapping - Track how different concepts, files, and solutions relate
- Context Awareness - Project-specific and technology-specific memory retrieval
Advanced Intelligence
- Pattern Recognition - Automatically identify reusable development patterns
- Solution Effectiveness - Track and learn from successful approaches
- Workflow Memory - Remember and suggest optimal development sequences
- Error Prevention - Learn from past mistakes to prevent similar issues
Development Integration
- Task Execution Tracking - Monitor what Claude Code does and how
- Code Pattern Analysis - Identify and store successful code patterns
- Project Context Memory - Understand codebase conventions and dependencies
- Collaborative Learning - Share knowledge across development sessions
Architecture
Memory Types
- Task - Development tasks and their execution patterns
- CodePattern - Reusable code solutions and architectural decisions
- Problem - Issues encountered and their context
- Solution - How problems were resolved and their effectiveness
- Project - Codebase context and project-specific knowledge
- Technology - Framework, language, and tool-specific knowledge
Relationship Types
The system tracks seven categories of relationships:
- Causal -
CAUSES,TRIGGERS,LEADS_TO,PREVENTS,BREAKS - Solution -
SOLVES,ADDRESSES,ALTERNATIVE_TO,IMPROVES,REPLACES - Context -
OCCURS_IN,APPLIES_TO,WORKS_WITH,REQUIRES,USED_IN - Learning -
BUILDS_ON,CONTRADICTS,CONFIRMS,GENERALIZES,SPECIALIZES - Similarity -
SIMILAR_TO,VARIANT_OF,RELATED_TO,ANALOGY_TO,OPPOSITE_OF - Workflow -
FOLLOWS,DEPENDS_ON,ENABLES,BLOCKS,PARALLEL_TO - Quality -
EFFECTIVE_FOR,INEFFECTIVE_FOR,PREFERRED_OVER,DEPRECATED_BY,VALIDATED_BY
Installation
Prerequisites
- Python 3.10 or higher
- Neo4j database (local or cloud)
- Claude Code with MCP support
Setup
- Clone the repository:
git clone https://github.com/viralvoodoo/claude-code-memory.git
cd claude-code-memory
- Install dependencies:
pip install -e .
- Set up Neo4j connection:
cp .env.example .env
# Edit .env with your Neo4j credentials
- Initialize the database schema:
python -m claude_memory.setup
Configuration
Environment Variables
NEO4J_URI- Neo4j database URI (default: bolt://localhost:7687)NEO4J_USER- Database username (default: neo4j)NEO4J_PASSWORD- Database passwordMEMORY_LOG_LEVEL- Logging level (default: INFO)
Claude Code Integration
Add to your Claude Code MCP configuration:
{
"mcpServers": {
"claude-memory": {
"command": "python",
"args": ["-m", "claude_memory.server"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USER": "neo4j",
"NEO4J_PASSWORD": "your-password"
}
}
}
}
Usage
Available MCP Tools
Core Memory Operations
store_memory- Store new development memories with contextget_memory- Retrieve specific memory by ID with relationshipssearch_memories- Find memories by content, context, or relationshipsupdate_memory- Modify existing memory contentdelete_memory- Remove memory and cleanup relationships
Relationship Management
create_relationship- Link memories with specific relationship typesget_related_memories- Find memories connected to a specific memoryanalyze_relationships- Discover relationship patterns in memory graph
Development Intelligence
analyze_codebase- Scan project and create contextual memory graphtrack_task_execution- Record development workflow and patternssuggest_similar_solutions- Find analogous past solutionspredict_solution_effectiveness- Estimate success probability of approaches
Advanced Analytics
get_memory_graph- Visualize knowledge network and relationshipsfind_memory_paths- Discover connection chains between conceptsmemory_effectiveness- Track and analyze solution success rates
Development
Project Structure
claude-code-memory/
├── src/claude_memory/ # Main source code
│ ├── __init__.py
│ ├── server.py # MCP server implementation
│ ├── models.py # Data models and schemas
│ ├── database.py # Neo4j database operations
│ ├── memory_store.py # Core memory logic
│ ├── relationships.py # Relationship management
│ ├── search.py # Search and retrieval
│ └── intelligence.py # Pattern recognition and analytics
├── tests/ # Test suite
├── docs/ # Documentation
├── scripts/ # Utility scripts
└── pyproject.toml # Project configuration
Development Setup
# Install development dependencies
pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit install
# Run tests
pytest
# Format code
black src/ tests/
ruff --fix src/ tests/
# Type checking
mypy src/
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Workflow
- Check existing GitHub Issues
- Fork the repository and create a feature branch
- Make changes following our coding standards
- Add tests for new functionality
- Submit a pull request with a clear description
License
This project is licensed under the MIT License - see the LICENSE file for details.
Roadmap
Phase 1: Foundation (Current)
- ✅ Project setup and basic MCP server
- 🔄 Core memory operations (CRUD)
- ⏳ Basic relationship management
Phase 2: Intelligence
- ⏳ Advanced relationship system
- ⏳ Pattern recognition
- ⏳ Context awareness
Phase 3: Integration
- ⏳ Claude Code workflow integration
- ⏳ Automatic memory capture
- ⏳ Proactive suggestions
Phase 4: Analytics
- ⏳ Memory effectiveness tracking
- ⏳ Knowledge graph visualization
- ⏳ Performance optimization
Support
- GitHub Issues - Bug reports and feature requests
- Discussions - Questions and community support
- Documentation - Detailed guides and API reference
Acknowledgments
- Model Context Protocol - Protocol specification and examples
- Neo4j - Graph database platform
- Claude Code - AI-powered development environment
संबंधित सर्वर
Alpha Vantage MCP Server
प्रायोजकAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
MCP Java Decompiler Server
Decompile Java class files from file paths, package names, or JAR files using a JavaScript port of the CFR decompiler.
MCP Sandbox
An interactive sandbox to safely execute Python code and install packages in isolated Docker containers.
MCP Docs Server
Provides direct access to local documentation files through a context.md file in the project root.
PlantUML-MCP-Server
MCP server that provides PlantUML diagram generation capabilities
LambdaTest MCP Server
LambdaTest MCP Servers ranging from Accessibility, SmartUI, Automation, and HyperExecute allows you to connect AI assistants with your testing workflow, streamlining setup, analyzing failures, and generating fixes to speed up testing and improve efficiency.
paytoll-mcp
Access 20+ DeFi, crypto, and AI endpoints through micro-payments. Get Aave rates, build DeFi transactions, fetch crypto prices, resolve ENS names, search Twitter, and query LLMs - all paid per-call with USDC on Base. No API keys needed, payment is the auth
Figma MCP Server
Provides read-only access to Figma files and projects using the Figma API.
AppControl Windows System History
An MCP server that gives AI agents like Claude, Cursor, and Gemini access to historical Windows CPU, GPU, temperature, and privacy data gathered by the AppControl Windows app.
MCP VSCode Cline
A guide for using the Cline VSCode extension to interact with Model Context Protocol (MCP) servers.
mcpcodeserver
Instead of direct calling MCP tools, mcpcode server transforms MCP tool calls into TypeScript programs, enabling smarter, lower-latency orchestration by LLMs.