# py-xiaozhi [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/huangjunsen0406/py-xiaozhi  
**GitHub Stars:** 3569  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/py-xiaozhi

## Description
Open-source AI assistant ecosystem with MCP integrations, multimodal workflows, IoT support, and cross-platform voice interaction.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/huangjunsen0406/py-xiaozhi), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
git clone https://github.com/huangjunsen0406/py-xiaozhi.git
```

2. Run:

```sh
cd py-xiaozhi
```

3. Install:

```sh
uv sync                                    # Recommended (uv users)
```

4. Install:

```sh
uv sync --extra gui                        # Recommended (uv users)
```

## Documentation

## What py-xiaozhi does

py-xiaozhi combines multimodal AI interaction with local device and hardware control. Its MCP layer exposes JSON-RPC 2.0 tools for camera access, screenshots, application management, weather information, and volume control. The framework also supports external plugins imported from ZIP archives or folders, including examples for music, radio, podcasts, and Home Assistant.

The broader runtime is designed for real-time voice streaming, vision-language tasks, and IoT use cases. It can run on Windows, macOS, Linux, and ARM platforms such as Raspberry Pi, Horizon Robotics RDK, and Jetson Nano. Desktop, terminal, and GPIO-oriented interfaces are supported through separate UI modes.

## How it works

An asyncio-based event loop coordinates the application, protocol, UI, audio, and MCP components. Dependency injection manages component lifecycles, while an event-driven plugin system loads audio, interface, and tool components. Conversation state moves among idle, listening, speaking, and notification phases as wake actions, protocol events, speech output, and server notifications occur.

Voice traffic uses Opus with asynchronous streaming and automatic frame detection. Audio playback is separated into media playback, mixing, and FFmpeg decoding layers, with resampling and WebRTC-based acoustic echo cancellation. WebSocket and MQTT are available for protocol communication, with WSS/TLS encryption and automatic reconnection.

## Setup and configuration

The runtime requires Python 3.10 through 3.12, a supported Windows 10+, macOS 10.15+, or Linux system, microphone and speaker hardware, and a stable internet connection for AI services and online features. The recommended baseline is at least 4 GB of memory, 2 GB of available storage, a modern AVX-capable processor, and audio devices that support 16 kHz sampling.

Configuration uses a hierarchical system with dot-notation access and dynamic updates. The `XIAOZHI_LANG` setting can override the interface language. Simplified Chinese, English, and Vietnamese are built in, and language changes can take effect without restarting the application.

## Tools and capabilities

- Camera capture and vision-language workflows
- Screenshot capture
- Application management
- Weather access
- Volume control
- External ZIP or folder plugins
- GPIO interfaces for robotics, actuation, and sensors
- Offline wake-word detection through Sherpa-ONNX
- WebSocket or MQTT communication with encrypted transport

## Limitations and notes

Camera functions require a camera and OpenCV support. Offline wake-word operation requires downloaded Sherpa-ONNX speech-recognition models. Voice and online AI features depend on network access and suitable audio hardware. The project targets Python 3.10–3.12 and lists Windows, macOS, Linux, and selected ARM platforms as supported environments.

The MCP ecosystem is part of a larger voice and hardware framework rather than an isolated API connector. External plugins expand the available functions, but each plugin may introduce its own dependencies and device requirements. Tool permission management and API access control are included as security mechanisms, alongside certificate verification for encrypted communication.

_Full upstream README: https://allmcps.com/mcp/py-xiaozhi/readme_

