07-architecture.mdโข1.18 kB
## ๐ญ Architecture
### System Overview
DollhouseMCP follows a modular, extensible architecture built on the Model Context Protocol (MCP) standard.
### Core Components
#### MCP Server
- **Transport**: StdioServerTransport for Claude Desktop integration
- **Protocol**: JSON-RPC 2.0 communication
- **Tools**: 41 MCP tools for comprehensive functionality
#### Element System
- **BaseElement**: Abstract base class for all elements
- **IElement Interface**: Common contract for elements
- **Element Types**: Personas, Skills, Templates, Agents, Memories, Ensembles
#### Portfolio Manager
- **Local Storage**: File-based element storage
- **GitHub Sync**: Git-based synchronization
- **Version Control**: Full git integration
#### Security Layer
- **Input Validation**: All inputs sanitized
- **Path Security**: Traversal prevention
- **Token Management**: Encrypted storage
### Data Flow
1. **Client Request** โ MCP Server
2. **Tool Routing** โ Appropriate handler
3. **Element Processing** โ Element system
4. **Storage** โ Portfolio manager
5. **Response** โ Client
For detailed architecture documentation, see [Architecture Guide](docs/ARCHITECTURE.md).