Content
<div align="center">
# Tool List
**Visual Desktop Automation Flow Editor — Drag-and-Drop, Everything Controllable**
[](https://www.electronjs.org/)
[](https://reactjs.org/)
[](https://www.typescriptlang.org/)
[](https://www.python.org/)
[](https://vitejs.dev/)
[](https://github.com/zoujiapeng/lingdong-script)
[](https://github.com/zoujiapeng/lingdong-script)
</div>
Lingdong Script is a **visual desktop automation flow editor**, create automation scripts by drag-and-drop flowchart editing. No coding required.
Three ways to use: ① Manual flowchart editing ② Built-in AI assistant (natural language to DSL) ③ Claude Code / MCP remote control.
Issues:
1. The packaged version does not include Python, requiring a complete environment.
2. Complex processes have not been thoroughly tested on real machines, resulting in fewer usable instructions.
3. The interface may flicker and needs to be fixed.
---
## Architecture Highlights
After in-depth architecture optimization, key indicators have significantly improved:
| Metric | Before | After |
|---|---|---|
| Python cold start | 2-8s | 20ms (400x) |
| Frontend JS volume | 1.17 MB (single file) | 298 KB (code splitting and parallel loading) |
| Concurrent Python processes | Unlimited (OOM risk) | Max 3 (queued) |
| Scheduler crash | Silent death | 2s auto-restart |
| Condition evaluation | Infinite blocking | 30s timeout |
| Frontend rendering | Global re-rendering | Precise selector + React.memo |
| File I/O (hot path) | Synchronous fs (blocking main process) | Asynchronous fsp |
| isDev detection | `!process.resourcesPath` (always false) | `!app.isPackaged` (standard API) |
---
### Core Features
#### Visual Flow Editor
- **Drag-and-Drop** — Intuitive flowchart editing interface, 100+ node types
- **Real-time Connection** — Define execution order and conditional branches between nodes
- **Property Panel** — Edit node parameters directly in the panel (including area picking and strategy selection)
- **Three-View Mode** — Flowchart / pseudocode / settings, freely switchable
- **Adaptive Scaling** — One-click adaptation of canvas to view window
#### Smart Node Library
| Category | Node Count | Function |
|------|--------|------|
| Mouse Actions | ~15 | Click/double-click/right-click/drag/hover/scroll |
| Keyboard Input | ~5 | Input text/hotkeys/combination keys |
| Image Recognition | ~8 | Find image click/OCR text click/color detection |
| Conditional Control | ~12 | Conditional branching/looping/scene judgment/variable comparison |
| Waiting and Synchronization | ~6 | Timing wait/image appearance/area stability/progress bar |
| Pop-up Handling | ~3 | Automatic pop-up closure/multi-strategy combination |
| System Tools | ~15 | Run program/clipboard/file operation/process management |
| AI Assistance | ~10 | AI planning/automatic generation/intelligent debugging |
| Macro Recording | ~8 | Recording/playback/convert to flowchart |
| Variable Tools | ~5 | Variable setting/getting/operation |
| Debugging Tools | ~10 | Log/breakpoint/state view |
| DSL Tools | ~5 | DSL conversion/execution |
#### Macro Recording
- **F6 Hotkey** — Independent process recording, does not block UI
- **Smart Filtering** — Automatically skip tiny mouse movements <10px
- **One-Click to Flowchart** — Automatically convert recorded macro to visual nodes
- **Playback Control** — Support speed adjustment/loop playback
#### AI Assistance
- **Natural Language Generation** — Describe requirements in natural language, AI automatically generates DSL and converts to flowchart
- **Intelligent Completion** — AI recommends next operation node
- **Multiple LLM** — Supports DeepSeek, OpenAI, and other compatible interfaces
#### DSL Scripting
Lingdong Script has a built-in domain-specific language (DSL) that supports text-based editing mode:
```
CLICK 500 400
INPUT_TEXT 300 500 "username"
HOTKEY Tab
INPUT_TEXT 300 500 "password123"
CLICK_TEXT "login"
WAIT 3
IF COLOR_CHECK 100 200 50 30 #4CAF50
CLICK_TEXT "confirm"
END
```
#### @feature Tool Registry
- **160+ Registered Tools** — Declared through `@feature` decorator, automatically generates MCP/CLI/HTTP interfaces
- **Lazy Loading** — Loaded on demand when first accessed, 20ms cold start
- **MCP Protocol Support** — Provides both Python and TypeScript MCP servers
- **HTTP API Bridging** — `127.0.0.1:5577` provides 45+ RESTful endpoints
#### Other Features
- **Area Selector** — Full-screen selector for picking coordinates/areas
- **Wheel Selector** — Visual wheel option selection
- **OCR Recognition** — Screen text recognition and positioning
- **Template System** — Save/load common process templates
- **Undo/Redo** — Complete operation history
- **Timer Scheduling** — Supports cron/interval/startup triggers + condition guards
---
### Quick Start
#### Download and Install
Download the latest portable version from [Releases](https://github.com/zoujiapeng/lingdong-script/releases), extract, and run `lingdong-script.exe`.
#### Build from Source
```bash
# Clone repository
git clone https://github.com/zoujiapeng/lingdong-script.git
cd lingdong-script
# Install dependencies
npm install
# Development mode (Vite HMR + Electron)
npm run dev
# Build production version
npm run build
# Build portable version
npx electron-builder --win portable
```
---
### HTTP API Bridging
The Electron main process has a built-in HTTP server `127.0.0.1:5577`, and Claude Code can control the frontend in real-time through curl:
```bash
# Health check
curl -X POST http://127.0.0.1:5577/api/ping
# DSL → Flowchart → Load to frontend
curl -X POST http://127.0.0.1:5577/api/run-dsl \
-H "Content-Type: application/json" \
-d '{"dsl":"CLICK 500 400\nWAIT 2\nSCREENSHOT"}'
# Add node
curl -X POST http://127.0.0.1:5577/api/add-node \
-H "Content-Type: application/json" \
-d '{"type":"click","x":200,"y":150,"params":{"x":500,"y":600}}'
# Check node parameters
curl -X POST http://127.0.0.1:5577/api/check-params \
-H "Content-Type: application/json" \
-d '{"nodes":[{"id":"n1","type":"click","params":{"x":100}}]}'
# Get current state
curl -X POST http://127.0.0.1:5577/api/get-state
# Start macro recording
curl -X POST http://127.0.0.1:5577/api/macro/start-recording \
-H "Content-Type: application/json" \
-d '{"name":"login process"}'
```
45+ API endpoints cover: script management, node operations, engine control, macro recording, screenshot recognition, wheel selection, AI generation. See [CLAUDE.md](CLAUDE.md) for details.
**Note:** If the API contains Chinese parameters, it is recommended to use Node.js or Python to send requests (Windows Git Bash curl cannot handle Chinese UTF-8 encoding in command line correctly).
---
### Tech Stack
| Layer | Technology |
|---|---|
| Frontend Framework | React 18 + TypeScript |
| State Management | Zustand + immer |
| Flow Editor | React Flow |
| Build Tool | Vite 5 (code splitting) |
| Desktop Framework | Electron 31 |
| Backend Engine | Python 3.10+ |
| Registry System | Python `@feature` decorator (lazy loading) |
| MCP Protocol | Python MCP + TypeScript MCP |
| Icons | Lucide React |
---
### Project Structure
```
src/
├── main/ # Electron main process
│ ├── main.ts # Window management, IPC, HTTP API :5577
│ ├── api.ts # HTTP API server (45+ endpoints)
│ ├── engine.ts # Python subprocess management (queue, concurrency control)
│ ├── schedulerBridge.ts # Python scheduler daemon bridge
│ ├── env.ts # Environment configuration (isDev / getBaseDir)
│ └── preload.ts # contextBridge API
└── renderer/ # React frontend (Vite)
├── App.tsx # Root component/layout/shortcuts
├── store/ # Zustand (slices mode) + immer
├── types/ # FlowNode/FlowEdge/NodeParams
├── components/ # Canvas/node/property panel/library
└── utils/ # Utility functions/node definitions
python/
├── engine/ # Automation execution engine (DSL execution/condition evaluation)
├── features/ # @feature registry (~160 tools, lazy loading)
├── mcp/ # Python MCP server
├── macros/ # Macro recording file saving
├── interaction/ # Wheel selector/area selector
└── perception/ # OCR/image matching
```
---
### License
This project is open-sourced under the MIT license.
---
## English
### Overview
**Lingdong Script** is a visual desktop automation flow editor. Create automation scripts by drag-and-drop flowchart editing — no coding required.
Three ways to use: ① Manual flowchart editing ② Built-in AI assistant (natural language to DSL) ③ Claude Code / MCP remote control.
### Key Features
- **Visual Flow Editor** — 100+ node types, 3 view modes (canvas/pseudocode/settings)
- **Macro Recording** — F6 hotkey, smart filtering, one-click convert to flowchart
- **AI-Powered** — Natural language to automation scripts (DeepSeek/OpenAI)
- **DSL Scripting** — Built-in domain-specific language for text-based editing
- **@Feature Registry** — 160+ tools, lazy-loaded (20ms cold start), auto MCP/CLI/HTTP
- **Architecture Optimized** — Code splitting (298KB JS), Python process pool (max 3), async file I/O
- **HTTP API Bridge** — 45+ endpoints on `127.0.0.1:5577` for remote control
- **MCP Protocol** — Python + TypeScript dual MCP servers
- **Timer Scheduling** — cron/interval/startup triggers with condition guards
### Architecture Highlights
| Metric | Before | After |
|---|---|---|
| Python cold start | 2-8s | 20ms (400x) |
| JS bundle | 1.17 MB | 298 KB |
| Concurrent Python | unlimited (OOM risk) | max 3 (queued) |
| Scheduler crash | silent death | 2s auto-restart |
| Frontend render | global re-render | selective + React.memo |
### Quick Start
```bash
git clone https://github.com/zoujiapeng/lingdong-script.git
npm install
npm run dev # Development (Vite HMR + Electron)
npm run build # Production build
npx electron-builder --win portable # Portable executable
```
Download the latest portable release from [Releases](https://github.com/zoujiapeng/lingdong-script/releases).
### Tech Stack
React 18 · TypeScript · Zustand + immer · React Flow · Vite 5 (code splitting) · Electron 31 · Python 3.10+ · 160+ @feature tools · MCP protocol
---
<div align="center">
<p>Made with ❤️ by 邹先生</p>
<p>Email: <a href="mailto:1724856284@qq.com">1724856284@qq.com</a> · Welcome to discuss</p>
<p>
<a href="https://github.com/zoujiapeng/lingdong-script/issues">Report issues</a>
·
<a href="https://github.com/zoujiapeng/lingdong-script/discussions">Discuss</a>
</p>
</div>
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.