Skip to main content
Glama

Windows-MCP 是一个轻量级开源 MCP 服务器,桥接 AI Agent 与 Windows 操作系统,支持文件操作、应用控制、UI 交互、自动化测试等任务。

✨ 核心特性

  • 无缝 Windows 集成 — 原生操控 Windows UI 元素、启动应用、控制窗口、模拟用户输入。

  • 任意 LLM 驱动 — 不依赖计算机视觉或微调模型,兼容任何 LLM 提供商。

  • 17 个 MCP 工具 — Click、Type、Scroll、Move、Shortcut、Screenshot、Snapshot、App、Shell、Scrape、MultiSelect、MultiEdit、Clipboard、Process、Notification、Registry、Wait。

  • A2A 编排框架 — LLM 任务规划、DAG 并行执行、结构化技能输出、多 Agent 协作委托。

  • 轻量开源 — 最少依赖。

Related MCP server: AETHER_01

🧠 A2A 框架

Agent-to-Agent 编排层:

组件

说明

技能系统

5 个内置技能(打开应用、截图、搜索、文件操作、剪贴板),插件化架构 + JSON Schema 约束

DAG 执行器

拓扑排序、同层并行执行、跨节点上下文传递($step_id.field

LLM 规划器

自然语言 → TaskGraph JSON,支持 OpenAI 兼容 API,自动降级关键词匹配

智能验证器

两层校验:规则检查(进程/文件/剪贴板)+ 可选视觉模型对比

A2A 网络

AgentCard 能力发现、AgentRegistry 注册中心、FastAPI 远程任务委托

使用示例

from windows_mcp.mobile.runtime import create_mobile_runtime

agent, skills = create_mobile_runtime()

# 简单指令(关键词匹配)
agent.run_instruction("打开QQ")

# DAG 顺序链
agent.run_sequential([
    {"skill": "open_or_focus_app", "params": {"instruction": "打开Chrome"}},
    {"skill": "capture_desktop_state"},
])

# LLM 智能规划(需配置 PLANNER_API_KEY 环境变量)
agent.run_instruction_smart("打开浏览器搜索Python教程然后截图保存")

🛠️ 安装

首次安装依赖解析约需 1–2 分钟。

环境要求

  • Python 3.13+

  • UV 包管理器

方式 A:PyPI 安装(推荐)

{
  "mcpServers": {
    "windows-mcp": {
      "command": "uvx",
      "args": ["windows-mcp"]
    }
  }
}

方式 B:源码安装

git clone https://github.com/Books-QAQ/Windows-MCP.git
cd Windows-MCP
{
  "mcpServers": {
    "windows-mcp": {
      "command": "uv",
      "args": ["--directory", "<项目路径>", "run", "windows-mcp"]
    }
  }
}

MSIX 版本(Windows Store):配置文件位于 %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\。如 Electron 未继承 PATH,请使用 uv.exe 的完整绝对路径。

# PyPI
claude mcp add --transport stdio windows-mcp -- uvx windows-mcp

# 源码
git clone https://github.com/Books-QAQ/Windows-MCP.git
claude mcp add --transport stdio windows-mcp -- uv --directory "<路径>" run windows-mcp
{
  "mcpServers": {
    "windows-mcp": {
      "command": "uvx",
      "args": ["windows-mcp"]
    }
  }
}

源码安装:将 "command": "uvx" 替换为 "command": "uv""args": ["--directory", "<路径>", "run", "windows-mcp"]

🖥️ 运行模式

本地模式(默认)

uvx windows-mcp                           # stdio(默认)
uvx windows-mcp --transport sse --host localhost --port 8000
uvx windows-mcp --transport streamable-http --host localhost --port 8000

远程模式

需要在 windowsmcp.io 注册账号。

环境变量配置:

  • MODE=remote

  • SANDBOX_ID=<沙箱ID>

  • API_KEY=<API密钥>

⚙️ 环境变量

A2A 规划器与验证器

变量

默认值

说明

PLANNER_API_KEY

LLM 任务规划的 API Key

PLANNER_BASE_URL

https://api.deepseek.com/v1

LLM API 地址

PLANNER_MODEL

deepseek-chat

规划模型名称

VALIDATOR_API_KEY

视觉验证的 API Key

VALIDATOR_MODEL

deepseek-chat

视觉验证模型

截图与快照

变量

默认值

说明

WINDOWS_MCP_SCREENSHOT_SCALE

1.0

缩放比例(0.1–1.0),4K 屏建议 0.5 以避免超过 1MB 限制

WINDOWS_MCP_SCREENSHOT_BACKEND

auto

截图后端:auto / dxcam / mss / pillow

WINDOWS_MCP_PROFILE_SNAPSHOT

关闭

设为 1/true 启用性能计时日志

遥测与调试

变量

默认值

说明

ANONYMIZED_TELEMETRY

true

设为 false 关闭匿名遥测

WINDOWS_MCP_DEBUG

false

设为 1/true 启用调试日志

🔨 MCP 工具列表

工具

功能

Click

按坐标或 UI 元素标签点击

Type

输入文本,支持清空/回车

Scroll

垂直/水平滚动

Move

移动鼠标或拖拽

Shortcut

键盘快捷键(Ctrl+CAlt+Tab 等)

Wait

等待指定时长

Screenshot

快速截图,含光标和窗口信息

Snapshot

完整桌面状态,含交互元素和 DOM 提取

App

启动/缩放/切换应用

Shell

执行 PowerShell 命令

Scrape

抓取网页内容

MultiSelect

多选文件/复选框

MultiEdit

多字段同时输入

Clipboard

读写剪贴板

Process

列出或终止进程

Notification

发送 Windows 通知

Registry

读写注册表

📝 已知限制

  • 无法选中段落中的特定文本(依赖无障碍树)。

  • Type 工具适用于文本输入,不适合 IDE 编程场景。

  • 不适用于游戏自动化。

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI clients to automate Windows desktop applications through window manipulation, image recognition, OCR, keyboard/mouse simulation, and memory operations via the MCP protocol.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to perform extensive Windows system administration, file operations, process management, network configuration, registry editing, GUI automation, and more through a comprehensive set of MCP tools.
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Books-QAQ/Windows-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server