Py Xiaozhi logo

Py Xiaozhi

Python-based multimodal AI framework with MCP tools for cameras, screenshots, apps, weather, volume, and IoT hardware.

Install Py Xiaozhi

Run the project’s own setup commands, in order.

Setup steps from the project

py-xiaozhi installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    git clone https://github.com/huangjunsen0406/py-xiaozhi.git
    
  2. 2. Run
    cd py-xiaozhi
    
  3. 3. Install
    uv sync                                    # Recommended (uv users)
    
  4. 4. Install
    uv sync --extra gui                        # Recommended (uv users)
    

Overview

py-xiaozhi is a Python-based, cross-platform AI interaction framework that includes a modular JSON-RPC 2.0 MCP tool server. It connects multimodal AI workflows with capabilities such as camera access, screenshots, application management, weather, volume control, and external plugins. Async event handling, WebSocket or MQTT communication, and GPIO support make it suitable for voice-enabled desktop clients, headless systems, and embedded hardware. Reach for it when an agent needs to combine voice, vision, local device control, and IoT interactions.

Use cases

  • Control desktop volume and applications through agent tools
  • Capture camera images for vision-language workflows
  • Take screenshots during voice-driven computer interaction
  • Connect an AI assistant to GPIO devices and sensors
  • Extend the tool set with ZIP or folder plugins

Key features

  • JSON-RPC 2.0 MCP tool server
  • Camera and screenshot tools
  • Application, weather, and volume tools
  • ZIP and folder plugin imports
  • GPIO, WebSocket, and MQTT support
  • Async multimodal voice and vision framework

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3.6kStargazers on the source repository.
Last commit2d agoMost recent push to the default branch.

How Py Xiaozhi works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Py Xiaozhi

py-xiaozhi is an MCP server that connects multimodal AI workflows with desktop applications, cameras, audio controls, and IoT hardware. Its main tools cover camera capture, screenshots, application management, weather, and volume control, while external plugins can add functions such as music, radio, podcasts, and Home Assistant integration.

Install py-xiaozhi in a Python 3.10–3.12 environment on Windows, macOS, or Linux, then follow the project's startup documentation. A microphone, speaker, and stable internet connection are required for the basic runtime; camera and wake-word features need their respective hardware or model files.

py-xiaozhi provides camera, screenshot, application-management, weather, and volume tools through its JSON-RPC 2.0 MCP layer. It can also load external ZIP or folder plugins, and the wider framework supports GPIO interfaces for robotics, hardware actuation, and sensor integration.

Yes, py-xiaozhi supports ARM embedded platforms including Raspberry Pi. Its GPIO interface is intended for robotics control, hardware actuation, and sensor integration, while its UI modes can accommodate embedded and headless environments.

Yes, py-xiaozhi supports offline wake-word detection through Sherpa-ONNX. Using that feature requires downloading the relevant speech-recognition models, and custom wake words are supported.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewPy Xiaozhi AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/py-xiaozhi?style=directory)](https://allmcps.com/mcp/py-xiaozhi)
HTML Embed
<a href="https://allmcps.com/mcp/py-xiaozhi"><img src="https://allmcps.com/api/badge/py-xiaozhi?style=directory" alt="Py Xiaozhi on AllMCPs" /></a>