sonos-ts-mcp
Allows control of Sonos audio devices including playback, volume, queue management, group management, alarms, music library browsing, and EQ settings.
Enables browsing Spotify content such as artists, albums, and playlists through Sonos music service integration.
Enables browsing TuneIn radio stations and content through Sonos music service integration.
Click on "Deploy 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., "@sonos-ts-mcp play jazz in the living room"
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.
Sonos TypeScript MCP Server
Your comprehensive Sonos control companion powered by the Model Context Protocol (MCP). This intelligent server provides seamless access to Sonos audio devices over your local network using UPnP/SOAP protocols. Whether you're controlling playback, managing zones, browsing your music library, or setting up alarms, this MCP server delivers complete device control directly to your AI assistant, enabling smart home automation and better audio experiences.
Specifically designed for coding agents and AI-driven home audio automation workflows. This server enables AI assistants to build intelligent multi-room audio experiences, music library management, zone grouping, queue management, and integration with smart home platforms.
Data is sourced from real-time UPnP/SOAP communication with Sonos devices to ensure accuracy and completeness.
📊 Feature Status: Phase 4 complete! Implements real-time event subscriptions with UPnP GENA protocol for playback, volume, queue, and topology changes. See Phase 4 completion for details.
📚 Documentation
Comprehensive Tool Descriptions - Detailed guide for coding agents with use cases, workflows, and best practices for all 50+ tools
API Reference - Technical API documentation
Example Scripts - Sample automation scripts and use cases
Related MCP server: mac-audio-router-mcp
Getting Started
The Sonos TypeScript MCP Server can work with any MCP client that supports standard I/O (stdio) as the transport medium. Here are specific instructions for some popular tools:
Basic Configuration
Claude Desktop
To configure Claude Desktop to use the Sonos MCP server, edit the claude_desktop_config.json file. You can open or create this file from the Claude > Settings menu. Select the Developer tab, then click Edit Config.
{
"mcpServers": {
"sonos-ts-mcp": {
"command": "npx",
"args": ["-y", "sonos-ts-mcp@latest"]
}
}
}Cline
To configure Cline to use the Sonos MCP server, edit the cline_mcp_settings.json file. You can open or create this file by clicking the MCP Servers icon at the top of the Cline pane, then clicking the Configure MCP Servers button.
{
"mcpServers": {
"sonos-ts-mcp": {
"command": "npx",
"args": ["-y", "sonos-ts-mcp@latest"],
"disabled": false
}
}
}Cursor
To configure Cursor to use the Sonos MCP server, edit either the file .cursor/mcp.json (to configure only a specific project) or the file ~/.cursor/mcp.json (to make the MCP server available in all projects):
{
"mcpServers": {
"sonos-ts-mcp": {
"command": "npx",
"args": ["-y", "sonos-ts-mcp@latest"]
}
}
}Visual Studio Code Copilot
To configure a single project, edit the .vscode/mcp.json file in your workspace:
{
"servers": {
"sonos-ts-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "sonos-ts-mcp@latest"]
}
}
}To make the server available in every project you open, edit your user settings:
{
"mcp": {
"servers": {
"sonos-ts-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "sonos-ts-mcp@latest"]
}
}
}
}Windsurf Editor
To configure Windsurf Editor, edit the file ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"sonos-ts-mcp": {
"command": "npx",
"args": ["-y", "sonos-ts-mcp@latest"]
}
}
}Testing with an Agent
You can quickly test the MCP server using the built-in CLI agent, which uses natural language to interact with your Sonos system:
# Run directly with npx (no installation required)
npx sonos-agent-cli "Play jazz in the living room"
# Use a specific AI model
npx sonos-agent-cli "What's playing in the kitchen?" --model gpt-4o
# Use Gemini models
npx sonos-agent-cli "Set volume to 50 in all rooms" --model gemini-3-pro-previewRequired Environment Variables:
OPENAI_API_KEY: For OpenAI models (gpt-4o, gpt-4o-mini, etc.)GOOGLE_GENERATIVE_AI_API_KEY: For Gemini modelsSONOS_AGENT_MODEL: Set a default model (optional)
Build Behavior:
The CLI automatically builds the MCP server before running to ensure the latest code is used. To skip the build (e.g., during rapid testing), use --skip-build:
npx sonos-agent-cli "Play music" --skip-buildThis agent provides an easy way to verify that the MCP server is working correctly and can communicate with your Sonos devices.
Features
This MCP server provides comprehensive control of your Sonos audio system:
AI-Powered Agent Tool: Natural language control via the
sonos_agenttool (requires AI API keys) ✨ NEWTopology Persistence: Device topology automatically saved to disk and loaded on startup
Intelligent Device Resolution: Control devices by friendly name (e.g., "Kitchen") instead of UUIDs
Automatic Discovery: Discovers devices on startup and every 5 minutes
Device Discovery: Manual SSDP-based discovery of Sonos devices
Playback Control: Play, pause, stop, next, previous
Volume Control: Get and set volume levels, mute/unmute
Transport Info: Get current playback state and track information
Zone Topology: Query zone groups and speaker configurations
Queue Management: Full queue control (add, remove, reorder, save, play)
DIDL-Lite Support: Complete metadata handling for tracks, albums, and containers
Playback Properties: Shuffle, repeat, and crossfade controls
Group Management: Join and unjoin devices to create multi-room groups
Music Library Browsing: Browse artists, albums, tracks, genres, and playlists
Library Search: Fuzzy search across your music library
Audio/EQ Controls: Bass, treble, loudness, night mode, dialog enhancement
Sleep Timer: Automatic playback stop after duration
Alarm Management: Create, update, and delete alarms
Snapshot/Restore: Save and restore complete device state
Party Mode: Join all devices at once
Event Subscriptions: Real-time notifications for state changes ✨ NEW
MCP Prompts: Exposes AI agent instructions as discoverable prompts ✨ NEW
Pure TypeScript: Built from scratch without external Sonos libraries
MCP Compatible: Integrates with any MCP-compatible client
Planned Features (Phase 5+)
This project is actively expanding to match the comprehensive feature set of the Python SoCo library:
Music service integration (Spotify, Apple Music)
🟢 Advanced group management (stereo pairs, home theater)
🟢 Audio analysis and diagnostics
🟢 MCP event tool integration
See the Phase 4 completion for the latest features.
Tools Available
AI Agent Tool ✨ NEW
Tool | Description |
| AI-powered natural language control. Give instructions like "Play jazz in the living room" and the agent autonomously handles device discovery, tool selection, and execution. Only available when |
Discovery Tools
Tool | Description |
| Discover Sonos devices on the network using SSDP multicast |
| Manually add a Sonos device by IP address (useful when SSDP discovery fails) |
| List all discovered/registered devices |
Playback Control Tools
Tool | Description |
| Start playback |
| Pause playback |
| Stop playback |
| Skip to next track |
| Skip to previous track |
Volume Control Tools
Tool | Description |
| Set volume (0-100) |
| Get current volume |
| Mute or unmute |
Queue Management Tools
Tool | Description |
| Get the current playback queue |
| Add a URI to the queue |
| Remove a track from the queue |
| Remove all tracks from the queue |
| Play from a specific queue position |
| Save the queue as a Sonos playlist |
Playback Properties Tools
Tool | Description |
| Enable or disable shuffle mode |
| Set repeat mode (off, all, one) |
| Enable or disable crossfade |
| Get shuffle, repeat, crossfade, and playback state |
Group Management Tools
Tool | Description |
| Join a device to another device's group |
| Remove a device from its group |
| Join all devices at once |
Music Library Tools
Tool | Description |
| Browse all artists in the music library |
| Browse all albums in the music library |
| Browse all tracks in the music library |
| Browse all genres in the music library |
| Browse Sonos playlists |
| Get favorite radio stations from Sonos favorites |
| Search the music library |
| Browse subcategories (e.g., albums for an artist) |
Music Services Tools
Tool | Description |
| List available music services (Sonos Radio, TuneIn, Spotify, etc.) |
| Browse content from a music service (categories, stations, playlists) |
| Search for content within a music service |
| Play an item from a music service (radio station, track, album) |
| Get the streaming URI for a music service item |
Audio/EQ Control Tools
Tool | Description |
| Set bass level (-10 to 10) |
| Set treble level (-10 to 10) |
| Enable/disable loudness compensation |
| Get all EQ settings |
| Enable/disable night mode (home theater) |
| Enable/disable dialog enhancement (home theater) |
Sleep Timer Tools
Tool | Description |
| Set automatic playback stop timer |
| Get remaining timer |
| Cancel sleep timer |
Alarm Management Tools
Tool | Description |
| List all alarms |
| Create a new alarm |
| Update an existing alarm |
| Delete an alarm |
State Management Tools
Tool | Description |
| Take a snapshot of device state |
| Restore from snapshot |
Event Subscription Tools
Tool | Description |
| Subscribe to real-time device events (AVTransport, RenderingControl, Queue, ZoneGroupTopology, AlarmClock) |
| Unsubscribe from a specific subscription |
| Unsubscribe from all device subscriptions |
| List active event subscriptions |
Information Tools
Tool | Description |
| Get playback state |
| Get current track details |
| Get zone topology |
Development and Installation
npm install
npm run buildTest Discovery
After installation, you can test if your Sonos devices can be discovered:
npm run test:discoveryThis will perform an SSDP multicast search and display any Sonos devices found on your network.
Test Favorite Radio Stations
You can test the favorite radio stations feature:
npm run test:radioThis will query your Sonos device for saved radio stations and display them. If no stations are found, it will provide instructions on how to add some using the Sonos app.
Test Agent Tool
You can test the AI-powered agent tool (requires AI API keys):
# Set up your API key first
export OPENAI_API_KEY=sk-...
# or
export GOOGLE_GENERATIVE_AI_API_KEY=...
# Run the test
npm run test:agent-toolThis will verify that the agent tool is properly configured and can execute natural language instructions. See the Agent Tool Documentation for more details.
Usage
As MCP Server
The server supports two transport modes:
Stdio Mode (Default)
Stdio mode is the standard way to run MCP servers, communicating over standard input/output. This is the mode used by most MCP clients.
Add to your MCP client configuration:
{
"mcpServers": {
"sonos": {
"command": "node",
"args": ["path/to/sonos-ts-mcp/dist/index.js"]
}
}
}Or run directly:
node dist/index.jsYou can also use the convenience script:
npm run start:stdio
# or
tsx scripts/start-mcp-stdio.tsCLI Agent
The project includes a CLI agent powered by Mastra that allows you to control your Sonos system using natural language.
# Run with default model (gpt-4o-mini)
npx sonos-agent-cli "Play jazz in the living room"
# Run with a specific model
npx sonos-agent-cli "Play jazz in the living room" --model gpt-4o
# Run with Gemini 3
npx sonos-agent-cli "Play jazz in the living room" --model gemini-3-pro-previewEnvironment Variables:
OPENAI_API_KEY: Required for OpenAI models (default)GOOGLE_GENERATIVE_AI_API_KEY: Required for Gemini modelsSONOS_AGENT_MODEL: Set the default model (optional, e.g.,gemini-3-pro-preview)
Note on Telemetry: The Mastra framework's built-in telemetry has been disabled in this implementation. Telemetry warnings are suppressed by setting globalThis.___MASTRA_TELEMETRY___ = true before Mastra initialization. This is set automatically in the CLI agent.
SSE Mode (HTTP Server)
SSE (Server-Sent Events) mode runs the MCP server as an HTTP server, useful for web-based clients or remote access.
Set the MCP_TRANSPORT environment variable to sse:
MCP_TRANSPORT=sse node dist/index.jsOr with custom port (default is 3000):
MCP_TRANSPORT=sse MCP_PORT=8080 node dist/index.jsYou can also use the convenience script:
npm run start:sse
# or
tsx scripts/start-mcp-sse.tsWith custom port:
MCP_PORT=8080 npm run start:sseThe server will start an HTTP endpoint at http://localhost:3000/sse (or your configured port) that clients can connect to.
Development
npm run dev # Run with tsx (hot reload)
npm run build # Compile TypeScript
npm run typecheck # Type checking only
npm run lint # ESLint
npm run format # Prettier
npm test # Run tests
npm run test:discovery # Test Sonos device discovery
npm run test:phase1 # Test Phase 1 APIs (Queue, Playback)
npm run test:phase2 # Test Phase 2 APIs (Groups, Library)
npm run test:phase3 # Test Phase 3 APIs (Audio, Alarms)
npm run test:phase4 # Test Phase 4 APIs (Events)
npm run test:all-phases # Run all phase testsTesting
Comprehensive API test scripts are available for all implemented features:
# Run all tests
npm run test:all-phases
# Or run individual phase tests
npm run test:phase1 # Queue, DIDL, Playback Properties
npm run test:phase2 # Groups & Music Library Browsing
npm run test:phase3 # Audio, Alarms, Snapshots
npm run test:phase4 # Event Subscriptions
# Run Phase 2 tests in mock mode (no physical devices required)
npm run test:phase2 -- --mock
# Run integration tests (uses AI validation)
npm testNote: Phase 2 tests support a mock mode for testing without physical Sonos devices. Use --mock flag or set MOCK_DEVICES=true environment variable.
AI-Powered Integration Tests: The integration test suite uses Gemini 2.5 Flash AI to intelligently validate agent outputs instead of brittle string matching. This provides semantic understanding of test results and adapts to different output formats. Requires GOOGLE_GENERATIVE_AI_API_KEY environment variable.
See the API Testing Guide and AI-Powered Testing Guide for detailed documentation on the test suite.
Architecture
src/
├── discovery/ # SSDP device discovery
│ ├── ssdp-client.ts
│ └── device-registry.ts
├── didl/ # DIDL-Lite metadata handling
│ ├── didl-object.ts
│ ├── didl-resource.ts
│ ├── didl-item.ts
│ ├── didl-container.ts
│ ├── didl-serializer.ts
│ ├── didl-parser.ts
│ └── index.ts
├── soap/ # SOAP/UPnP transport layer
│ ├── client.ts
│ ├── request-builder.ts
│ └── response-parser.ts
├── services/ # Sonos service wrappers
│ ├── base-service.ts
│ ├── av-transport.ts # Playback, queue, sleep timer
│ ├── rendering-control.ts # Volume, EQ, audio enhancements
│ ├── zone-topology.ts # Groups, party mode
│ ├── content-directory.ts # Music library browsing
│ ├── alarm-clock.ts # ✨ NEW: Alarm management
│ └── snapshot.ts # ✨ NEW: State snapshot/restore
├── mcp/ # MCP server implementation
│ └── server.ts
└── types/ # TypeScript definitions
├── sonos.ts
└── queue.tsProtocol Details
Discovery (SSDP)
Sends UDP multicast to
239.255.255.250:1900Searches for
urn:schemas-upnp-org:device:ZonePlayer:1Parses response headers to extract device location
Note on Discovery: SSDP multicast discovery may not work in all network environments due to:
Windows Firewall blocking UDP port 1900
Network switches not properly forwarding multicast traffic
VPN interference with multicast routing
Corporate network policies
If automatic discovery fails, use the sonos_add_device tool to manually register devices by IP address. The server will verify connectivity before registering the device.
Manual Device Registration
When SSDP discovery doesn't work, you can manually add devices:
// Using the MCP tool
sonos_add_device({
ip: "192.168.1.100",
port: 1400, // optional, defaults to 1400
name: "Kitchen" // optional, defaults to "Sonos at {ip}"
})The server will test connectivity to the device before adding it to the registry.
Control (SOAP/UPnP)
HTTP POST to
http://{ip}:1400/...XML-based SOAP envelopes
Supports all standard Sonos UPnP services
Documentation
🤖 Agent Tool Guide - AI-powered natural language control ✨ NEW
📚 Comprehensive Tool Descriptions - Detailed guide for coding agents with use cases, workflows, and best practices for all 50+ tools
📦 Installation Guide - Detailed installation and configuration instructions
💾 Topology Persistence Guide - Device topology storage and management ✨ NEW
🎯 Device Resolution Guide - Using friendly device names ✨ NEW
🧪 API Testing Guide - Comprehensive test suite documentation
📘 Implementation Guide - Tool usage and examples
🏗️ Technical Architecture - System design details
📚 Phase Completion Docs - PHASE-1-COMPLETE.md through PHASE-4-COMPLETE.md
Contributing
Contributions are welcome! This project is expanding to provide comprehensive Sonos control. See the roadmap for planned features.
Areas where contributions are especially valuable:
Implementing additional UPnP services
Adding DIDL-Lite object model
Event subscription system
Test coverage expansion
Documentation improvements
License
MIT
Available Tools
59 toolssonos_add_deviceA
Manually add a Sonos device by IP address. Use when SSDP discovery fails due to network restrictions or firewall rules. Device must be network-accessible on port 1400.
Inputs: ip (required), name, port.
sonos_add_to_queueC
Add a track URI to the playback queue. Supports music library URIs and streaming service URIs. Optional metadata in DIDL-Lite XML format.
Inputs: uri (required), deviceId (required), metadata, playNext, +1 more.
sonos_browse_albumsB
Browse albums in the music library. Supports pagination for large collections.
Inputs: deviceId (required), count, startIndex.
sonos_browse_artistsB
Browse artists in the music library. Supports pagination for large collections.
Inputs: deviceId (required), count, startIndex.
sonos_browse_genresA
Browse music genres in the library. Supports pagination for large collections.
Inputs: deviceId (required), count, startIndex.
sonos_browse_itemA
Browse a specific library item to get its children. For example, get albums for an artist or tracks for an album.
Inputs: deviceId (required), objectId (required), count, startIndex.
sonos_browse_music_serviceA
Browse content from a music service. WARNING: Most services (especially Sonos Radio, Spotify, Apple Music) require authentication and will return empty results or errors if not authenticated. Check authType from sonos_list_music_services first. Only "Anonymous" services (like SomaFM Radio) are guaranteed to work. Use sonos_get_favorite_radio_stations instead for pre-configured radio stations.
Inputs: deviceId (required), serviceName (required), count, startIndex, +1 more.
sonos_browse_playlistsB
Browse Sonos playlists. Supports pagination for large collections.
Inputs: deviceId (required), count, startIndex.
sonos_browse_tracksB
Browse all tracks in the music library. Supports pagination for large collections.
Inputs: deviceId (required), count, startIndex.
sonos_cancel_sleep_timerB
Cancel the active sleep timer.
Inputs: deviceId (required).
sonos_clear_queueA
Remove all tracks from the queue. Does not stop current playback.
Inputs: deviceId (required).
sonos_create_alarmB
Create a new alarm with specified time, days, music source, and settings. Returns the alarm ID.
Inputs: deviceId (required), startTime (required), recurrence (required), volume, +2 more.
sonos_delete_alarmA
Delete an existing alarm permanently.
Inputs: alarmId (required), deviceId (required).
sonos_discoverA
Actively scan the network for Sonos devices using SSDP. Always call this when the sonos_list_devices tool returns empty or you are missing a device. Returns device UUID, IP address, room name, model, and firmware version. Use room name to communicate with the user.
Inputs: timeout.
sonos_get_eqA
Get current EQ settings including bass, treble, and loudness.
Inputs: deviceId (required).
sonos_get_favorite_radio_stationsA
Get favorite radio stations from Sonos favorites. Returns a list of saved radio stations with their metadata and streaming URIs.
Inputs: deviceId (required), count, startIndex.
sonos_get_music_service_item_uriA
Get the playable streaming URI for a specific music service item. This is useful for debugging or inspecting the actual stream URL.
Inputs: itemId (required), deviceId (required), serviceName (required).
sonos_get_playback_stateA
Get current playback settings including shuffle, repeat, crossfade, transport state, and speed.
Inputs: deviceId (required).
sonos_get_position_infoB
Get current track information, position, and duration. Includes track metadata like title, artist, album.
Inputs: deviceId (required).
sonos_get_queueA
Retrieve the current playback queue with track information. Supports pagination for large queues.
Inputs: deviceId (required), count, startIndex.
sonos_get_sleep_timerA
Get remaining sleep timer duration. Returns empty if no timer is active.
Inputs: deviceId (required).
sonos_get_transport_infoB
Get current transport state (playing, paused, stopped) and playback speed.
Inputs: deviceId (required).
sonos_get_volumeB
Get current volume level from a Sonos device.
Inputs: deviceId (required).
sonos_get_zone_groupsA
Get zone group topology showing which devices are grouped together and their coordinator.
Inputs: deviceId (required).
sonos_join_groupA
Join a device to another device's group for synchronized multi-room playback. The device will follow the master's playback.
Inputs: deviceId (required), masterDeviceId (required).
sonos_list_alarmsA
List all configured alarms including their schedule, enabled status, and room assignments.
Inputs: deviceId (required).
sonos_list_devicesA
List devices currently in the registry. Note: Call sonos_discover first to populate the registry if a device is not found in the current registry. Returns UUID, IP address, room name, model, and software version of registered devices. Use room name to communicate with the user.
Inputs: no named parameters.
sonos_list_music_servicesA
List all available music services (Sonos Radio, TuneIn, Spotify, etc.) registered with the Sonos system. Returns service details including name, ID, and authentication type. IMPORTANT: Most services require authentication (authType: DeviceLink or AppLink) and will not work unless the user has linked their account through the Sonos app. Only "Anonymous" services work without authentication.
Inputs: deviceId (required).
sonos_list_subscriptionsA
List all active event subscriptions for a device including subscription IDs and services.
Inputs: deviceId (required).
sonos_nextA
Skip to next track in the queue.
Inputs: deviceId (required).
sonos_party_modeA
Join all discovered devices to the specified device to create a whole-house audio experience.
Inputs: deviceId (required).
sonos_pauseA
Pause playback on a Sonos device. Maintains current position in track and queue for quick resume. If device is in a group, affects entire group.
Inputs: deviceId (required).
sonos_playA
Start or resume playback on a Sonos device. Continues from current queue position and respects volume settings. If device is in a group, affects entire group.
Inputs: deviceId (required).
sonos_play_from_queueB
Start playing from the queue at a specific position.
Inputs: deviceId (required), position (required).
sonos_play_music_service_itemA
Play a specific item from a music service such as a radio station, track, album, or playlist. Use the item ID from browse or search results.
Inputs: itemId (required), deviceId (required), serviceName (required), itemTitle.
sonos_previousA
Skip to previous track or restart current track if played more than a few seconds.
Inputs: deviceId (required).
sonos_remove_from_queueA
Remove a track from the queue at the specified position.
Inputs: deviceId (required), position (required).
sonos_restore_snapshotA
Restore a previously saved snapshot to return device to its captured state. Optionally fade in volume.
Inputs: deviceId (required), snapshot (required), fade.
sonos_save_queueB
Save the current queue as a Sonos playlist with the specified title.
Inputs: title (required), deviceId (required).
sonos_search_libraryB
Search the music library by artist, album, track, or genre. Returns matching items.
Inputs: deviceId (required), searchTerm (required), searchType (required), count, +1 more.
sonos_search_music_serviceA
Search for content within a music service. WARNING: Requires authentication for most services. Will return errors if the service requires DeviceLink or AppLink authentication and the user has not linked their account in the Sonos app. Prefer sonos_get_favorite_radio_stations for radio content.
Inputs: query (required), deviceId (required), serviceName (required), count, +1 more.
sonos_set_bassA
Set bass EQ level. Range: -10 (reduced bass) to +10 (enhanced bass).
Inputs: bass (required), deviceId (required).
sonos_set_crossfadeB
Enable or disable crossfade between tracks. Crossfade creates smooth transitions between songs.
Inputs: enabled (required), deviceId (required).
sonos_set_dialog_modeA
Set dialog enhancement for home theater devices. Enhances speech clarity in movies and TV shows.
Inputs: enabled (required), deviceId (required).
sonos_set_loudnessA
Enable or disable loudness compensation. Loudness boosts bass and treble at low volumes for better sound quality.
Inputs: enabled (required), deviceId (required).
sonos_set_muteA
Mute or unmute a Sonos device. Mute preserves volume level for quick unmute.
Inputs: mute (required), deviceId (required).
sonos_set_night_modeA
Set night mode for home theater devices. Reduces loud sounds and enhances quiet sounds for late-night viewing.
Inputs: enabled (required), deviceId (required).
sonos_set_repeatA
Set repeat mode for queue playback. Options: off (no repeat), all (repeat entire queue), one (repeat current track).
Inputs: mode (required), deviceId (required).
sonos_set_shuffleB
Enable or disable shuffle mode for queue playback.
Inputs: shuffle (required), deviceId (required).
sonos_set_sleep_timerA
Set a sleep timer to automatically stop playback after the specified duration. Format: HH:MM:SS (e.g., "00:30:00" for 30 minutes).
Inputs: deviceId (required), duration (required).
sonos_set_trebleA
Set treble EQ level. Range: -10 (reduced treble) to +10 (enhanced treble).
Inputs: treble (required), deviceId (required).
sonos_set_volumeA
Set volume level on a Sonos device. Range: 0 (silent) to 100 (maximum). Affects entire group if device is grouped.
Inputs: volume (required), deviceId (required).
sonos_snapshotA
Take a snapshot of current device state including playback, volume, and EQ settings. Returns snapshot data for later restoration.
Inputs: deviceId (required).
sonos_stopA
Stop playback on a Sonos device. Clears playback state, unlike pause which maintains position.
Inputs: deviceId (required).
sonos_subscribe_eventsB
Subscribe to real-time events from a Sonos device service to receive automatic notifications of state changes.
Inputs: service (required), deviceId (required), timeout.
sonos_unjoinA
Remove a device from its current group, making it a standalone player.
Inputs: deviceId (required).
sonos_unsubscribe_allA
Unsubscribe from all active event subscriptions for a specific device.
Inputs: deviceId (required).
sonos_unsubscribe_eventsA
Unsubscribe from a specific event subscription to stop receiving notifications.
Inputs: deviceId (required), subscriptionId (required).
sonos_update_alarmB
Update an existing alarm. Only specified fields will be changed.
Inputs: alarmId (required), deviceId (required), volume, enabled, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 59 tools
Each tool targets a specific action on a distinct Sonos resource (e.g., discovery, playback, EQ, grouping, alarms, music library). There is no functional overlap; even similar tools like sonos_discover and sonos_list_devices serve different purposes.
All tools consistently use the 'sonos_' prefix followed by a clear verb-noun or noun-verb pattern (e.g., sonos_play, sonos_set_volume, sonos_get_position_info). The naming is predictable and readable.
59 tools is high, but each addresses a specific aspect of Sonos control (playback, queue, EQ, grouping, alarms, music services, etc.). The count is commensurate with the extensive feature set of a whole-home audio system.
The tool set covers most essential operations: discovery, playback, queue management, EQ, grouping, alarms, sleep timer, snapshots, and music library/search. Minor gaps exist (e.g., no direct URI play without queue, no firmware update), but core workflows are fully supported.
Maintenance
Related MCP Connectors
Sonos MCP server: control your Sonos speakers from any MCP client. Play songs, artists and playlists, set volume, group rooms, move music to another room, switch to TV, spoken announcements and reminders. 27 tools, English and Chinese. Works through the official Sonos cloud, so there is no home bridge to install; sign in with OAuth. Requires the free ZoneFoundry iOS app.
Control your existing Philips lights, Sonos speakers, Roborock vacuums and other supported devices through Port OS cloud. Give ChatGPT, Claude and other MCP-compatible assistants access to the devices you connect. Turn off the living room lights, play music on your speakers, adjust the thermostat, run a vacuum in a room, check a camera snapshot or find a connected tracker. Available actions depend on your linked provider accounts and each device’s supported capabilities. Port OS runs in the cloud; no local server is required. You choose the account, device and capability permissions each assistant receives. Device operations require user OAuth; public tool discovery does not grant device access. Port OS is in alpha. Setup: https://portoperatingsystem.com/docs/getting-started/ Support: https://portoperatingsystem.com/contact/
Control your Tesla from your AI assistant - climate, charging, access, and security.
Manage digital signage screens, playlists and media from your AI assistant.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to control Music Assistant for music search, library browsing, playback, queue management, and playlist curation.42 PyPI2MIT
- AlicenseAqualityDmaintenanceEnables AI agents to manage macOS audio routing, device switching, volume control, and multi-zone playback.16MIT
- FlicenseNot gradedqualityBmaintenanceEnables natural language control of Music Assistant home audio system, including playing music, controlling playback, adjusting volume, and managing queues, with intelligent player and provider resolution.2-
- AlicenseNot gradedqualityCmaintenanceEnables LLMs to control a Lyrion Music Server (LMS/Squeezebox) for playback, search, library browsing, and player management.-