Skip to content

internet-dot/purpclaw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🦞 PURPCLAW v7.0 β€” ULTIMATE

The AI Voice Agent MCP Bridge β€” Gives your Xiaozhi AI hardware full autonomous PC control via 66 MCP tools. Built by WEEMADSCOTSMAN at Pixel Dynasty.

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   β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

66 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 Threads β€” ndkthreads.com
  • PixelBits420 β€” Fair-launch cryptocurrency

License

MIT

About

PURPCLAW v6.0 57-tool MCP bridge for Xiaozhi AI voice agent. Full PC autonomy: Playwright browser, webcam vision, file ops, process management, audio control.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors