DC

domdomegg/computer-use-mcp

开发工具

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

388 stars 53 forks 质量 71 趋势 40MIT

💻 让AI模型完全控制你的电脑(可能是个坏主意)

概览

💻 一个Claude用于控制你电脑的模型上下文协议服务器。这与计算机使用非常相似,但易于本地设置和使用。 这是Claude Haiku 4.5更改我的桌面背景(4倍速): https://github.com/user-attachments/assets/cd0bc190-52c4-49db-b3bc-4b8a74544789 撰写本文时,模型经常犯错,且容易受到提示注入的影响。由于该MCP服务器赋予模型对你计算机的完全控制,这可能会造成很大损害。因此,你应当把这当作让一个多动的幼儿访问你的电脑——你可能需要密切监督,并且只考虑在沙箱用户账户中进行此类操作。 按照install-mcp上的说明操作,它会生成适合你MCP客户端的配置(Claude Code、Claude Desktop、Cursor、Cline、VS Code等)。 不过,为了获得最佳效果:- 使用适合电脑使用的模型——我推荐最新的Claude型号。

概述(AI 翻译)

💻 一个Claude用于控制你电脑的模型上下文协议服务器。这与计算机使用非常相似,但易于本地设置和使用。

这是Claude Haiku 4.5更改我的桌面背景(4倍速):

https://github.com/user-attachments/assets/cd0bc190-52c4-49db-b3bc-4b8a74544789

[!警告] 撰写本文时,模型经常犯错,且容易受到提示注入的影响。由于该MCP服务器赋予模型对你计算机的完全控制权,这可能会造成很大损害。因此,你应当把这当作让一个多动的幼儿访问你的电脑——你可能想密切监督,并且只考虑在沙箱用户账户中进行。

安装

按照install-mcp上的说明操作,它会生成适合你MCP客户端的配置(Claude Code、Claude Desktop、Cursor、Cline、VS Code等)。

技巧

这应该开箱即用。

不过,为了获得最佳效果:

  • 使用适合电脑使用的模型——我推荐最新的Claude型号。
  • 使用一个小巧且常见的分辨率——720p效果特别好。在macOS上,你可以用displayoverride-mac来实现这一点。

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

README

computer-use-mcp

💻 A Model Context Protocol server for Claude to control your computer. This is very similar to computer use, but easy to set up and use locally.

Here’s Claude Haiku 4.5 changing my desktop background (4x speed):

https://github.com/user-attachments/assets/cd0bc190-52c4-49db-b3bc-4b8a74544789

[!WARNING] At time of writing, models make frequent mistakes and are vulnerable to prompt injections. As this MCP server gives the model complete control of your computer, this could do a lot of damage. You should therefore treat this like giving a hyperactive toddler access to your computer - you probably want to supervise it closely, and consider only doing this in a sandboxed user account.

Installation

Follow the instructions on install-mcp, which generates the right config for your MCP client (Claude Code, Claude Desktop, Cursor, Cline, VS Code, and more).

Tips

This should just work out of the box.

However, to get best results:

  • Use a model good at computer use - I recommend the latest Claude models.
  • Use a small, common resolution - 720p works particularly well. On macOS, you can use displayoverride-mac to do this. If you can’t use a different resolution, try zooming in to active windows.
  • Install and enable the Rango browser extension. This enables keyboard navigation for websites, which is far more reliable than Claude trying to click coordinates. You can bump up the font size setting in Rango to make the hints more visible.

How it works

We implement a near identical computer use tool to Anthropic’s official computer use guide, with some more nudging to prefer keyboard shortcuts.

This talks to your computer using nut.js

Contributing

Pull requests are welcomed on GitHub! To get started:

  1. Install Git and Node.js
  2. Clone the repository
  3. Install dependencies with npm install
  4. Run npm run test to run tests
  5. Build with npm run build

Releases

Versions follow the semantic versioning spec.

To release:

  1. Use npm version to bump the version
  2. Run git push --follow-tags to push with tags
  3. Wait for GitHub Actions to publish to the NPM registry.
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →