How kesoner/idol_mcp works
Major Components
• Frontend Client:
• React-based user interface
• Live2D model display for emotion-rich visual representation
• Components for chat input, login, and real-time message updates
• Backend Server (MCP Server):
• FastAPI application acting as the central hub for interactions
• Core modules: Persona, Emotion Engine, Memory System, and LLM Service for generating responses
• Database:
• Manages conversation history, user profiles, and memory storage (the README mentions SQLite/MySQL/PostgreSQL)
• External APIs/LLM Service:
• Integration with external language model providers (e.g., Google 2 FLASH or OpenAI GPT)
Out the Relationships and Data Flow
• User Interactions:
• User sends a message via the frontend chat UI.
• Frontend transmits the message to the MCP Server over the API.
• Backend Processing:
• The MCP Server first routes the message to the Persona module (to determine tone and character-specific style).
• The Emotion Engine then calculates any required emotional adjustments.
• The Memory System handles context and stores conversation history.
• The LLM Service is invoked for natural language generation, customized to the avatar’s persona.
• Database Operations:
• Response Flow:
• Once a response is generated, it travels back through the server to the frontend, where it is rendered along with updated Live2D expressions and animations.
Architectural Patterns and Technologies
• Frontend-Backend Separation:
• RESTful API endpoints handling client-server communication.
• Modular and Layered Design:
• Integration Points:
• How the FastAPI server connects to external LLM providers and the database.
• Use of External Packages:
• Mentions of libraries used (e.g., React, FastAPI, SQLite/MySQL/PostgreSQL).
• Testing Layers:
• You might also indicate testing layers on both frontend (Vitest) and backend (pytest) as separate but related components.