WS

winstonfassett/sonos-mcp-server

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

11 stars 3 forks 품질 69 트렌드 26

이 프로젝트는 Sonos MCP (Model Context Protocol) 서버로 네트워크에 Sonos 장치와 제어하고 상호 작용할 수 있습니다.

개요

이 프로젝트는 Sonos MCP (Model Context Protocol) 서버로 네트워크에 Sonos 장치와 제어하고 상호 작용할 수 있습니다. 재생, 재생, 재생 장치 상태, 관리 큐와 같은 다양한 기능을 제공합니다. - 네트워크에서 Sonos 장치를 발견 - 장치의 검색 및 제어 재생 상태 - 재생 큐를 관리 - MCP 도구로 기능 노출 - Python 3.12+ - Python 프로젝트 관리 2. uv를 사용하여 필요한 의존도를 설치하십시오: 서버는 MCP streamable-http 수송을 기본적으로 지원합니다 (mcp SDK >= 1.12). 필요한 프록시 없음: 이전 대안 (deprecated - 위의 streamable-http 선호) : MCP Inspector와 "development"모드에서 서버를 실행하려면: 이 명령은 테스트 및 디버깅 목적으로 MCP Inspector를 호스트합니다.

개요(AI 번역)

이 프로젝트는 Sonos MCP (Model Context Protocol) 서버로 네트워크에 Sonos 장치와 제어하고 상호 작용할 수 있습니다. 재생, 재생, 재생 장치 상태, 관리 큐와 같은 다양한 기능을 제공합니다.

특징

  • 네트워크에 Sonos 장치를 발견
  • 장치 검색 및 제어 재생 상태
  • 재생 쿼리 관리
  • MCP 도구로의 기능 노출

요구 사항

  • 파이썬 3.12+
  • uv Python 프로젝트 관리

설치

Git에서 (직접 설치)

개발

  1. 저장소를 복제:

  2. uv를 사용하여 필요한 의존도를 설치하십시오.

사용법

서버 실행

스트로디

stdio를 사용하여 서버를 실행:

HTTP (streamable-http)

서버는 MCP streamable-http 수송을 기본적으로 지원합니다 (mcp SDK >= 1.12). 필요한 프록시 없음:

종료점: http://127.0.0.1:8090/mcp

환경 변수:

| Var | 기본 | 주의 | |—||||| | [T3] | stdio | [T5], sse, 또는 [T7] | | [T8] | 127.0.0.1 | HTTP 바인딩 주소 | | SONOS_MCP_PORT | 8000 | HTTP port (path is [T12]]) |

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Sonos MCP Server

This project is a Sonos MCP (Model Context Protocol) server that allows you to control and interact with Sonos devices on your network. It provides various functionalities such as discovering devices, controlling playback, retrieving device states, and managing queues.

Features

  • Discover Sonos devices on the network
  • Retrieve and control playback state for devices
  • Manage playback queues
  • Expose functionalities as MCP tools

Requirements

  • Python 3.12+
  • uv for managing Python projects

Installation

From Git (Direct Install)

pip install git+https://github.com/WinstonFassett/sonos-mcp-server.git

For Development

  1. Clone the repository:

    git clone https://github.com/WinstonFassett/sonos-mcp-server.git
    cd sonos-mcp-server
    
  2. Install the required dependencies using uv:

    uv sync
    

Usage

Running the Server

Stdio

Run the server using stdio:

uv run mcp run server.py

HTTP (streamable-http)

The server supports the MCP streamable-http transport natively (mcp SDK >= 1.12). No proxy needed:

SONOS_MCP_TRANSPORT=streamable-http \
SONOS_MCP_HOST=127.0.0.1 \
SONOS_MCP_PORT=8090 \
uv run sonos-mcp-server

Endpoint: http://127.0.0.1:8090/mcp

Environment variables:

Var Default Notes
SONOS_MCP_TRANSPORT stdio stdio, sse, or streamable-http
SONOS_MCP_HOST 127.0.0.1 HTTP bind address
SONOS_MCP_PORT 8000 HTTP port (path is /mcp)
SONOS_MCP_ALLOWED_HOSTS (localhost only) Extra Host headers to accept, comma-separated. Needed when serving behind a proxy with a different hostname (e.g. mac-mini.tailc3138.ts.net:*).
SONOS_DEVICE_IPS (SSDP discovery) Comma-separated speaker IPs. Skips SSDP multicast and resolves names over unicast SOAP — required when the process can’t multicast (e.g. launchd without Local Network permission).

Legacy: SSE with supergateway

Older alternative (deprecated — prefer streamable-http above):

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

Development

To run the server in “development” mode with the MCP Inspector:

uv run mcp dev server.py

This command hosts an MCP Inspector for testing and debugging purposes.

To run the server with SSE in development mode, use the SSE command for supergateway, and in a second terminal window run:

npx @modelcontextprotocol/inspector

Install in Claude Desktop

After publishing to git, users can install directly:

mcp install git+https://github.com/WinstonFassett/sonos-mcp-server.git

Or add to Claude Desktop config:

{
  "mcpServers": {
    "sonos": {
      "command": "sonos-mcp-server"
    }
  }
}

Available MCP Tools

Use the exposed MCP tools to interact with Sonos devices. The available tools include:

GitHub에서 전체 README 보기

설치

npx -y supergateway --port 8000 --stdio "uv run mcp run server.py"
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "sonos": { "command": "sonos-mcp-server" } } }