Get the FREE Ultimate OpenClaw Setup Guide →

sonos

MCP server from WinstonFassett/sonos-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio winstonfassett-sonos-mcp-server python server.py \
  --env PYTHONUNBUFFERED="1"

How to use

This MCP server provides a set of tools to discover and control Sonos devices on your network. It exposes MCP tools such as get_all_device_states, now_playing, get_device_state, playback controls (play, pause, stop, next, previous), queue management (get_queue, get_queue_length, skip, play_index, remove_index_from_queue), volume control, mode and party mode toggles, and device information like speaker_info and get_current_track_info. Run the server in a Python/uv environment and connect to it via MCP-compatible clients to issue tool commands and retrieve state information from all Sonos devices detected on your network. The server supports both STDIO and SSE (via a supergateway) modes for flexible integration with your tooling stack.

How to install

Prerequisites:

  • Python 3.7+
  • uv (for Python project management and running the MCP server via the uv wrapper)

Installation steps:

  1. Clone the repository: git clone https://github.com/WinstonFassett/sonos-mcp-server.git cd sonos-mcp-server

  2. Install dependencies using uv: uv sync

  3. Run the server (stdio mode): uv run mcp run server.py

  4. Optional: Run with SSE and Supergateway for browser-friendly streaming: npx -y supergateway --port 8000 --stdio "uv run mcp run server.py"

  5. Development mode (with MCP Inspector): uv run mcp dev server.py npx @modelcontextprotocol/inspector

Additional notes

Notes: The server uses the uv tool for Python-based MCP projects. Ensure your environment has network access to Sonos devices on your LAN. If you encounter device discovery issues, verify that UDP multicast is enabled on your network and that Python has the necessary permissions to bind to network interfaces. The available MCP tools cover common playback and state management needs; you can extend or customize tooling by integrating with the MCP framework as needed. If you deploy behind a firewall, consider exposing the SSE gateway port (default 8000) and ensuring the supergateway can reach the local MCP server.

Related MCP Servers

Sponsor this space

Reach thousands of developers