Skip to main content
Glama

Sonos MCP Server

Sonos MCP 服务器

该项目是一个 Sonos MCP(模型上下文协议)服务器,允许您控制并与网络上的 Sonos 设备交互。它提供各种功能,例如发现设备、控制播放、检索设备状态和管理队列。

特征

  • 发现网络上的 Sonos 设备
  • 检索和控制设备的播放状态
  • 管理播放队列
  • 将功能公开为 MCP 工具

要求

  • Python 3.7+
  • uv用于管理 Python 项目

安装

  1. 克隆存储库:
    git clone https://github.com/WinstonFassett/sonos-mcp-server.git cd sonos-mcp-server
  2. 使用uv安装所需的依赖项:
    uv sync

用法

运行服务器

标准输入输出系统

使用 stdio 运行服务器:

uv run mcp run server.py
带有超级网关的 SSE

使用supergateway工具通过 SSE 运行服务器:

npx -y supergateway --port 8000 --stdio "uv run mcp run server.py"

或者,您可以使用存储库中提供的便捷脚本:

./npx-serve-sse-8000.sh

发展

要使用 MCP Inspector 以“开发”模式运行服务器:

uv run mcp dev server.py

此命令承载 MCP 检查器以用于测试和调试目的。

要在开发模式下使用 SSE 运行服务器,请使用 supergateway 的 SSE 命令,然后在第二个终端窗口中运行:

npx @modelcontextprotocol/inspector

可用的 MCP 工具

使用公开的 MCP 工具与 Sonos 设备交互。可用的工具包括:

  • get_all_device_states :检索所有已发现的 Sonos 设备的状态信息。
  • now_playing :检索有关所有 Sonos 设备上当前播放曲目的信息。
  • get_device_state :检索特定 Sonos 设备的状态信息。
  • pausestopplay :控制 Sonos 设备上的播放。
  • nextprevious :跳过 Sonos 设备上的曲目。
  • get_queueget_queue_length :管理 Sonos 设备的播放队列。
  • mode :获取或设置 Sonos 设备的播放模式。
  • partymode :在当前 Sonos 设备上启用派对模式。
  • speaker_info :检索 Sonos 设备的扬声器信息。
  • get_current_track_info :检索 Sonos 设备的当前曲目信息。
  • volume :获取或设置 Sonos 设备的音量。
  • skipplay_indexremove_index_from_queue :管理 Sonos 设备队列中的曲目。

执照

本项目遵循 MIT 许可证。详情请参阅LICENSE文件。

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

该服务器允许您通过模型上下文协议控制并与网络上的 Sonos 设备交互,提供发现设备、控制播放、检索设备状态和管理队列的功能。

  1. 特征
    1. 要求
      1. 安装
        1. 用法
          1. 运行服务器
          2. 发展
          3. 可用的 MCP 工具
        2. 执照

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A server that enables interaction with Home Assistant devices and automations through the Model Context Protocol, allowing users to monitor device states, control devices, trigger automations, and list entities.
            Last updated -
            4
            43
            JavaScript
            MIT License
            • Apple
          • A
            security
            F
            license
            A
            quality
            A Model Context Protocol server that enables interaction with Service Nervous System (SNS) DAOs on the Internet Computer, allowing users to list proposals, view neurons, get system parameters, manage wallets, and vote on proposals.
            Last updated -
            6
            5
            TypeScript
            • Apple
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that provides programmatic access to ONOS SDN controller's network management capabilities, enabling device control, topology management, and analytics through ONOS's REST API.
            Last updated -
            4
            Python
            GPL 3.0
          • A
            security
            A
            license
            A
            quality
            A server implementing the Model Context Protocol that provides filesystem operations (read/write, directory management, file movement) through a standardized interface with security controls for allowed directories.
            Last updated -
            9
            3
            TypeScript
            MIT License

          View all related MCP servers

          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/WinstonFassett/sonos-mcp-server'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server