Xiaozhi ESP32
小智ESP32的Java企业级管理平台,提供设备监控、音色定制、角色切换和对话记录管理的前后端及服务端一体化解决方案
What is Xiaozhi ESP32?
Xiaozhi ESP32 is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 小智esp32的java企业级管理平台,提供设备监控、音色定制、角色切换和对话记录管理的前后端及服务端一体化解决方案
小智ESP32的Java企业级管理平台,提供设备监控、音色定制、角色切换和对话记录管理的前后端及服务端一体化解决方案
This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- 小智ESP32的Java企业级管理平台,提供设备监控、音色定制、角色切换和对话记录管理的前后端及服务端一体化解决方案
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx xiaozhi-esp32-server-javaConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Xiaozhi ESP32
Xiaozhi ESP32 Server Java is an enterprise-grade Java management platform for the Xiaozhi AI conversational assistant running on ESP32 microcontrollers. It provides a unified backend, REST API, and real-time WebSocket/MQTT pipeline for managing smart devices: monitoring device health, customising voice timbre, switching AI personas, processing speech-to-text and text-to-speech (with support for local and cloud providers), and storing conversation histories. Built with Spring AI, it integrates with multiple LLM providers including OpenAI, Zhipu, iFlytek, Ollama, and Dify, and includes a RAG knowledge-base feature for retrieval-augmented responses on IoT devices.
Prerequisites
- Java 17 or later (Spring Boot application)
- Maven or Gradle build tool
- A running MySQL or compatible database for device and conversation storage
- Git to clone the repository (no published artifact — must be built from source)
- Optional: Docker and Docker Compose for containerised deployment
Clone the repository
Clone the source code from GitHub. There is no pre-built artifact; the project must be compiled from source.
git clone https://github.com/joey-zhou/xiaozhi-esp32-server-java
cd xiaozhi-esp32-server-javaDownload required models and native libraries
Run the provided script to download voice activity detection (VAD) models and any other native libraries needed for local speech processing.
./scripts/download_models.shConfigure the application
Edit the application properties file to set your database connection, LLM provider API keys (e.g. OpenAI, Zhipu, iFlytek), and STT/TTS service credentials. The configuration is managed through Spring Boot property files.
# Edit src/main/resources/application.yml (or .properties)
# Key settings to configure:
# spring.datasource.url=jdbc:mysql://localhost:3306/xiaozhi
# spring.datasource.username=your_db_user
# spring.datasource.password=your_db_password
# LLM provider keys per your chosen providerBuild and start both services
The platform has two services: xiaozhi-server (REST API on port 8091) and xiaozhi-dialogue (WebSocket/MQTT on port 8092). The all.sh script compiles and starts both.
bin/all.sh startVerify services are running
Check service status. Once running, the server outputs the OTA firmware update URL and WebSocket connection address for pairing ESP32 devices.
bin/all.sh statusOptional: deploy with Docker Compose
For production or team deployments, use Docker Compose to run all services and their dependencies in containers.
docker compose up -dXiaozhi ESP32 Examples
Client configuration
MCP config for connecting to the Xiaozhi ESP32 server. Because this is a self-hosted Java server rather than an npx package, the MCP client connects to the running REST API.
{
"mcpServers": {
"xiaozhi-esp32": {
"command": "npx",
"args": ["xiaozhi-esp32-server-java"]
}
}
}Prompts to try
Representative tasks you can perform once an ESP32 device is paired with the running server.
- "Show me a list of connected ESP32 devices and their online status"
- "Switch the AI persona on device ESP32-001 to a friendly assistant voice"
- "Retrieve the last 20 conversation entries from device ESP32-002"
- "Update the TTS voice timbre for all devices to use the warm female voice"
- "Show token usage and response latency metrics for the past 24 hours"Troubleshooting Xiaozhi ESP32
Services fail to start with database connection errors
Ensure MySQL is running and the credentials in application.yml match your database. Run Flyway migrations manually if the schema is not initialised: check the scripts/db directory for migration files.
ESP32 device cannot connect after firmware flash
Verify the WebSocket URL output by the server (port 8092) matches the address hardcoded in the firmware during compilation. Ensure both the server and the ESP32 device are on the same local network or that firewall rules permit the connection.
Local STT/TTS is not working after model download
Confirm the models were placed in the expected directory by download_models.sh. Check the native library paths in the application properties file. Alternatively, switch to a cloud STT/TTS provider (iFlytek, OpenAI Whisper) by updating the provider settings in application.yml.
Frequently Asked Questions about Xiaozhi ESP32
What is Xiaozhi ESP32?
Xiaozhi ESP32 is a Model Context Protocol (MCP) server that 小智esp32的java企业级管理平台,提供设备监控、音色定制、角色切换和对话记录管理的前后端及服务端一体化解决方案 It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Xiaozhi ESP32?
Follow the installation instructions on the Xiaozhi ESP32 GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Xiaozhi ESP32?
Xiaozhi ESP32 works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Xiaozhi ESP32 free to use?
Yes, Xiaozhi ESP32 is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Xiaozhi ESP32 Alternatives — Similar Cloud Services Servers
Looking for alternatives to Xiaozhi ESP32? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
★ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
★ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
★ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
★ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
★ 26.7k本项目为xiaozhi-esp32提供后端服务,帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
★ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
Browse More Cloud Services MCP Servers
Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Xiaozhi ESP32 in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Xiaozhi ESP32?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.