screenshot
mcp截屏服务
claude mcp add --transport stdio m-mcp-screenshot-server uvx --directory /Users/username/MCP run screenshot.py
How to use
该截图服务器使用 Python 编写,通过 MCP 协议提供截屏服务。客户端可以调用 take_screenshot_image 工具来获取当前屏幕的截图,并返回图像数据。服务器端通过 clint.py 作为 MCP 客户端示例,结合 uvx 运行来加载并执行 screenshot.py 中实现的逻辑。要使用该服务器,先确保环境中已安装 Python、Pillow 等依赖,并通过 MCP 客户端连接服务器后发起截图请求,即可获得屏幕截图数据并进行后续处理。
How to install
安装步骤:
-
安装 Python 3.x 与所需依赖
- 确保系统中已安装 Python 3.x
- 安装 Pillow 库:pip install Pillow
- 安装 MCP 相关库(若有需求):pip install mcp-sdk (如文档中提供的依赖)
-
获取或克隆项目到本地
- git clone <仓库地址>
- cd m-mcp-screenshot-server
-
安装并运行 MCP 服务
- 使用 uvx 启动服务(参考 README 的配置示例)
- 示例命令(与实际目录匹配): uvx --directory /Users/username/MCP run screenshot.py
-
使用 MCP 客户端连接并请求截图
- 运行 clint.py 或相应的 MCP 客户端工具
- 发送 take_screenshot_image 请求以获取屏幕截图
Additional notes
提示与常见问题:
- 确保路径 /Users/username/MCP 和 screenshot.py 存在且可执行
- Pillow 版本与 Python 版本兼容性:建议使用 Python 3.8+ 与 Pillow 的最新稳定版本
- 如果遇到权限问题,请检查运行用户对相关目录的读写权限
- MCP 配置中的命令与参数需与实际运行环境一致,特别是目录路径和脚本名
- 可以在 screenshot.py 中调整截图处理流程(例如裁剪、格式转换、压缩等)以满足客户端需求
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP