xiaozhi-esp32 -java
小智ESP32的Java企业级管理平台,提供设备监控、音色定制、角色切换和对话记录管理的前后端及服务端一体化解决方案
claude mcp add --transport stdio joey-zhou-xiaozhi-esp32-server-java docker run -i joey-zhou/xiaozhi-esp32-server-java \ --env REDIS_HOST="<REDIS_HOST>" \ --env REDIS_PORT="<REDIS_PORT>" \ --env SPRING_DATASOURCE_URL="jdbc:mysql://<HOST>:<PORT>/<DB_NAME>" \ --env SPRING_DATASOURCE_PASSWORD="<DB_PASSWORD>" \ --env SPRING_DATASOURCE_USERNAME="<DB_USERNAME>"
How to use
Xiaozhi ESP32 Server Java provides a complete back-end and front-end management platform for Xiaozhi ESP32 devices. The server uses Spring Boot for the back end and Vue.js with Ant Design for the front end, backed by MySQL and Redis for data storage and caching. The system exposes a management UI to configure devices, users, roles, and conversations, and it also offers MCP integration points (via SSE MCP) for extending capabilities with other tools and services. You can access the web UI to manage devices, view chat history, configure LLMs, and set up hooks and agents. For programmatic access, the server exposes REST APIs and real-time channels (WebSocket/SSE) to monitor device state, issue commands, and coordinate actions across a fleet of ESP32 devices. The included MCP integration points allow you to connect additional tools and services and orchestrate multi-step workflows within the platform.
How to install
Prerequisites:
- Docker and Docker Compose (recommended) or a Java runtime if you prefer native deployment
- MySQL and Redis (or use Dockerized versions)
- Git
Option A: Run with Docker (recommended)
- Ensure you have a MySQL and Redis instance available and reachable by the container. Set the connection details in environment variables or a docker-compose file.
- Pull and run the Docker image:
# Using the official image name from the README
docker pull joey-zhou/xiaozhi-esp32-server-java
# Run with required environment variables (adjust values as needed)
docker run -d --name xiaozhi-esp32-server-java \
-e SPRING_DATASOURCE_URL="jdbc:mysql://<HOST>:<PORT>/<DB_NAME>" \
-e SPRING_DATASOURCE_USERNAME="<DB_USERNAME>" \
-e SPRING_DATASOURCE_PASSWORD="<DB_PASSWORD>" \
-e REDIS_HOST="<REDIS_HOST>" \
-e REDIS_PORT="<REDIS_PORT>" \
-p 8080:8080 \
joey-zhou/xiaozhi-esp32-server-java
Option B: Run locally with Java (if you build from source)
- Install Java (OpenJDK 17+), Maven, and a database setup as above.
- Clone the repository and build:
git clone https://github.com/joey-zhou/xiaozhi-esp32-server-java.git
cd xiaozhi-esp32-server-java
mvn clean package -DskipTests
- Run the jar (adjust the path to the built jar):
java -jar target/xiaozhi-esp32-server-java-*.jar
Configuration notes:
- Ensure MySQL and Redis are reachable from the server.
- Configure application.properties or environment variables for DB/Redis connections as needed.
- If you deploy with Docker, consider a docker-compose setup to manage MySQL, Redis, and the server together.
Additional notes
Tips and common considerations:
- The UI is Vue-based and requires the server to serve the backend APIs and the frontend assets. Ensure CORS and API paths are correctly configured if you proxy or host separately.
- For MCP integration, use the SSE MCP endpoints provided by the backend to connect additional tools or services.
- Monitor logs for startup issues related to database connections or port binding. If the server cannot connect to MySQL/Redis, verify network accessibility and credentials.
- Back up configuration and data regularly; enable Redis persistence if using Redis as a cache layer.
- When deploying in production, consider configuring a reverse proxy (e.g., Nginx) and enabling TLS for the web UI endpoints.
Related MCP Servers
mcp-for-beginners
This open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
api2mcp4j
This is a revolutionary AI MCP plugin with excellent pluggable and encapsulated features. With just a few lines of configuration, it can easily integrate into your Spring boot web program and give it MCP capabilities,inheriting the powerful engineering capabilities of the Spring series framework
spring-ai
From Java Dev to AI Engineer: Spring AI Fast Track
springboot-ai -example
Example Spring AI Model Context Protocol (MCP)
auto -client
基于Spring AI 封装了 mcp-client 服务,目的使web网页智能体也能通过 stdio 和 HTTP SSE(Server-Sent Events) 与 MCP Server 进行交互。项目实现了自动化的连接管理机制,包括自动初始化连接、健康检查、超时关闭以及链接复用等功能
esp32 server
A lightweight Model Context Protocol (MCP) server framework for ESP32. Seamlessly connect embedded devices to LLMs.