TM

tanob/mcp-desktop-automation

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

39 stars 15 forks 质量 65 趋势 0MIT

tanob/mcp-desktop-automation 是从 https://github.com/tanob/mcp-desktop-automation. 导入的 MCP 服务器候选

概览

tanob/mcp-desktop-automation 是从 https://github.com/tanob/mcp-desktop-automation. 导入的 MCP 服务器候选

概述(AI 翻译)

一台模型上下文协议服务器,提供使用 RobotJS 和截图功能的桌面自动化功能。该服务器使大型语言模型能够控制鼠标移动、键盘输入,并捕捉桌面环境的截图。

配置以使用桌面自动化服务器

以下是如何配置 Claude Desktop 以使用 MCP 桌面自动化服务器的方法:

NPX

许可

该服务器需要系统级权限以:

  • 截取您的屏幕截图
  • 控制鼠标移动和点击
  • 模拟键盘输入

在首次使用该服务器运行 Claude Desktop 时,您可能需要在操作系统的安全设置中授予这些权限。

局限性

虽然该服务器支持多种MCP客户端,但主要通过Claude Desktop进行测试。

重要:当前实现的响应大小限制为1MB。对于屏幕截图,这意味着:

  • 高分辨率截图可能超过此限制而失效
  • 测试显示800x600分辨率稳定运行
  • 如果遇到问题,请考虑降低屏幕分辨率或捕捉特定屏幕区域

要求

  • Node.js (>=14.x)

组成部分

工具

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

MCP Desktop Automation

A Model Context Protocol server that provides desktop automation capabilities using RobotJS and screenshot capabilities. This server enables LLMs to control mouse movements, keyboard inputs, and capture screenshots of the desktop environment.

Configuration to use Desktop Automation Server

Here’s how to configure Claude Desktop to use the MCP Desktop Automation server:

NPX

{
  "mcpServers": {
    "desktop-automation": {
      "command": "npx",
      "args": ["-y", "mcp-desktop-automation"]
    }
  }
}

Permissions

This server requires system-level permissions to:

  • Capture screenshots of your screen
  • Control mouse movement and clicks
  • Simulate keyboard input

When first running Claude Desktop with this server, you may need to grant these permissions in your operating system’s security settings.

Limitations

While this server works with various MCP clients, it has been primarily tested with Claude Desktop.

Important: The current implementation has a 1MB response size limit. For screen captures, this means:

  • High-resolution screenshots may exceed this limit and fail
  • Testing has shown 800x600 resolution works reliably
  • Consider reducing screen resolution or capturing specific screen areas if you encounter issues

Requirements

  • Node.js (>=14.x)

Components

Tools

  • get_screen_size

    • Gets the screen dimensions
    • No input parameters required
  • screen_capture

    • Captures the current screen content
    • No input parameters required
  • keyboard_press

    • Presses a keyboard key or key combination
    • Inputs:
      • key (string, required): Key to press (e.g., ‘enter’, ‘a’, ‘control’)
      • modifiers (array of strings, optional): Modifier keys to hold while pressing the key. Possible values: “control”, “shift”, “alt”, “command”
  • keyboard_type

    • Types text at the current cursor position
    • Input: text (string, required): Text to type
  • mouse_click

    • Performs a mouse click
    • Inputs:
      • button (string, optional, default: “left”): Mouse button to click. Possible values: “left”, “right”, “middle”
      • double (boolean, optional, default: false): Whether to perform a double click
  • mouse_move

    • Moves the mouse to specified coordinates
    • Inputs:
      • x (number, required): X coordinate
      • y (number, required): Y coordinate

Resources

The server provides access to screenshots:

  1. Screenshot List (screenshot://list)

    • Lists all available screenshots by name
  2. Screenshot Content (screenshot://{id})

    • PNG images of captured screenshots
    • Accessible via the screenshot ID (timestamp-based naming)

Key Features

  • Desktop mouse control
  • Keyboard input simulation
  • Screen size detection
  • Screenshot capabilities
  • Simple JSON response format

License

在 GitHub 查看完整 README

安装

npx -y mcp-desktop-automation
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "desktop-automation": { "command": "npx", "args": ["-y", "mcp-desktop-automation"] } } }