computer-brightness-control-mcp
v1.0.20
Published
Model Context Protocol Server for controlling screen brightness on Windows & macOS
Maintainers
Readme
Computer Brightness Control MCP Server
面向 Windows 与 macOS 的电脑屏幕亮度控制 MCP(Model Context Protocol)服务,提供相对调节亮度的工具。
功能
- Windows 与 macOS 支持(不包含 Linux)
- 提高电脑屏幕亮度(相对调节)
- 降低电脑屏幕亮度(相对调节)
- 无外部依赖,开箱即用
安装
全局安装:
npm install -g computer-brightness-control-mcp或直接使用:
npx computer-brightness-control-mcp使用
直接运行
npx computer-brightness-control-mcpMCP Inspector 配置
- Transport: STDIO
- Command:
node - Arguments:
D:/path/to/computer-brightness-control-mcp/dist/server.js
或使用 npx:
- Command:
npx - Arguments:
computer-brightness-control-mcp
暴露的工具(MCP)
increase_brightness:提高电脑屏幕亮度(相对调节)decrease_brightness:降低电脑屏幕亮度(相对调节)
配置示例
在 mcp-config.json 中:
{
"mcpServers": {
"computer-brightness-control": {
"command": "node",
"args": ["dist/server.js"],
"env": {}
}
}
}或使用 npx:
{
"mcpServers": {
"computer-brightness-control": {
"command": "npx",
"args": ["computer-brightness-control-mcp"],
"env": {}
}
}
}实现细节
- Windows:通过 PowerShell 调用 WMI 类
WmiMonitorBrightnessMethods进行相对调节 - macOS:通过 AppleScript 模拟亮度按键进行相对调节(需要"辅助功能"权限)
权限要求
- macOS:需要在"系统偏好设置 > 安全性与隐私 > 辅助功能"中授权终端或 MCP 客户端
- Windows:无需额外权限
许可证
ISC
