Skip to main content
Glama

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.

Related MCP server: social-video-mcp

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

Tool

Description

player_play

Play a file or URL, auto-starts mpv

player_pause

Toggle pause / resume

player_stop

Stop playback

player_next

Next track

player_prev

Previous track

player_seek

Seek by seconds / absolute time / percent

player_set_volume

Set volume (0–130)

player_set_speed

Set playback speed (0.5x / 1x / 2x …)

player_status

Get current playback status

player_shuffle

Shuffle playlist and play from the start

Playlist Management

Tool

Description

playlist_create

Create a new playlist

playlist_load

Load and play a saved playlist

playlist_add

Add files to a playlist

playlist_remove

Remove a track from a playlist

playlist_list

List all playlists or inspect one

playlist_delete

Delete 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

Available Tools

16 tools
player_nextB

Skip to the next item in the playlist.

Inputs: no named parameters.

player_pauseA

Toggle pause / resume playback.

Inputs: no named parameters.

player_playA

Open and play a media file or URL. If mpv is not running, it will be launched automatically.

Inputs: path (required), append.

player_prevA

Go back to the previous item in the playlist.

Inputs: no named parameters.

player_seekC

Seek within the current media.

Inputs: value (required), mode.

player_set_speedA

Set playback speed multiplier. 1.0 = normal speed.

Inputs: speed (required).

player_set_volumeA

Set playback volume (0–130). 100 is default.

Inputs: volume (required).

player_shuffleA

Randomly shuffle the current playlist and start playing from the first track.

Inputs: no named parameters.

player_statusA

Get current playback status: file name, position, duration, volume, speed, pause state.

Inputs: no named parameters.

player_stopA

Stop playback and clear the current file.

Inputs: no named parameters.

playlist_addA

Add files to an existing playlist.

Inputs: name (required), files (required).

playlist_createB

Create a new playlist with a list of file paths.

Inputs: name (required), files (required).

playlist_deleteB

Delete a saved playlist file.

Inputs: name (required).

playlist_listA

List all saved playlists or show contents of a specific playlist.

Inputs: name.

playlist_loadB

Load a saved playlist by name and start playing it.

Inputs: name (required).

playlist_removeB

Remove a file from a saved playlist by index (0-based).

Inputs: name (required), index (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 16 tools

    Disambiguation4/5

    Most tools are clearly distinct by action and target resource. The only mild overlap is player_play and playlist_load, since both start playback, but their inputs (file/URL vs saved playlist name) are different enough.

    Naming Consistency5/5

    All tools follow the same resource_verb pattern: player_* controls playback and playlist_* manages playlists. The naming is uniform and predictable; player_status is the only noun-style tool but still fits the pattern.

    Tool Count4/5

    16 tools is a slightly high but justifiable count for a media player server. Each tool maps to a real playback or playlist management operation, though a few could potentially be combined without much loss.

    Completeness4/5

    The surface covers core playback transport, volume/speed, status, and full playlist lifecycle (create, add, remove, list, load, delete). Minor gaps exist such as no explicit playlist reordering or mute control, but no critical dead ends for normal usage.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers