๐ Mind Map MCP Server v1.22.0
An Experimental Code Intelligence Platform - A Model Context Protocol (MCP) server that explores neuroscience-inspired approaches to software development analysis. This is an experimental research project featuring advanced query caching, associative learning patterns, context awareness, attention mechanisms, temporal knowledge modeling, and code analysis tools.
๐ Quick Start
Installation
npm install
npm run build
npm start
Usage with Claude Code
Automatic Setup (Recommended)
The easiest way to get started is to use the built-in initialization method:
mcp://mind-map-mcp/init_claude_code
mcp://mind-map-mcp/init_claude_code?setup_type=desktop&platform=macos
mcp://mind-map-mcp/init_claude_code?setup_type=cli&platform=linux
This automatically generates:
- โ
Platform-specific configuration files with correct paths
- โ
Ready-to-copy JSON configurations for Claude Desktop/CLI
- โ
Complete setup checklist with verification commands
- โ
Quick start workflow with essential commands
- โ
Troubleshooting guide for common issues
Manual Configuration
If you prefer manual setup, add this server to your Claude Code MCP configuration:
Claude Desktop Configuration
Edit your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"mind-map-mcp": {
"command": "node",
"args": ["/path/to/mind-map-mcp/dist/index.js"],
"env": {}
}
}
}
CLI Usage
npm start
node dist/index.js
Verify Installation
After setup, restart Claude and verify the integration:
- Check MCP Tools: In Claude, you should see 33 new MCP tools available
- Test Basic Functionality: Try these commands in Claude:
Please scan the current project and show me the statistics.
- Test Features: Try experimental features:
Please analyze the project architecture.
โจ Features
๐ง Brain-Inspired Intelligence (Phase 6)
- Associative Memory System: Neural activation spreading across connected code concepts (50 - 70% relevance improvement)
- Context-Aware Query Caching: Intelligent caching with similarity matching (5 - 10x performance boost for repeated queries)
- Parallel Processing Engine: Chunked file analysis with worker pool orchestration (3 - 5x faster project scanning)
- Neuromorphic Query Patterns: Replaces linear search with brain-like associative activation networks
- Intelligent Cache Invalidation: Path-based selective cache clearing with LRU eviction and 100MB memory management
- Hebbian Learning System: Co-activation tracking with synaptic strengthening ("neurons that fire together, wire together")
- Inhibitory Learning: Failure avoidance through negative pattern recognition (30% reduction in repeated mistakes)
- Hierarchical Context Management: Multi-level context awareness (immediate, session, project, domain)
- Attention Mechanisms: Multi-modal attention fusion with cognitive load management (Miller's 7ยฑ2 rule)
- Bi-temporal Knowledge Model: Valid time vs transaction time tracking with complete audit trails
- Pattern Prediction Engine: Anticipates code patterns before they emerge using time series analysis and predictive forecasting
๐ Memory Optimization (v1.15.0)
- Variable Lazy Loading: Intelligent memory management with 40.3% reduction in variable node memory usage
- Smart Filtering: Only loads critical variables (exported, global, heavily-used >5 references) immediately
- Summary Node System: Creates single nodes containing lazy-loaded variable metadata for thousands of variables
- On-Demand Loading: 8ms average retrieval time for pattern-based variable queries
- Full Functionality Preservation: All variable querying capabilities maintained while dramatically reducing memory footprint
- Automatic Optimization: No configuration required - automatically detects important vs. lazily-loadable variables
๐ Advanced Call Pattern Analysis (v1.1.5)
- Function Call Graph Construction: Complete call graph analysis with entry points, cycles, and depth calculation
- Constructor Call Detection: Accurate detection of class instantiation and constructor patterns
- Method Call Analysis: Comprehensive tracking of method invocations and chaining patterns
- Async/Await Pattern Recognition: Full support for asynchronous call pattern detection
- Recursion Detection: Automatic identification of recursive functions and call cycles
- Code Style Recognition: Comprehensive naming convention and style pattern analysis
- Complexity Calculation: Enhanced cyclomatic complexity with callback function and control flow analysis
- Cross-File Pattern Resolution: Advanced resolution of call patterns across multiple files
๐ CI/CD Pipeline Infrastructure (v1.1.5)
- Automated Testing: Comprehensive test suite with multi-language AST validation
- Security Scanning: Automated vulnerability detection with npm audit integration
- Performance Monitoring: Continuous performance benchmarking with alert thresholds
- Code Quality Analysis: Bundle size monitoring, style analysis, and quality reporting
- Release Automation: Automated NPM publishing with GitHub release creation
- Maintenance Workflows: Dependency updates, health checks, and system monitoring
- Pull Request Validation: PR title validation, impact analysis, and comprehensive testing
๐ Enhanced File Ignore Configuration (v1.6.0)
- Multi-Source Pattern Loading: Intelligent pattern merging from defaults, .gitignore, .mindmapignore, and custom configuration
- Real-Time Pattern Testing: Live pattern validation with performance metrics and file matching preview
- Pattern Analytics & Statistics: Comprehensive stats on pattern effectiveness, scan time reduction, and filtering efficiency
- Smart Default Patterns: 30 intelligent default patterns for common file types (node_modules, build artifacts, etc.)
- Configuration Management API: 3 new MCP tools for dynamic pattern updates and testing
- Developer-Friendly Interface: Familiar .gitignore syntax with enhanced capabilities and precedence rules
- Performance Optimization: 33% file filtering efficiency with 8 - 12ms pattern loading for improved scan performance
- Framework-Specific Patterns: Language and framework-specific ignore patterns (*.pyc, *.class, target/, dist/)
๐ง Advanced Code Intelligence
- Multi-Language AST Analysis: Full parsing for 12 languages (TypeScript/JavaScript/Python/Java/Go/Rust/C++/PHP/C#/Ruby/Swift/Kotlin/Scala) with function/class extraction
- Dynamic Import Detection: Track runtime imports including
import() calls, require() statements, template literals, and variable-based module loading for modern JavaScript/TypeScript applications
- Method Call Chain Analysis: Advanced call sequence tracking following AโBโCโD execution paths up to 10 levels deep with performance impact assessment and risk analysis
- Variable Usage Tracking: Comprehensive variable intelligence tracking declaration, usage, and modification patterns across files with lifecycle analysis and cross-module dependency detection
- Cross-Language Dependency Detection: Identifies API calls, FFI, microservices, and shared data patterns across languages
- Polyglot Project Analysis: Architectural style detection with multi-language recommendations
- Enterprise Framework Detection: React, Vue, Express, Django, Flask, Spring Boot, Laravel, ASP.NET, Rails, SwiftUI, Android, Akka, and 60+ more
- Architectural Pattern Detection: 7 pattern types with multi-language interoperability analysis
- Predictive Error Detection: Risk analysis system with language-specific pattern matching
- Intelligent Fix Suggestions: Context-aware recommendations with cross-language insights
๐ง Integrated Development Tooling
- 100+ Development Tools: Complete tooling ecosystem across 12 languages with intelligent detection
- Smart Tool Execution: Run tests, linters, formatters, and security scanners with issue parsing
- Intelligent Recommendations: Get suggestions for missing tools with installation commands
- Tool Suite Orchestration: Run multiple tools in parallel with aggregated results
- Issue Classification: Parse and categorize tool outputs for actionable insights
- Mind Map Integration: Store tool results as nodes/edges for learning and correlation
๐ฏ Enhanced Framework Detection
- 25+ Framework Detection: Comprehensive framework analysis across 6 categories with confidence scoring
- Web Frameworks: React, Vue, Angular, Express, Django, Flask, Spring Boot, Next.js, Nuxt.js detection
- Mobile Frameworks: React Native, Flutter, Xamarin with platform-specific pattern analysis
- Desktop Frameworks: Electron, Tauri, Qt with configuration and build system detection
- Game Engines: Unity, Unreal Engine, Godot with project structure and script analysis
- ML/AI Frameworks: TensorFlow, PyTorch, scikit-learn with usage pattern detection
- Cloud Platforms: Docker, Kubernetes with manifest analysis and deployment patterns
๐ Advanced Learning System
- Task Outcome Learning: Tracks success/failure patterns with confidence scoring
- Error Pattern Recognition: Categorizes errors and maps to successful solutions
- Cross-Session Intelligence: Maintains knowledge between Claude Code sessions
- Performance Learning: Adaptive optimization based on usage patterns
- Solution Effectiveness Tracking: Measures and improves recommendation quality
๐ Enterprise Query System
- Cypher-like Graph Queries: Advanced querying with complex filtering and relationships
- Temporal Analysis: Code evolution tracking and change impact analysis
- Aggregate Analytics: Project insights, metrics, and trend analysis
- Semantic Search: Multi-factor relevance scoring with confidence weighting
- Saved Queries: Template system for common analysis patterns
โก Performance & Scalability
- Multi-Index Storage: Optimized indexing for type, path, name, confidence, framework, language
- LRU Caching: Memory optimization with intelligent cache management
- Performance Monitoring: Real-time operation timing and bottleneck detection
- Query Optimization: Execution planning and index hints for complex queries
๐ฆ Installation
npm install
npm run build
npm start
๐ป Usage Examples
Sample Workflow
# Start with basic scanning:
Please scan the project and get initial statistics.
# Explore analysis features:
Please analyze the project structure and suggest areas of focus.
# Test learning features:
Please update the mind map with information about [task description].
Experimental Analysis Features
# Hebbian Learning - "Neurons that fire together, wire together"
Please show me the Hebbian learning statistics and top co-activation patterns.
# Hierarchical Context - Multi-level awareness
Please get the hierarchical context stats and most relevant context items.
# Attention System - Dynamic focus allocation
Please show the attention system statistics and allocate attention to important nodes.
# Bi-temporal Knowledge - Valid vs Transaction time tracking
Please get bi-temporal statistics and create a context window for this session.
# Pattern Prediction - Anticipatory intelligence
Please get pattern predictions and show emerging patterns.
Advanced Intelligence Features
# Get architectural insights
Please analyze the project architecture and detect design patterns.
# Find cross-language dependencies
Please detect cross-language dependencies in this polyglot project.
# Get intelligent refactoring suggestions
Please generate multi-language refactoring suggestions focused on architecture.
# Predict emerging code patterns
Please analyze and predict what code patterns are likely to emerge.
Development Tool Integration
# Detect available tools
Please detect all development tools available in this project.
# Run comprehensive analysis
Please run the full tool suite and provide aggregated results.
# Get tool recommendations
Please recommend missing development tools that would benefit this project.
๐ Documentation
How It Works
1. Advanced Project Analysis
The server performs comprehensive scanning and creates nodes for:
- Files & Directories: Complete project structure with metadata
- AST Elements: Functions, classes, interfaces, imports/exports with full signatures
- Architectural Patterns: 7 pattern types with confidence scoring
- Framework Detection: React, Vue, Express, Django, Flask, pandas, NumPy, etc.
- Error Patterns: Historical error categorization and solution mapping
2. Multi-Language AST Parsing
Full support for 12 major programming languages:
- Original Languages:
- TypeScript/JavaScript: Complete AST with function/class extraction via TypeScript compiler API
- Python: Full AST parsing with subprocess execution for functions, classes, decorators
- Java: Complete AST parsing with java-parser for classes, methods, annotations, Spring Boot detection
- Go: Go AST parsing with struct/interface/function extraction and framework detection
- Rust: Rust AST analysis with struct/trait/impl extraction and crate dependency mapping
- C/C++: C++ parsing with class/function/template extraction and build system analysis
- NEW Languages (v1.1.4):
- PHP: Complete AST with class/method extraction and Laravel/Symfony framework detection
- C#: Full AST parsing with ASP.NET/Entity Framework detection and namespace analysis
- Ruby: Ruby AST with class/method extraction and Rails/Sinatra framework detection
- Swift: Swift AST parsing with UIKit/SwiftUI framework detection and protocol analysis
- Kotlin: Kotlin AST with Android/Compose framework detection and coroutine analysis
- Scala: Scala AST parsing with Akka/Play framework detection and trait analysis
3. Brain-Inspired Intelligence (Phase 6) ๐ง
Revolutionary neuromorphic computing principles applied to code intelligence:
- Associative Memory Networks: Neural activation spreading replaces linear search (50 - 70% relevance improvement)
- Context-Aware Caching: Intelligent similarity matching with LRU eviction (5 - 10x performance boost)
- Parallel Processing Engine: Worker pool orchestration with chunked analysis (3 - 5x faster scanning)
- Neuromorphic Query Patterns: Brain-like activation across connected code concepts
- Intelligent Memory Management: 100MB cache with path-based invalidation and exponential decay
- Episodic Memory System (NEW v1.1.4): Store and retrieve programming experiences with 77.1% similarity matching accuracy and experience-based suggestions with 81.1% confidence
4. Intelligent Learning System
As you use Claude Code, the server:
- Tracks Task Outcomes: Success/failure patterns with confidence adjustment
- Maps Error Solutions: Categorizes errors and associates with successful fixes
- Builds Pattern Recognition: Framework usage, naming conventions, architectural insights
- Optimizes Performance: LRU caching and multi-index storage for faster queries
5. Enterprise Query Engine
Advanced querying capabilities include:
- Cypher-like Syntax: Complex graph traversal with filtering and aggregation
- Semantic Search: Multi-factor relevance scoring (exact, path, confidence, recency)
- Temporal Analysis: Code evolution tracking and change impact assessment
- Predictive Analytics: Error risk assessment and fix suggestion engine
6. Cross-Session Intelligence
All learning persists locally with:
- Graph Database: Nodes, edges, and relationship storage in JSON format
- Performance Monitoring: Operation timing and bottleneck detection
- Query Optimization: Execution planning and index hints
- Cache Management: LRU eviction and intelligent memory optimization
Data Storage
The mind map data is stored locally in your project directory:
your-project/
โโโ .mindmap-cache/
โ โโโ mindmap.json # Serialized knowledge graph
โโโ ... (your project files)
Privacy & Security
- Local-Only: All data stays on your machine
- No Network: No external API calls or data transmission
- Configurable: Choose what gets tracked
- Transparent: All data stored in readable JSON format
Development
npm run dev
npm run type-check
npm run lint
npm test
Architecture
The server consists of several key components:
- MindMapEngine: Core intelligence and query processing
- MindMapStorage: Graph database operations and persistence
- FileScanner: Project analysis and file classification
- MCP Server: Protocol implementation and tool handling
Roadmap
โ
Completed (Phases 1 - 5.9)
- Core MCP Server: 25 tools with stdio transport
- Multi-Language AST Analysis: 12 languages (TypeScript/JavaScript/Python/Java/Go/Rust/C++/PHP/C#/Ruby/Swift/Kotlin/Scala) with comprehensive parsing
- Cross-Language Intelligence: Dependency detection, polyglot analysis, multi-language refactoring
- Development Tooling Integration: 100+ tools across 12 languages with intelligent execution and parsing
- Enhanced Framework Detection: 60+ frameworks across 6 categories (web, mobile, desktop, game, ML/AI, cloud)
- Advanced Intelligence: Predictive errors, fix suggestions, architectural patterns, risk analysis
- Enterprise Querying: Cypher-like queries, temporal analysis, aggregates, saved queries
- Performance Systems: Multi-index storage, LRU caching, monitoring, insights
๐ง Completed Multi-Language Support (Phase 5)
- Phase 5.1: โ
Python AST support with Flask/Django detection
- Phase 5.2: โ
Java AST support with Spring Boot/Maven/Gradle detection
- Phase 5.3: โ
Go AST support with Gin/Echo framework detection
- Phase 5.4: โ
Rust AST support with Actix/Tokio/Serde detection
- Phase 5.5: โ
C/C++ AST support with Qt/Boost/CMake detection
- Phase 5.7: โ
Multi-Language Intelligence with cross-language dependency detection
- Phase 5.8: โ
Language-Specific Tooling Integration with 80+ development tools
- Phase 5.9: โ
Enhanced Framework Detection across 6 categories with 25+ frameworks
๐ Version History
v1.4.0 (Current) ๐
- โ
Enhanced Query System: Comprehensive improvements to core query functionality
- โ
Multi-Word Query Support: Perfect handling of queries like "mind map", "pattern analysis"
- โ
Semantic Language Mapping: "typescript" finds .ts files, "javascript" finds .js files
- โ
Exact File Path Matching: Direct file queries like "src/core/MindMapEngine.ts"
- โ
Advanced CamelCase Handling: Full support for camelCase, PascalCase, and mixed case queries
- โ
Improved Temporal Queries: Enhanced time-based analysis with evolution metrics
- โ
Better Advanced Query Engine: Cypher-like syntax improvements for complex graph queries
- โ
Enhanced Aggregate Queries: Improved grouping and field extraction for statistical analysis
v1.3.1
- โ
Fixed Java Code Structure Recognition: Resolved Java class/method extraction issues
- โ
Enhanced Java AST Parsing: Complete Java file code intelligence with proper node separation
v1.1.5
- โ
Advanced Call Pattern Analysis: Complete function call graph construction with 100% test success rate
- โ
Constructor Call Detection: Accurate class instantiation and constructor pattern recognition
- โ
Enhanced Complexity Calculation: Improved cyclomatic complexity with callback functions and control flow
- โ
Code Style Recognition: Comprehensive naming convention and style pattern analysis (camelCase, PascalCase, snake_case)
- โ
CI/CD Pipeline Infrastructure: Complete automation with testing, security scanning, and performance monitoring
- โ
Release Automation: Automated NPM publishing with GitHub release workflows
- โ
Pull Request Validation: Comprehensive PR checks with impact analysis and quality gates
v1.1.4
- โ
12 Programming Languages + Episodic Memory System
- โ
Added comprehensive support for PHP, C#, Ruby, Swift, Kotlin, and Scala
- โ
Complete AST parsing and framework detection
- โ
Brain-inspired episodic memory with 77.1% similarity matching accuracy
v1.1.0 - 1.1.3
- โ
Multi-modal confidence fusion and brain-inspired intelligence platform
- โ
Performance optimization and cache improvements
- โ
Enhanced query description with semantic search capabilities
v1.0.1
- โ
Enhanced README with comprehensive Claude Code integration guide
- โ
Added step-by-step installation instructions
- โ
Included usage examples and workflow guides
- โ
Added troubleshooting section and verification checklist
v1.0.0
- โ
Complete brain-inspired intelligence system
- โ
Enterprise scalability and user customization
- โ
Organized test suite with proper structure
- โ
33 advanced MCP tools fully functional
- โ
Multi-language support (6 languages)
- โ
80+ development tools integration
๐ฎ Future Roadmap
- Visual Interface: Mind map visualization and exploration
- Team Sharing: Collaborative knowledge base
- IDE Integrations: VS Code, IntelliJ, Vim plugins
- Advanced ML: Enhanced neural pattern recognition
๐ง Technical Details
Available MCP Tools (27 Total)
Core Intelligence Tools
scan_project: Initial project analysis with AST parsing and pattern detection
query_mindmap: Semantic search with confidence scoring and relevance ranking
update_mindmap: Learning system for task outcomes and error patterns
suggest_exploration: Intelligent file/function recommendations
get_context: Project overview and contextual information
get_stats: Comprehensive project statistics and metrics
Advanced Analysis Tools
predict_errors: Risk analysis and error prediction based on patterns
suggest_fixes: Context-aware fix recommendations for error patterns
analyze_architecture: Detect architectural patterns and design insights
advanced_query: Cypher-like graph queries with complex filtering
temporal_query: Code evolution and change impact analysis
aggregate_query: Project metrics, insights, and trend analysis
Performance & Utility Tools
get_performance: Real-time performance monitoring and bottleneck detection
get_cache_stats: Query cache performance metrics and memory usage statistics
clear_cache: Intelligent cache invalidation with selective path-based clearing
save_query: Save and manage reusable query templates
execute_saved_query: Run saved queries with parameter substitution
get_insights: Comprehensive project insights with actionable recommendations
Multi-Language Intelligence Tools
detect_cross_language_deps: Identify cross-language dependencies and communication patterns
analyze_polyglot_project: Analyze multi-language project structure and architecture
generate_multi_language_refactorings: Generate refactoring suggestions for polyglot codebases
Development Tooling Integration
detect_project_tooling: Detect available development tools across all languages in the project
run_language_tool: Execute specific development tools with intelligent issue parsing
get_tooling_recommendations: Get intelligent recommendations for missing development tools
run_tool_suite: Run multiple development tools in parallel with aggregated results
Enhanced Framework Detection
detect_enhanced_frameworks: Comprehensive framework detection across web, mobile, desktop, game, ML/AI, and cloud categories
get_framework_recommendations: Get intelligent recommendations based on detected frameworks and project patterns
Example Usage
{
"name": "scan_project",
"arguments": {
"force_rescan": false,
"include_analysis": true,
"ast_analysis": true
}
}
{
"name": "advanced_query",
"arguments": {
"query": "MATCH (f:file)-[:contains]->(func:function) WHERE func.name CONTAINS 'auth' RETURN f.path, func.name",
"limit": 10
}
}
{
"name": "predict_errors",
"arguments": {
"file_path": "src/auth/login.ts",
"context": "implementing OAuth integration"
}
}
Troubleshooting
Common Issues:
- "No MCP tools visible" โ Restart Claude after configuration
- "Command not found" โ Ensure npm global install path is in PATH
- "Permission denied" โ Run
npm config get prefix and check permissions
- "Server not responding" โ Check Claude Desktop config file syntax
Get Help:
- ๐ Check
QUICK_USAGE.md for workflow examples
- ๐ Read
CLAUDE_CODE_SETUP.md for detailed setup
- ๐ Report issues: https://github.com/nerfels/mind-map/issues
๐ License
MIT License - see LICENSE file for details.
Support
- Report issues on GitHub
- Check the troubleshooting guide in docs/
- Review the API documentation for integration details
โ ๏ธ Important Note
This is experimental software developed for research and testing purposes. It explores various approaches to code analysis and project understanding using Model Context Protocol (MCP). Before using, expect bugs, incomplete features, and breaking changes. Use in non-production environments only, backup your projects before extensive use, and report issues and provide feedback to help improve the project.
๐ก Usage Tip
You can experiment with various commands in Claude after installation. For example, start with basic scanning commands like "Please scan the project and get initial statistics.", then explore analysis and learning features.