MCP Hub
Back to servers

mcp-mpv-player

Control mpv media player through AI conversation. Play music and video, manage playlists — all via natural language. Works with opencode and any MCP-compatible AI tool.

glama
Forks
1
Updated
Mar 22, 2026

mcp-mpv-player

npm version npm downloads

中文文档

Control mpv media player through AI conversation. Play music and video, manage playlists — all via natural language.

Works with opencode and any MCP-compatible AI tool.

mcp-mpv-player MCP server

Installation

Make sure Node.js is installed, then run:

npx mcp-mpv-player

The setup wizard will automatically:

  • Detect or install mpv
  • Locate your opencode config file
  • Register the MCP tool

Restart opencode when done.

Usage Examples

Just talk to your AI naturally:

Play D:/Music/song.mp3
Pause
Next track
Skip forward 30 seconds
Jump to 2 minutes 30 seconds
Set volume to 80
Create a playlist called "chill" with D:/Music/a.mp3 and D:/Music/b.mp3
Play the "chill" playlist
Shuffle

Tools

Playback Control

ToolDescription
player_playPlay a file or URL, auto-starts mpv
player_pauseToggle pause / resume
player_stopStop playback
player_nextNext track
player_prevPrevious track
player_seekSeek by seconds / absolute time / percent
player_set_volumeSet volume (0–130)
player_set_speedSet playback speed (0.5x / 1x / 2x …)
player_statusGet current playback status
player_shuffleShuffle playlist and play from the start

Playlist Management

ToolDescription
playlist_createCreate a new playlist
playlist_loadLoad and play a saved playlist
playlist_addAdd files to a playlist
playlist_removeRemove a track from a playlist
playlist_listList all playlists or inspect one
playlist_deleteDelete a playlist

Playlists are saved as .m3u files in %USERPROFILE%\mpv-playlists\.

Requirements

  • Windows 10 / 11
  • Node.js 18+
  • mpv (can be installed automatically by the setup wizard)

How It Works

mpv exposes a JSON IPC interface via a Windows Named Pipe (\\.\pipe\mpv-ipc). This tool runs as an MCP server, receives commands from the AI, and forwards them to mpv.

When player_play is called and mpv is not running, it is launched automatically with the IPC flag and stays running in the background between tracks.

License

MIT

Reviews

No reviews yet

Sign in to write a review