Skip to main content
Glama

MCP Media Player

You could just watch one episode. Or you could automate the pause button and pretend you have self-control. MCP Media Player connects any Home Assistant media player (TV, projector, speaker, etc.) to the Cursor coding environment. Play media while your agent works; when it's done, so is your break.

Dopamine-driven development, minus the binge-watching.

Features

  • Exposes play and pause controls for a media player as MCP tools

  • Integrates with Home Assistant's media player API

  • Provides Cursor rules for automating playback while the agent is working

Related MCP server: MCP Home Assistant

Requirements

  • Node.js 18 or higher (for native fetch and ES modules)

  • A running Home Assistant instance

  • A valid Home Assistant long-lived access token

Setup

  1. Clone the repository

  2. Install dependencies

npm install
  1. Configure MCP integration

Copy mcp.json.example to your MCP config location (e.g., ~/.cursor/mcp.json) and fill in your real values:

{
  "mcpServers": {
    "MediaPlayer": {
      "command": "node",
      "args": [
        "/absolute/path/to/your/media-player-mcp.js"
      ],
      "env": {
        "HA_URL": "http://your-ha-url:8123",
        "HA_TOKEN": "your_home_assistant_long_lived_token",
        "ENTITY_ID": "media_player.your_media_player_entity"
      }
    }
  }
}
  1. Add Cursor rules for automation

To automate the play/pause while the agent is working, copy the rules in cursor-rules.example into your Cursor rules configuration. This configures a system prompt rule that ensures the play/pause tools are called at the appropriate times.

  1. Start the MCP server

npm start

Or, let your MCP client launch it automatically.

License

MIT

Available Tools

2 tools
pause_media_playerA

Pause the media player via Home Assistant.

Inputs: no named parameters.

play_media_playerA

Play/resume the media player via Home Assistant.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have completely distinct purposes: one pauses, one plays. There is no overlap or confusion.

    Naming Consistency5/5

    Both tool names follow a consistent 'verb_noun' pattern (pause_media_player, play_media_player).

    Tool Count3/5

    With only 2 tools, the set feels thin for a media player. While it's not extreme, it falls into the borderline range where more tools would be expected.

    Completeness2/5

    The tool surface is severely incomplete. A media player typically requires stop, skip, volume control, etc., which are all missing.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables natural language control of Home Assistant smart home devices through Cursor AI, supporting entity queries, automation management, configuration file editing, and system operations.
      365 npm
      58
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Connects AI assistants to Home Assistant, enabling them to discover and control smart home entities, services, areas, devices, and cameras via the Model Context Protocol.
      4
      BSD 3-Clause
    • F
      license
      Not graded
      quality
      B
      maintenance
      Connects LLM coding agents to Home Assistant instances, enabling configuration file management, service calls, template testing, and automation diagnostics via MCP tools.
      2
      -