Skip to main content

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

  1. get_screen_brightness()

    • Returns current screen brightness (0-100)
  2. 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)
  3. get_system_volume()

    • Returns current system volume (0-100)
  4. set_system_volume(volume: int)

    • Set system volume level (0-100)
  5. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_mac_brightness-0.1.3.tar.gz (89.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_mac_brightness-0.1.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_mac_brightness-0.1.3.tar.gz.

File metadata

File hashes

Hashes for mcp_server_mac_brightness-0.1.3.tar.gz
Algorithm Hash digest
SHA256 048cd7a5273e17e466cf2544b62a37c760c3430b0fccd4bb6d9de2c67c9621e8
MD5 a632a9d8ecf167b85e0c980ecd36612e
BLAKE2b-256 cc3fad77fef6c2ca296d490574669dc1983823be86e7fb2f370c1540e77f864b

See more details on using hashes here.

File details

Details for the file mcp_server_mac_brightness-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_mac_brightness-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 137144484486dfca50fa88a4657d0dd2936f8e20efc569be7cd298dfc384a831
MD5 9aacb5d00162e11a7e145ac0275826a6
BLAKE2b-256 6e0340d9742812ae08b2ff076a674f3e7d87211448ccd40a48795f50bb715db4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page