Windows Automation MCP Server

Windows Automation MCP Server

Provides comprehensive Windows system control including file operations, process management, window control, screenshots, clipboard access, PowerShell/CMD execution, and optional mouse/keyboard automation and browser control capabilities.

Category
Visit Server

README

Windows 完全自动化 MCP 服务器

这是一个功能强大的 Windows 自动化 MCP 服务器,提供完整的 Windows 系统控制能力。

🎯 功能特性

1. 文件系统操作

  • ✅ 读写文件
  • ✅ 创建/删除/移动/复制文件
  • ✅ 列出目录内容
  • ✅ 搜索文件

2. 进程管理

  • ✅ 启动应用程序
  • ✅ 结束进程
  • ✅ 列出进程
  • ✅ 获取进程信息

3. 鼠标键盘控制

  • ⚠️ 移动鼠标
  • ⚠️ 鼠标点击
  • ⚠️ 输入文本
  • ⚠️ 按键模拟
  • ⚠️ 获取鼠标位置
  • ⚠️ 获取屏幕尺寸

⚠️ 注意:鼠标键盘功能需要 robotjs,需要 Windows Build Tools

4. 窗口管理

  • ✅ 列出所有窗口
  • ✅ 获取当前活动窗口
  • ✅ 激活窗口
  • ✅ 关闭窗口
  • ✅ 最小化窗口

5. 屏幕截图

  • ✅ 全屏截图
  • ✅ 区域截图
  • ✅ 自定义保存路径

6. 剪贴板操作

  • ✅ 获取剪贴板内容
  • ✅ 设置剪贴板内容
  • ✅ 清空剪贴板

7. PowerShell/CMD

  • ✅ 执行 PowerShell 命令
  • ✅ 执行 CMD 命令
  • ✅ 获取系统信息
  • ✅ 获取磁盘信息
  • ✅ 获取网络信息

8. 浏览器自动化

  • ⚠️ 启动浏览器
  • ⚠️ 导航到网页
  • ⚠️ 点击元素
  • ⚠️ 输入文本
  • ⚠️ 截图
  • ⚠️ 获取元素文本

⚠️ 注意:浏览器功能需要 puppeteer

📦 安装

1. 基础安装(必需)

cd windows-automation-mcp
npm install

2. 可选依赖

鼠标键盘控制(robotjs)

# 需要先安装 Windows Build Tools
npm install --global windows-build-tools

# 然后安装 robotjs
npm install robotjs

浏览器自动化(puppeteer)

npm install puppeteer

🚀 使用方法

1. 在 Cursor 中配置

在 Cursor 的 MCP 配置文件中添加:

{
  "mcpServers": {
    "windows-automation": {
      "command": "node",
      "args": ["c:\\Users\\Administrator\\Desktop\\cursor工作盘\\windows-automation-mcp\\src\\server.js"]
    }
  }
}

2. 重启 Cursor

配置后重启 Cursor,MCP 服务器将自动启动。

📚 工具使用示例

文件操作

请帮我读取桌面上的 test.txt 文件
请在 D:\\temp 目录下创建一个名为 hello.txt 的文件,内容是 "Hello World"
请列出 C:\\Users 目录下的所有文件和文件夹

进程管理

请帮我打开记事本
请列出所有正在运行的 chrome 进程
请结束所有 notepad.exe 进程

窗口管理

请列出所有打开的窗口
请激活标题包含"记事本"的窗口
请关闭标题包含"Chrome"的窗口

屏幕截图

请截取当前屏幕并保存到桌面
请截取屏幕左上角 800x600 的区域

剪贴板

请获取当前剪贴板的内容
请将"Hello World"复制到剪贴板

PowerShell

请执行 PowerShell 命令获取系统信息
请获取所有磁盘的使用情况
请获取当前的网络配置

浏览器自动化

请启动浏览器并访问 https://www.baidu.com
请在搜索框中输入"hello world"并点击搜索按钮
请截取当前网页的完整截图

⚠️ 注意事项

  1. 权限要求:某些操作可能需要管理员权限
  2. 安全性:请谨慎使用 PowerShell 和 CMD 执行功能
  3. 依赖项:部分功能需要额外安装依赖
  4. Windows 专用:此 MCP 服务器仅支持 Windows 系统

🔧 故障排除

robotjs 安装失败

# 1. 安装 Windows Build Tools
npm install --global windows-build-tools

# 2. 重新安装 robotjs
npm install robotjs

puppeteer 下载失败

# 使用国内镜像
set PUPPETEER_DOWNLOAD_HOST=https://npmmirror.com/mirrors
npm install puppeteer

📝 工具列表

完整的工具列表:

文件系统 (8 个工具)

  • read_file, write_file, list_directory, create_directory
  • delete_file, copy_file, move_file, search_files

进程管理 (4 个工具)

  • launch_application, kill_process, list_processes, get_process_info

鼠标键盘 (6 个工具)

  • move_mouse, mouse_click, type_text, press_key
  • get_mouse_position, get_screen_size

窗口管理 (6 个工具)

  • list_windows, get_active_window, activate_window
  • close_window, minimize_window, maximize_window

屏幕截图 (2 个工具)

  • take_screenshot, take_screenshot_region

剪贴板 (3 个工具)

  • get_clipboard, set_clipboard, clear_clipboard

PowerShell (5 个工具)

  • run_powershell, run_cmd, get_system_info
  • get_disk_info, get_network_info

浏览器 (7 个工具)

  • browser_launch, browser_navigate, browser_click
  • browser_type, browser_screenshot, browser_get_text, browser_close

📄 许可证

MIT License

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured