Content
## This project is based on Xia Ge MCP implementation
Original project address: https://github.com/78/mcp-calculator
## Video Showcase
https://www.bilibili.com/video/BV1TpTNzbE3u/?vd_source=3cdb33659e80ec67cacea8b3ce284283
## Environment Requirements
- Python 3.7+
- websockets>=11.0.3
- python-dotenv>=1.0.0
- mcp>=1.8.1
- pydantic>=2.11.4
## Environment Setup
### Method 1: venv Environment (Recommended)
#### macOS/Linux Users
```bash
# Automatically set up the environment
./setup_venv.sh
# Activate the environment
./activate_venv.sh
# Or activate manually: source venv/bin/activate
# Run the project
python mcp_pipe.py yo_mcp.py
```
#### Windows Users
```cmd
# Automatically set up the environment
setup_venv.bat
# Activate the environment
activate_venv.bat
# Or activate manually: venv\Scripts\activate.bat
# Run the project
python mcp_pipe.py yo_mcp.py
```
### Method 2: conda Environment (Traditional Method)
```bash
# Create conda environment
conda create -n xiaozhi-mcp python=3.10
# Activate the environment
conda activate xiaozhi-mcp
# Install dependencies
pip install -r requirements.txt
```
> **💡 It is recommended to use the venv environment**: lighter, more standard, and faster to start.
>
> - For detailed instructions, please refer to [VENV_SETUP.md](VENV_SETUP.md)
> - Windows user guide: [WINDOWS_GUIDE.md](WINDOWS_GUIDE.md)
## Configuration
After installing the dependencies, don't forget to create a .env file with the following content:
```bash
# Xiaozhi MCP MCP access point address
MCP_ENDPOINT = wss://api.xiaozhi.me/mcp/?token=xxx
# Visual recognition related configuration
# Whether to enable the IP camera MCP. If there is no camera, set this value to false; otherwise, set it to true.
ENABLED_IP_CAMERA = false
# ONVIF camera IP address
ONVIF_CAMERA_IP = 192.168.10.143
# ONVIF camera port, the port for Tiandy cameras is 80; modify according to your camera's port
ONVIF_CAMERA_PORT = 80
# ONVIF camera username
ONVIF_CAMERA_USERNAME = admin
# ONVIF camera password
ONVIF_CAMERA_PASSWORD = 123456
# Whether to enable ONVIF PTZ control (can be enabled for cameras with PTZ; if not enabled, control registration will not be activated)
ONVIF_CAMERA_PTZ_ENABLED = false
# Whether to enable ONVIF camera recognition and save logs
ONVIF_CAMERA_LOG = false
# Whether to enable ONVIF screenshot saving to local
ONVIF_CAMERA_CAPTURE = false
# Home Assistant related configuration
# Home Assistant service address
HA_ADDRESS = http://192.168.1.197:8123
# Home Assistant access token
HA_AUTH_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.xxxxxx
```
## Start
```bash
python mcp_pipe.py yo_mcp.py
```
# If you find this useful, don't forget to give it a star for support!
**Note!!!! Due to the control of PC devices and other functions being implemented based on macOS, Windows users will need to modify it themselves.**
Connection Info
You Might Also Like
Continue
Continue is an open-source project for seamless server management.
repomix
Repomix packages your codebase into AI-friendly formats for enhanced coding.
Mastra
Mastra is an AI-powered framework developed by the Gatsby team.
django-mcp-server
Django MCP Server is a Django extensions to easily enable AI Agents to...
admin
Define and compose secure MCPs in TypeScript. Generate AI workflows and...
Windows-MCP.Net
A .NET-based Windows MCP server for desktop automation and AI interaction.