computer-agent-mcp
A black-box desktop automation MCP server that handles screenshots, coordinates, and clicks internally to complete tasks given by the user.
README
computer-agent-mcp
A black-box desktop automation MCP server — give it a task, it handles the screenshots, coordinates, and clicks internally, and returns the result.
<p align="center"> <video src="https://github.com/user-attachments/assets/1f61fa7e-2166-49ba-94fa-97913fad5bb2" width="720" controls></video> </p>
How It Works
Unlike typical computer-use tools that expose raw screenshots to the host agent, computer-agent-mcp runs the entire vision loop server-side:
- Captures the current screen
- Sends the screenshot + task context to an internal vision model
- Receives observations, action plans, and coordinate mappings
- Executes actions locally with visible mouse trajectories
- Repeats until the task is done — then returns a structured result
The host agent never sees a screenshot. It just sends a task and gets back a result.
Features
- Task-level API — one call to complete a desktop task, no multi-turn screenshot protocol
- Server-side vision loop — screenshots, coordinate mapping, and action execution all handled internally
- Human override detection — stops immediately when a real user touches the keyboard or mouse
- Step-by-step debug recording — full event timeline, screenshots, and model request/response logs
- Works with any OpenAI-compatible vision model — bring your own endpoint and model
Quick Start
Prerequisites
- Windows
- Python >= 3.11
- An OpenAI-compatible API key
Install & Run
The quickest way to start:
uvx computer-agent-mcp \
--api-key sk-... \
--base-url https://api.openai.com/v1 \
--model gpt-5.4
Or install via pip:
pip install computer-agent-mcp
computer-agent-mcp \
--api-key sk-... \
--base-url https://api.openai.com/v1 \
--model gpt-5.4
MCP Host Configuration
Add to your MCP client config (e.g. Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"computer-agent": {
"command": "uvx",
"args": [
"computer-agent-mcp",
"--base-url",
"https://api.openai.com/v1",
"--model",
"gpt-5.4"
],
"env": {
"COMPUTER_AGENT_OPENAI_API_KEY": "sk-..."
}
}
}
}
Tools
computer_use_task
Run a stateless black-box desktop task.
| Parameter | Default | Description |
|---|---|---|
task |
(required) | Natural language description of what to do |
display_id |
"primary" |
Target display |
max_steps |
30 |
Maximum vision-action loop iterations |
Returns structured result with status (completed / blocked / failed), summary, result, memory, and trace.
computer_list_displays
List available displays. Useful for multi-monitor setups.
Configuration
All CLI parameters can also be set via environment variables:
| CLI Flag | Env Variable | Default | Description |
|---|---|---|---|
--api-key |
COMPUTER_AGENT_OPENAI_API_KEY |
— | API key (also reads OPENAI_API_KEY) |
--base-url |
COMPUTER_AGENT_OPENAI_BASE_URL |
https://api.openai.com/v1 |
API base URL |
--model |
COMPUTER_AGENT_OPENAI_MODEL |
gpt-5.4 |
Vision model to use |
--max-steps-default |
COMPUTER_AGENT_MAX_STEPS_DEFAULT |
30 |
Default max steps per task |
--max-duration-s-default |
COMPUTER_AGENT_MAX_DURATION_S_DEFAULT |
120 |
Default max duration (seconds) |
--debug-dir |
COMPUTER_AGENT_DEBUG_DIR |
.computer_agent_mcp_debug/ |
Debug output directory |
--log-level |
COMPUTER_AGENT_LOG_LEVEL |
INFO |
Log level |
Enable debug recording with COMPUTER_AGENT_DEBUG=1. See REFERENCE.md for the full configuration reference and detailed runtime semantics.
Development
pip install -e .[dev]
pytest
Platform Support
Currently Windows only. The server will start on other platforms but desktop tool calls will fail.
Contributing
Contributions are welcome! Please open an issue first to discuss what you'd like to change.
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。