For detailed architecture documentation, see ../developer/ARCHITECTURE.md
This is a high-level overview of Claude MPM's architecture. For comprehensive technical details, version history, and implementation specifics, refer to the complete architecture documentation in the developer section.
Claude MPM is built on a service-oriented architecture with:
- Service-Oriented Design: Five specialized service domains
- Interface-Based Contracts: Well-defined component interfaces
- Dependency Injection: Loose coupling through DI container
- Lazy Loading: Deferred resource initialization for performance
- Hook System: Event-driven extensibility
- MCP Integration: Model Context Protocol support
- 50-80% Performance Improvement: Lazy loading and intelligent caching
- Enhanced Security: Defense-in-depth with input validation
- Better Testability: Interface-based design enables easy mocking
- Improved Maintainability: Clear separation of concerns
- Scalability: Supports future growth and extensions
Foundation services and interfaces for the entire system.
Agent lifecycle, discovery, and management with three-tier precedence (PROJECT > USER > SYSTEM).
Real-time communication and event streaming via WebSocket and Socket.IO.
Project analysis and workspace management with automatic stack detection.
Cross-cutting concerns including logging, monitoring, and utilities.
Agents are loaded with precedence (highest to lowest):
- PROJECT (
.claude-mpm/agents/) - Project-specific agents - USER (
~/.claude-agents/) - User customizations - SYSTEM (bundled) - Default agents
This allows project-specific customization while maintaining defaults.
Event-driven extension points for pre/post tool execution and session lifecycle.
Persistent, project-specific knowledge using KuzuDB graph storage.
Model Context Protocol integration for external tool development.
Real-time monitoring via WebSocket with live agent activity tracking.
v5.0+ Architecture Improvements:
- Consolidated cache architecture (
~/.claude-mpm/cache/agents/) - Version-aware agent deployment
- ETag-based sync optimization
- 91% latency reduction in hook system (108ms → 10ms)
- Git branch caching with 5-minute TTL
- Non-blocking HTTP fallback
- 50-80% overall performance improvement
- Developer Architecture - Complete technical architecture
- Agent System - Multi-agent orchestration
- User Guide - End-user features
- Extending - Building extensions
- Service Reference - API documentation