Labsco
MCP SERVER

MCP Media Player

by danielsims

Play and pause a Home Assistant media player from your coding agent — media runs while the agent works, and stops when it stops.

IoT, Smart Home & Embedded Hardware
Summary
The Cursor rules are the feature, not the two tools.

Play and pause over Home Assistant is a few lines of code. What makes this worth installing is the automation around it — the agent's working state drives the playback, so the break starts and ends on its own instead of on your self-control. It controls one entity, named in the config, so this is a single-screen setup rather than a whole-house remote.

What it is

An MCP server that connects a Home Assistant media player — a TV, a projector, a speaker — to the Cursor coding environment. It exposes play and pause, and ships Cursor rules that call them at the right moments, so playback starts when the agent begins working and stops when it finishes.

What you get
  • Play and pause controls for one configured media player entity, exposed as MCP tools
  • Integration with Home Assistant's media player API, so it works with whatever device Home Assistant already controls
  • Cursor rules in the repository that automate the calls: a system prompt rule that plays while the agent is working and pauses when it is done, rather than you remembering to
Requirements

A running Home Assistant instance and a long-lived access token from it. Three variables: `HA_URL` for the instance, `HA_TOKEN` for the token, and `ENTITY_ID` naming the one media player it controls. Node.js 18 or higher, for native fetch and ES modules. There is no published package: clone, `npm install`, copy `mcp.json.example` into your MCP config with real values, and let the client launch it. The Home Assistant token grants what your account can do, so serve the instance over HTTPS before handing it out.