# mpv-mcp-server [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/arijit-gogoi/mpv-mcp-server  
**GitHub Stars:** 1  
**npm Downloads (last month):** 265  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mpv-mcp-server

## Description
Control mpv media player — playback, playlists, YouTube streaming, and downloads.

## Tools
Capabilities this server exposes over MCP:

- **mpv_status** — Get current mpv playback status: track title, position, duration, volume, and pause state.
- **mpv_play** — Play a file by path or search term. Searches your Music and Videos folders when given a name like "sultans of swing".
- **mpv_pause** — Pause the currently playing track.
- **mpv_resume** — Resume playback if paused.
- **mpv_stop** — Stop playback and clear the current file. The playlist is preserved.
- **mpv_next** — Skip to the next track in the playlist.
- **mpv_prev** — Go back to the previous track in the playlist.
- **mpv_seek** — Seek to a position. Accepts seconds ("90"), timestamp ("1:30"), or relative ("+10", "-30").
- **mpv_volume** — Get or set the playback volume. Provide a level (0-150) to set, or omit to get current volume.
- **mpv_playlist** — Show the current playlist with track numbers and the active track marked.
- **mpv_add** — Add a file to the playlist by path or search term. Use mode "append-play" to start playing it immediately.
- **mpv_load_playlist** — Load a playlist file (.txt, .m3u). Omit path to list available playlists.
- **mpv_browse** — List available music and video files. Optionally filter by search term or directory.
- **mpv_youtube** — Search YouTube and stream the result through mpv. Accepts a search query or a direct YouTube URL.
- **mpv_download** — Download audio or video from YouTube. Specify format: "audio" for MP3, "video" for full video.
- **mpv_info** — Get metadata (artist, title, album, genre, etc.) for a file by search term, or the currently playing track if omitted.
- **mpv_tag** — Write metadata tags to a media file using ffmpeg. Can target a file by search term. Infers artist/title from the filename if not provided.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mpv-mcp-server": {
    "command": "npx",
    "args": ["-y","mpv-mcp-server"],
    "env": {
      "MPV_PATH": "",
      "MPV_IPC_PATH": "",
      "MPV_MEDIA_DIRS": "",
      "MPV_DOWNLOAD_DIR": ""
    }
  }
}
```

**Requires environment variables:** `MPV_PATH`, `MPV_IPC_PATH`, `MPV_MEDIA_DIRS`, `MPV_DOWNLOAD_DIR` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What mpv-mcp-server does

The mpv-mcp-server MCP server exposes mpv media-player operations as MCP tools. It can play a file using a path or search term, pause or resume playback, stop playback, report status, seek by seconds or time notation, and read or change volume from 0 to 150.

Library tools let an agent scan configured media directories, search for files, inspect the current playlist, add tracks, load `.m3u`, `.pls`, or `.txt` playlist files, and move to the next or previous item. This makes the server suitable for local music and video collections rather than only one-off playback commands.

YouTube support is available through `mpv_youtube`, which searches YouTube and streams results through mpv, including an append mode. `mpv_download` saves YouTube audio or video locally. Metadata tools can inspect the current track or a searched file and write artist, title, album, genre, date, and comment tags.

## How it works

The mpv-mcp-server MCP server communicates with mpv through mpv's JSON IPC interface. On Windows, communication uses a named pipe; on macOS and Linux, it uses a Unix domain socket. If mpv is not already running, the server starts it in idle mode. The mpv process is detached, so playback continues if the MCP server exits.

The server is implemented for Node.js 22 or newer. mpv must be available on the system path unless its executable location is configured explicitly.

## Setup and configuration

Install mpv and Node.js 22 or newer. Install `yt-dlp` if YouTube search, streaming, or downloading is needed. Install `ffmpeg` for audio extraction, metadata reading through `ffprobe`, and tag writing. YouTube features require `yt-dlp`, while audio downloads also require `ffmpeg`.

The mpv-mcp-server MCP server can be launched with `npx -y mpv-mcp-server` from an MCP client configuration. The README gives configurations for Claude Code and Claude Desktop. Configuration is supplied through environment variables, and defaults are available for every setting:

- `MPV_PATH` selects the mpv executable; the default is `mpv`.
- `MPV_IPC_PATH` sets the IPC endpoint. Defaults are `/tmp/mpv-ipc.sock` on Unix and `\\.\pipe\mpvpipe` on Windows.
- `MPV_MEDIA_DIRS` provides comma-separated directories to scan. The default is `~/Music,~/Videos`.
- `MPV_DOWNLOAD_DIR` sets the download destination. The default is `~/Downloads`.

## Tools and capabilities

Playback tools cover play, pause, resume, stop, status, seeking, and volume. Library and playlist tools cover browsing, searching, queue management, playlist loading, and track navigation. YouTube tools handle search-based streaming and downloads. Metadata tools provide file information and tag updates; both infer artist and title from filenames using an `Artist - Title` pattern.

## Limitations and notes

YouTube operations depend on external `yt-dlp`, and audio downloads additionally depend on `ffmpeg`. Metadata inspection and tagging also require `ffmpeg`. macOS and Linux support is present but untested, while Windows is the tested platform.

_Full upstream README: https://allmcps.com/mcp/mpv-mcp-server/readme_

