Skip to main content
Glama
66maer
by 66maer

AutoFlow

Windows 自动化工具,快速编辑工作流,完成日常重复性任务。 —— 截图识别 + 键鼠模拟,用可视化流程编辑器拖拽编排自动化任务。

附带实现 MCP Server,也可以让 AI Agent 直接操控桌面。

它能做什么

  • 看屏幕:在屏幕上找到需要的位置(OpenCV 模板匹配)

  • 控键鼠:点击、移动、打字、按键、滚动

  • 编排流程:拖拽式流程编辑器,支持条件分支、循环、变量

  • MCP 接入:18 个 MCP tools,AI Agent 也能用

Related MCP server: Windows MCP Server

快速开始

# 后端
uv sync
uv run uvicorn app.main:app --reload

# 前端
cd webui && npm install && npm run dev

后端 http://127.0.0.1:8000,前端 http://localhost:5173(自动代理 API)。

架构

三层分离,engine 层纯 Python 零框架依赖:

Engine (app/engine/)     ← 纯业务逻辑,可独立测试
  ↑
Core API (app/api/ + app/ws/ + app/mcp/)  ← REST / WebSocket / MCP 三种接入
  ↑
WebUI (webui/)           ← React + ReactFlow 可视化编辑器

引擎层用抽象基类,实现可替换:

  • 截图:ScreenCapture → MSS

  • 找图:ImageMatcher → OpenCV 模板匹配

  • 输入:InputController → PyAutoGUI

MCP Server

如果你想让 AI Agent 接入,有两种方式:

HTTP — 启动后端后自动可用,端点 http://127.0.0.1:8000/mcp

stdio — 配置到 Claude Desktop / Claude Code:

{
  "mcpServers": {
    "autoflow": {
      "command": "uv",
      "args": ["run", "python", "-m", "app.mcp"],
      "cwd": "/path/to/AutoFlow"
    }
  }
}

技术栈

后端 Python 3.12+ / FastAPI / SQLModel + SQLite / MCP SDK

引擎 mss / OpenCV / pyautogui

前端 React 19 / TypeScript / ReactFlow / Vite

工具链 uv / Ruff / pytest

Roadmap

  • 引擎层抽象 + 实现

  • REST API + WebSocket 实时日志

  • 可视化流程编辑器(拖拽、条件、循环、变量)

  • MCP Server(HTTP + stdio)

  • 内置截图选区工具

  • 桌面打包(pywebview + PyInstaller)

  • 驱动级键鼠(Interception)

  • 高级图像识别(DINOv2)

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that bridges AI agents with GUI automation capabilities, allowing them to control mouse, keyboard, windows, and take screenshots to interact with desktop applications.
    23
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables comprehensive Windows desktop automation including screen capture, OCR text extraction, mouse/keyboard control, window management, process control, and clipboard operations through 25+ tools for AI agents.
    46 PyPI
    5
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI coding agents to automate Windows desktop applications through semantic UI Automation instead of brittle coordinate clicks, with tools for discovering windows, finding controls by stable identifiers, and verifying actions.
    26 PyPI
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that gives AI agents human-like control over Windows via visual perception and simulated mouse and keyboard input, enabling automation of any application without APIs.
    31 npm
    3
    MIT