xiaozhi-bridge

xiaozhi-bridge

Connects a Xiaozhi AI voice agent to a Windows PC, enabling autonomous control via 58 MCP tools for screen vision, web browsing, file management, and system control.

Category
访问服务器

README

🦞 PURPCLAW v7.0 — ULTIMATE

The AI Voice Agent MCP Bridge — Gives your Xiaozhi AI hardware full autonomous PC control via 58 MCP tools. Built by WEEMADSCOTSMAN at Pixel Dynasty.

🚀 New Here? Read the Full Setup Guide →

The setup guide covers everything from buying the hardware to your first voice command. Anyone with a Xiaozhi ball can use this.

What Is This?

PURPCLAW is an MCP (Model Context Protocol) bridge that connects a Xiaozhi AI voice agent to your Windows PC. It turns a voice-enabled AI ball into a fully autonomous engineering assistant that can:

  • 🖥️ See your screen — Screenshots + OCR text recognition
  • 📸 See YOU — Webcam capture, face/object detection
  • 🌐 Browse the web — Playwright-powered: click links, fill forms, read pages
  • 📁 Manage files — Read, write, copy, move, delete, search, zip/extract
  • 🖱️ Control your desktop — Mouse clicks, keyboard typing, window management
  • ⬇️ Download files — Direct URL downloads
  • 📦 Install packages — pip, npm, or choco
  • 🔊 Control audio — Volume up/down/mute/set
  • 🔧 Run commands — Shell execution with injection protection
  • 🧠 Remember things — Persistent memory across sessions
  • 🦞 Run AI pipelines — Start/stop/monitor PURPCLAW build pipelines

Architecture

┌──────────────────┐     WebSocket      ┌──────────────────┐
│   Xiaozhi Ball   │ ◄──────────────── │  xiaozhi_bridge   │
│  (DeepSeek V3.1) │   MCP Protocol    │     v7.0.0        │
└──────────────────┘                   └────────┬─────────┘
                                                │
                              ┌─────────────────┼─────────────────┐
                              │                 │                 │
                        ┌─────┴─────┐   ┌──────┴──────┐   ┌─────┴─────┐
                        │ Playwright │   │ PowerShell  │   │  Python   │
                        │  Browser   │   │  .NET APIs  │   │  OpenCV   │
                        └───────────┘   └─────────────┘   └───────────┘

58 MCP Tools

Vision (5)

Tool Description
screen_capture Screenshot the screen
screen_ocr Read text from screen via OCR
screen_find_object Detect objects with YOLO
screen_find_template Find image on screen (template match)
screen_info Get monitor sizes

Webcam (3)

Tool Description
webcam_look Take a photo with PC webcam
webcam_detect Detect people/faces/objects
webcam_read OCR text visible to camera

Mouse & Keyboard (3)

Tool Description
mouse_click Click, double-click, right-click, drag
mouse_scroll Scroll wheel
keyboard_type Type text or press shortcuts

UI Automation (1)

Tool Description
find_and_click Find and click UI elements by text

Window Management (3)

Tool Description
window_list List open windows
window_focus Focus a window by title
window_close Close a window

File System (8)

Tool Description
file_read Read file contents
file_write Write/append to files
file_list List directory contents
file_search Search by name or content (Node.js, fast)
file_copy Copy files/directories
file_move Move/rename files
file_delete Delete files (system path protected)
dir_create Create directories

Browser (9) — Playwright-Powered

Tool Description
browser_open Open URL with full interaction
browser_click Click links/buttons by visible text
browser_type Type into form fields
browser_scroll Scroll pages up/down
browser_get_content Read page text content
browser_screenshot Screenshot the browser
browser_navigate Navigate: goto/back/forward/reload
browser_tabs List open tabs
browser_close_tab Close a tab

Downloads (1)

Tool Description
download_file Download file from URL

Process Management (2)

Tool Description
process_list List running processes
process_kill Kill process by name/PID (critical procs blocked)

Audio (1)

Tool Description
volume_control Set volume, mute/unmute, up/down

Archives (2)

Tool Description
zip_create Create zip archives
zip_extract Extract zip archives

Package Management (1)

Tool Description
install_package Install via pip/npm/choco

PURPCLAW Pipeline (4)

Tool Description
purpclaw_start Start AI build pipeline
purpclaw_stop Stop pipeline
purpclaw_status Get pipeline status
purpclaw_logs Read pipeline logs

Git (1)

Tool Description
git_command Run git commands

Communication (4)

Tool Description
http_request HTTP GET/POST/PUT/DELETE
clipboard Read/write clipboard
speak Text-to-speech via Kokoro TTS
notification Desktop toast notifications

Context & System (5)

Tool Description
active_window Get focused window info
system_status CPU, RAM, process overview
disk_info Drive space for all disks
network_info IP, WiFi, internet status
execute_command Execute shell commands (injection-proof)

Apps & Tasks (4)

Tool Description
open_application Launch apps by name
memory Persistent remember/recall/forget/list
task_schedule Schedule delayed tasks
task_list List scheduled tasks

Setup

Prerequisites

  • Node.js 18+
  • Python 3.10+ with opencv-python
  • Playwright (npm i playwright)
  • Xiaozhi.me account + configured agent

Install

git clone https://github.com/weemadscotsman/purpclaw.git
cd purpclaw
npm install
cp .env.example .env
# Edit .env with your Xiaozhi MCP token

Run

# Windows (recommended)
start_xiaozhi_bridge.bat

# Or manually
set XIAOZHI_MCP_URL=wss://api.xiaozhi.me/mcp/?token=YOUR_TOKEN
node lib/xiaozhi_bridge.js

Environment Variables

Variable Description
XIAOZHI_MCP_URL WebSocket URL from Xiaozhi MCP settings
OPENCLAW_GATEWAY OpenClaw WebSocket (default: ws://127.0.0.1:18789)
MCP_BRIDGE_URL Bridge HTTP server (default: http://localhost:3001)

Security

  • Shell injection protection — All user input is sanitized via san() function
  • System path protection — Cannot delete Windows/Program Files/AppData
  • Critical process protection — Cannot kill explorer, csrss, lsass, svchost
  • Destructive command blocking — Blocks format, recursive system deletes, shutdown
  • Tool timeout — Every tool has a timeout to prevent hanging

Tech Stack

  • Runtime: Node.js (single-process, async event loop)
  • Browser: Playwright (Chromium, headless: false)
  • Vision: Python OpenCV + Haar cascade face detection
  • Screen: .NET System.Drawing (fast screenshot via PowerShell)
  • Shell: PowerShell -NoProfile -NonInteractive (fast startup)
  • Protocol: MCP over WebSocket (JSON-RPC 2.0)

Built With

Created by Eddie Cannon (@weemadscotsman) — Edinburgh, Scotland 🏴󠁧󠁢󠁳󠁣󠁴󠁿

  • Pixel Dynasty — Gaming Archive & Collab Hub
  • NDK Threadsndkthreads.com
  • PixelBits420 — Fair-launch cryptocurrency

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选