mcpField
W
winsight

winsight

本地服务
github.com/TheoEwzZer其他231 周前更新

关于 winsight

WinSight 是供 Claude Code 使用的 Windows MCP 服务,可捕获屏幕、检查和控制窗口,并启动应用。它支持全屏、区域和窗口捕获,也能通过 Win32 PrintWindow 获取被其他窗口遮挡的窗口内容。

主要功能

  1. 01捕获屏幕、区域和窗口
  2. 02捕获被其他窗口遮挡的窗口内容
  3. 03列出窗口及显示器信息
  4. 04移动、调整大小、聚焦及更改窗口状态
  5. 05启动应用并等待其窗口出现

适用场景

  1. 01捕获特定应用窗口以供检查
  2. 02在桌面任务中排列并聚焦窗口
  3. 03启动应用并等待其窗口出现

MCP 相关

WinSight 向 Claude Code 等 MCP 客户端提供屏幕捕获、窗口管理、显示器检查和应用启动工具。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"theoewzzer-winsight": {
"command": "uvx",
"args": [
"winsight-mcp"
]
}
}
}
启动命令uvx winsight-mcp

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
pypiwinsight-mcp0.1.1

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

WinSight MCP

mcp-name: io.github.TheoEwzZer/winsight

Windows 屏幕捕获 MCP 服务——让 Claude Code 看见你的 Windows 桌面。

WinSight 是一个 MCP 服务,可让 Claude Code 在 Windows 上捕获屏幕、管理窗口并启动应用程序。

功能

  • 屏幕截图:捕获整个屏幕、指定区域或特定窗口
  • 窗口捕获:使用 Win32 PrintWindow API,即使窗口位于其他窗口后方,也能捕获其实际内容
  • 列出并检查:打开的窗口和显示器(标题、位置、大小、状态、分辨率)
  • 控制窗口——移动、调整大小、最小化、最大化、还原和聚焦
  • 启动应用程序并等待其窗口出现

要求

  • Windows 10/11
  • Python 3.10+

快速开始

选项 1:uvx(推荐)

无需安装——直接运行:

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

将以下内容添加到项目的 .mcp.json 或 ~/.claude/claude_desktop_config.json 中。

选项 2:pip 安装
pip install winsight-mcp

然后进行配置:

{
  "mcpServers": {
    "winsight": {
      "command": "winsight-mcp"
    }
  }
}
选项 3:从源代码安装
git clone https://github.com/TheoEwzZer/WinSight-MCP.git
cd WinSight-MCP
uv sync
{
  "mcpServers": {
    "winsight": {
      "command": "uv",
      "args": ["--directory", "/path/to/WinSight-MCP", "run", "winsight-mcp"]
    }
  }
}

工具

屏幕截图
工具描述
take_screenshot捕获整个屏幕或指定显示器
screenshot_window根据标题捕获特定窗口(即使窗口位于其他窗口后方也有效)
screenshot_region捕获屏幕的矩形区域
窗口管理
工具描述
list_windows列出所有可见窗口,并可按标题筛选
get_window_info获取窗口的详细信息(位置、大小、状态)
focus_window将窗口置于前台
resize_window将窗口调整为指定尺寸
move_window将窗口移动到指定位置
minimize_window将窗口最小化到任务栏
maximize_window将窗口最大化以填满屏幕
restore_window将最小化或最大化的窗口还原到正常状态
wait_for_window等待窗口出现(带超时的自适应轮询)
系统
工具描述
list_monitors列出所有显示器及其分辨率、位置和主显示器标记
open_application启动应用程序,并可选择等待其窗口出现

示例

连接 MCP 服务后,你可以向 Claude Code 提出以下请求:

  • “截取我的屏幕”
  • “列出所有打开的窗口”
  • “捕获记事本窗口”
  • “打开计算器并截取它的屏幕”
  • “将 Chrome 窗口置于前台”
  • “将应用窗口调整为 800x600 并截屏”
  • “将窗口移到左上角”
  • “我有哪些显示器?”

测试

该项目包含 112 个测试,覆盖所有模块。测试使用 Win32 API 模拟,因此可在任何平台上运行。

运行测试
uv run pytest
测试结构
tests/
  conftest.py              # Shared fixtures and Win32 stubs
  test_types.py            # TypedDict definitions validation
  test_screenshot.py       # Screen/region/window capture (mss, Win32 DC)
  test_window_manager.py   # Window listing, find, focus, resize, move, min/max/restore
  test_process_manager.py  # Application launch and window polling
  test_server.py           # MCP tool registration and integration
添加测试
  1. 将新测试放入对应的 test_<module>.py 文件中
  2. 使用 conftest.py 中的共享 fixture(sample_window_info、mcp_server、fake_png_bytes)
  3. 使用 @patch("winsight_mcp.<module>.win32gui") 模拟 Win32 API——测试中绝不要调用真实的 Win32 函数
  4. 对于服务集成测试,使用 _call 助手调用工具,使用 _text 提取字符串结果

许可证

MIT

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。