NoobDataScience/Advanced-AI-MCP
If you are the rightful owner of Advanced-AI-MCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Advanced AI Memory & Reasoning MCP Server is a sophisticated system designed to enhance Claude with advanced memory management and reasoning capabilities.
🧠 Advanced AI Memory & Reasoning MCP Server
A sophisticated Model Context Protocol (MCP) server that enhances Claude with genius-level memory management and Tree-of-Thought reasoning capabilities, inspired by cutting-edge AI research.
✨ Key Features
🏗️ Hierarchical Memory System
- Core Memory: 15 slots for permanent, always-accessible information
- Working Memory: 75 slots for current session context
- Archival Memory: 2000 slots for long-term storage with intelligent forgetting curves
- Smart Management: Automatic cleanup based on importance and access patterns
🌳 Tree-of-Thought Reasoning
- Multi-Path Analysis: Analytical, creative, critical, and pragmatic approaches
- Configurable Depth: 1-5 levels of reasoning expansion
- Confidence Scoring: Each reasoning step includes confidence assessment
- Path Optimization: Automatically selects highest-confidence reasoning paths
📊 Advanced Analytics
- Conversation Context Analysis: Patterns, topics, and memory distribution
- Cognitive Load Assessment: Task complexity evaluation with approach recommendations
- Memory Optimization: Performance monitoring and automatic tuning
- Export Capabilities: Backup and analysis of conversation memories
🚀 Installation
1. Run Setup
cd /Volumes/IOSStore/MCP/advanced-ai-mcp
chmod +x setup.sh
./setup.sh
2. Configure Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"advanced-ai-server": {
"command": "python",
"args": ["/Volumes/IOSStore/MCP/advanced-ai-mcp/advanced_mcp_server.py"],
"env": {}
}
}
}
3. Restart Claude Desktop
🛠️ Available Tools
Memory Management
store_memory(content, memory_type="working", importance=0.5, tags="")
Store information in hierarchical memory system
# Examples:
store_memory("User prefers detailed technical explanations", "core", 0.9, "preference,communication")
store_memory("Working on advanced MCP server project", "working", 0.7, "project,development")
store_memory("Research notes on Tree-of-Thought reasoning", "archival", 0.6, "research,reasoning")
retrieve_memories(query="", memory_type="", limit=10)
Search and retrieve stored memories
# Examples:
retrieve_memories("user prefer", limit=5)
retrieve_memories(memory_type="core")
retrieve_memories("project", "working", 3)
Advanced Reasoning
advanced_reasoning(problem, max_depth=3)
Multi-path Tree-of-Thought analysis
# Examples:
advanced_reasoning("How should we improve team productivity while maintaining code quality?", 4)
advanced_reasoning("What are the key challenges in implementing AGI safely?", 5)
cognitive_load_assessment(task_description)
Assess task complexity and recommend optimal approach
# Examples:
cognitive_load_assessment("Design a distributed system architecture for real-time data processing")
cognitive_load_assessment("Write a simple function to calculate fibonacci numbers")
Analysis Tools
analyze_conversation_context()
Analyze current conversation using stored memories
# No parameters - analyzes recent conversation patterns, topics, and memory distribution
memory_optimization()
Optimize memory system performance
# No parameters - analyzes usage patterns and applies optimization
export_conversation_memory()
Export memories for backup or analysis
# No parameters - creates exportable summary of conversation memories
💡 Usage Examples
Basic Workflow
# 1. Store important context
store_memory("This is a technical discussion about AI reasoning systems", "working", 0.8, "context,ai,reasoning")
# 2. Analyze complex problems
advanced_reasoning("How can we create more efficient AI reasoning systems?", 4)
# 3. Monitor conversation
analyze_conversation_context()
# 4. Optimize performance
memory_optimization()
Project Context Management
# Store project requirements
store_memory("Building MCP server with memory and reasoning capabilities", "core", 0.9, "project,requirements")
# Store technical decisions
store_memory("Using SQLite for persistence, Tree-of-Thought for reasoning", "working", 0.7, "technical,decisions")
# Analyze project complexity
cognitive_load_assessment("Implement advanced AI reasoning with persistent memory management")
Research and Analysis
# Store research findings
store_memory("OpenAI o3 achieves 87.5% on ARC-AGI benchmark using test-time compute scaling", "archival", 0.8, "research,benchmarks")
# Deep analysis
advanced_reasoning("What are the implications of test-time compute scaling for AGI development?", 5)
# Export for further analysis
export_conversation_memory()
🔧 System Architecture
Memory Hierarchy
Core Memory (15 slots)
├── Permanent user preferences
├── Key project information
└── Critical context that should never be forgotten
Working Memory (75 slots)
├── Current session context
├── Active project details
└── Recently accessed information
Archival Memory (2000 slots)
├── Historical conversation data
├── Research notes and findings
└── Long-term knowledge with forgetting curves
Reasoning System
Tree-of-Thought Reasoning
├── Analytical: Logical structure analysis
├── Creative: Alternative perspectives and analogies
├── Critical: Assumption questioning and bias identification
└── Pragmatic: Practical implementation considerations
Database Schema
-- Memory storage with metadata
memories (id, content, memory_type, importance, created_at, last_accessed, access_count, tags, context)
-- Complete reasoning chains
reasoning_chains (chain_id, step_id, content, confidence, reasoning_type, parent_step, children, created_at)
⚡ Performance Features
Intelligent Memory Management
- Importance-based retention: High-importance memories persist longer
- Access-pattern optimization: Frequently accessed memories stay available
- Forgetting curves: Realistic memory degradation over time
- Automatic cleanup: Maintains optimal performance
Reasoning Optimization
- Confidence-based path selection: Follows highest-confidence reasoning paths
- Multi-strategy expansion: Uses 4 different cognitive approaches
- Depth-aware scaling: Adjusts confidence based on reasoning depth
- Chain persistence: Complete reasoning processes stored for analysis
Real-time Analytics
- Memory usage statistics: Track memory distribution and patterns
- Reasoning performance metrics: Analyze reasoning chain effectiveness
- Conversation insights: Identify key topics and discussion patterns
- System optimization: Automated performance tuning
🔍 Troubleshooting
Common Issues
Server not appearing in Claude:
- Check JSON syntax in config file
- Verify file paths are absolute and correct
- Restart Claude Desktop completely
Import errors:
cd /Volumes/IOSStore/MCP/advanced-ai-mcp
source venv/bin/activate
pip install mcp fastmcp
Database errors:
# Reset database if corrupted
rm advanced_memory.db
Permission errors:
chmod +x advanced_mcp_server.py
chmod +x setup.sh
Debug Mode
Edit the server file to enable detailed logging:
logging.basicConfig(level=logging.DEBUG)
🛡️ Security & Privacy
- Local storage only: All data stored in local SQLite database
- No external communication: Server operates entirely offline
- Encrypted storage option: Database can be encrypted if needed
- Access control: Memory system respects importance and access patterns
🔮 Advanced Configuration
Memory Limits (edit in server file)
self.memory_limits = {
"core": 20, # Increase for more permanent memory
"working": 100, # Increase for larger working memory
"archival": 3000 # Increase for more long-term storage
}
Reasoning Depth
# Allow deeper reasoning (up to 7 levels)
max_depth = max(1, min(7, max_depth))
Database Location
# Custom database path
memory_system = AdvancedMemorySystem(db_path="/custom/path/memory.db")
📊 Performance Monitoring
The server includes comprehensive monitoring:
- Memory usage tracking and optimization
- Reasoning chain analysis and metrics
- Conversation pattern recognition
- Automatic performance tuning
🤝 Integration Tips
Best Practices
- Start with context: Store project/conversation context in core memory
- Use appropriate types: Core for permanent, working for session, archival for history
- Tag consistently: Use consistent tagging for better retrieval
- Assess complexity: Use cognitive load assessment for complex tasks
- Monitor regularly: Run optimization and analysis tools periodically
Workflow Recommendations
- Project Setup: Store requirements and context in core memory
- Active Work: Use working memory for current session information
- Complex Analysis: Apply advanced reasoning for difficult problems
- Regular Maintenance: Optimize memory system and analyze patterns
- Knowledge Preservation: Export important memories for backup
📈 Real-World Applications
- Software Development: Project context, technical decisions, code review insights
- Research: Literature notes, hypothesis tracking, analysis patterns
- Strategy Planning: Decision frameworks, option analysis, constraint identification
- Learning: Concept connections, skill development tracking, knowledge synthesis
- Problem Solving: Multi-perspective analysis, solution evaluation, implementation planning
Your Advanced AI MCP Server is ready to provide Claude with sophisticated memory and reasoning capabilities! 🧠✨