mcp-pyatv
Allows controlling Apple TV devices, including playback navigation, volume control, app launching, power management, and media information retrieval.
Allows controlling iTunes on macOS, enabling playback control, volume adjustment, and media information.
Allows controlling the Music app on macOS via iTunes protocol, providing playback control and volume management.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-pyatvwhat's playing on my Apple TV?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-pyatv
MCP server for controlling Apple TV, HomePod, and AirPlay devices via pyatv.
What It Does
mcp-pyatv is an MCP (Model Context Protocol) server that bridges any MCP client to Apple TV, HomePod, and AirPlay devices on your local network. It wraps pyatv -- the open-source Python library that implements the actual Apple TV and AirPlay protocols -- and exposes its functionality as MCP tools.
This lets you control your devices using natural language through Claude Desktop, Claude Code, Cursor, or any other MCP-compatible client.
This project does not implement any device protocols. All protocol-level communication is handled by pyatv. mcp-pyatv is purely the MCP bridge layer.
Supported Devices
Apple TV -- all generations, including tvOS 15+
HomePod / HomePod Mini
AirPort Express
Third-party AirPlay speakers
macOS (Music/iTunes)
Quick Start
Install
pip install mcp-pyatvOr run directly without installing:
uvx mcp-pyatvClaude Desktop Configuration
Add this to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"apple-tv": {
"command": "uvx",
"args": ["--python", "python3.13", "mcp-pyatv"]
}
}
}Note: Claude Desktop may not inherit your shell's PATH. If you get a "command not found" error, use the full path to
uvx(runwhich uvxin your terminal to find it):{ "mcpServers": { "apple-tv": { "command": "/Users/you/.local/bin/uvx", "args": ["--python", "python3.13", "mcp-pyatv"] } } }
Local Development
If you've cloned the repo and want to run from source:
{
"mcpServers": {
"apple-tv": {
"command": "/path/to/venv/bin/python",
"args": ["-m", "mcp_pyatv.server"],
"env": {
"PYTHONPATH": "/path/to/mcp-pyatv/src"
}
}
}
}First Use / Pairing
On first use, just say "Pair my Apple TV" to your MCP client. The server handles the rest:
It scans your network and discovers devices.
A PIN appears on your TV screen.
You tell the client the PIN.
Credentials are stored locally and persist across sessions.
You only need to pair once per device. HomePods do not require pairing.
Available Tools
mcp-pyatv exposes 32 tools organized by category:
Discovery
Tool | Description |
| Scan the local network for Apple TV and AirPlay devices |
| Get detailed information about a specific device |
Pairing
Tool | Description |
| Begin the pairing process with a device |
| Complete pairing by submitting the PIN shown on screen |
Playback
Tool | Description |
| Resume playback |
| Pause playback |
| Toggle play/pause |
| Stop playback |
| Skip to next track |
| Go to previous track |
| Skip forward by a number of seconds |
| Skip backward by a number of seconds |
| Seek to a specific position |
| Set shuffle mode |
| Set repeat mode |
Navigation
Tool | Description |
| Send remote control commands -- supports |
Audio
Tool | Description |
| Get the current volume level |
| Set volume to a specific level |
| Increase volume |
| Decrease volume |
Apps
Tool | Description |
| List all installed apps |
| Launch an app by name or bundle ID |
Power
Tool | Description |
| Turn on the device |
| Turn off / put the device to sleep |
| Check if the device is on or off |
Keyboard
Tool | Description |
| Type text into a text field (e.g., search boxes) |
| Get the current text field contents |
| Clear the current text field |
Streaming
Tool | Description |
| Stream media from a URL to the device |
| Stream a local file to the device |
Media Info
Tool | Description |
| Get information about what's currently playing |
| Get the artwork for the currently playing media |
Example Conversations
Checking what's playing:
"What's playing on my Apple TV?"
The server calls
scan_devicesto find your Apple TV, thennow_playingto get the current track/show info.
Launching an app:
"Open Netflix"
The server calls
launch_appwith the Netflix bundle ID.
Adjusting volume:
"Set the volume to 40"
The server calls
set_volumewith level 40.
Pairing a new device:
"Pair my Apple TV"
The server calls
scan_devices, thenstart_pairing. A PIN appears on your TV. You say "The PIN is 1234", and the server callsfinish_pairingto complete the process.
Configuration
Variable | Description | Default |
| Override the file path where pairing credentials are stored |
|
The default credential file (~/.pyatv.conf) is shared with pyatv's atvremote CLI tool. If you've already paired devices using atvremote, mcp-pyatv will pick up those credentials automatically.
Known Limitations
play_urlbroken on tvOS 26.x -- upstream pyatv issue (#2821)stopignored by some apps -- YouTube and certain other apps do not respond to the stop commandget_artworkdepends on the app -- not all apps expose artwork metadataSame network required -- your machine must be on the same WiFi network as your devices
set_shuffle/set_repeat-- require an active music playback queue to workPython 3.14 -- not currently supported due to asyncio compatibility issues in pyatv
Built On
This project is built on pyatv by Pierre Stahl -- the Python library that implements the Companion, AirPlay, RAOP, MRP, and DMAP protocols used by Apple devices. All protocol-level communication, device discovery, and pairing logic happens inside pyatv. mcp-pyatv provides only the MCP server layer on top.
For protocol details, bug reports related to device communication, or to contribute to the underlying library, visit:
License
MIT -- see LICENSE for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/crlian/mcp-pyatv'
If you have feedback or need assistance with the MCP directory API, please join our Discord server