A Model Context Protocol server for controlling Mac screen brightness
Project description
MCP Mac Brightness Server
A Model Context Protocol server for controlling Mac screen brightness and system volume.
Features
-
Screen Brightness Control
- Get current screen brightness
- Set screen brightness with optional fade duration
- Supports brightness range: 0-100%
-
System Volume Control
- Get current system volume
- Set system volume
- Toggle system mute state
Requirements
- Python >= 3.10
- macOS (uses native macOS frameworks)
- Required permissions for screen and audio control
Installation
uv pip install -e .
Usage
Start the Server
Available Tools
-
get_screen_brightness()
- Returns current screen brightness (0-100)
-
set_screen_brightness(brightness: float, duration: float = 0)
- Set screen brightness level
- brightness : Target brightness (0-100)
- duration : Fade duration in seconds (0 for immediate change)
-
get_system_volume()
- Returns current system volume (0-100)
-
set_system_volume(volume: int)
- Set system volume level (0-100)
-
toggle_system_mute()
- Toggle system audio mute state
Configuration
Configure in Claude desktop:
{
"mac_brightness": {
"command": "uv",
"args": ["run", "/absolute/path/to/src/mcp_server_mac_brightness/server.py"]
}
}
Error Handling
- Input validation for brightness and volume levels
- Comprehensive error messages for system API failures
- Graceful error handling for permission issues
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_server_mac_brightness-0.1.2.tar.gz.
File metadata
- Download URL: mcp_server_mac_brightness-0.1.2.tar.gz
- Upload date:
- Size: 89.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d382a37e6522ba4362254cc8256e58788c3ea969f6e8f6948b3ff1958271132
|
|
| MD5 |
e01e4b7e028f20513f8a1c95a313ef29
|
|
| BLAKE2b-256 |
294984795793295e77d2b98610f0a737b6742c8b615e56d197d3ade316ad4e58
|
File details
Details for the file mcp_server_mac_brightness-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mcp_server_mac_brightness-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94bd83e8a8b55e8bece2544f9960c37fe6bc795c85c9b60e663da4eab0c427f7
|
|
| MD5 |
9d95034b3b0dc89a796f64e4249514cc
|
|
| BLAKE2b-256 |
9d6924a184a77b94293ad9f8e31351fad86a31f8bdd3228ea977c0c3eec6fedc
|