MCP ExplorerExplorer

Xiaozhi Mcp Examples

@hlym123on 23 days ago
1 MIT
FreeCommunity
AI Systems
xiaozhi_mcp_examples provides a quick start for testing MCP services with commands and hardware setup.

Overview

What is Xiaozhi Mcp Examples

xiaozhi_mcp_examples is a project designed for testing and demonstrating the functionalities of the MCP control system. It provides examples and tools for developers to interact with various hardware components using the MCP protocol.

Use cases

Use cases include controlling lighting systems, monitoring temperature and humidity, and integrating various sensors and devices for automated home environments.

How to use

To use xiaozhi_mcp_examples, clone the repository from GitHub, install the required dependencies, set up the MCP_ENDPOINT from the xiaozhi console, and run the MCP service using the provided Python scripts. You can also test commands and hardware interactions.

Key features

Key features include easy setup through GitHub, support for various hardware components like sensors and controllers, command testing via MQTT, and voice command functionality for smart home automation.

Where to use

xiaozhi_mcp_examples can be used in smart home applications, IoT projects, and educational purposes where users want to learn about hardware control and automation using the MCP protocol.

Content

MCP 控制测试


快速开始

git clone https://github.com/hlym123/xiaozhi_mcp_examples.git
cd xiaozhi_mcp_examples
pip install -r irequirement

设置 MCP_ENDPOINT

先获取你设备的 MCP_ENDPOINT,进入 xiaozhi 控制台 ,点击配置角色,再点击右下角的 MCP接入点,复制。

export MCP_ENDPOINT=<you_mcp_endpoint>

运行 MCP 服务

python mcp_pipe.py server.py

命令测试

# 发布消息测试
mosquitto_pub -h test.mosquitto.org -t esp32/temphumi -m '{"temperature":24.8,"humidity":55.3}'
# 订阅消息测试
mosquitto_sub -h test.mosquitto.org -t "esp32/rgbled"
# 订阅消息测试
mosquitto_sub -h test.mosquitto.org -t "esp32/fan"

唤醒 xiaozhi,语音对话,说 “开灯,关灯,获取温湿度” 等命令测试。

硬件测试

硬件准备:

  1. 复制程序 m5_device.py 内容到编辑区
  1. 连接设备
  1. 运行程序

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers