Music MCP Server

Music MCP Server

Enables music library management and Chromecast playback control via LM Studio, with 21 tools for search, playback, navigation, and queue management.

Category
Visit Server

README

šŸŽµ Music MCP Server

A Model Context Protocol (MCP) Server for music library management and Chromecast playbook control, optimized for LM Studio integration.

✨ Key Features

  • šŸŽÆ 21 Music Tools - Complete control over music playback and library
  • šŸ“” Chromecast Integration - Native Google Cast queue support
  • ⚔ Ultra-Fast Responses - No timeout issues with LM Studio (~20ms)
  • šŸ”„ Persistent Operation - Background server survives disconnections
  • šŸ“š Large Library Support - Tested with 13,294+ tracks

šŸš€ Quick Start

1. Installation

git clone <repository>
cd music-mcp-server
npm install

2. Configure LM Studio

Add to your LM Studio MCP configuration:

{
  "mcpServers": {
    "music": {
      "command": "C:\\Program Files\\nodejs\\node.exe",
      "args": ["lm-studio.js"],
      "cwd": "D:/mcp-server/music-mcp-server",
      "env": {
        "NODE_ENV": "production",
        "LOG_LEVEL": "error"
      },
      "timeout": 30000
    }
  }
}

3. Start Using

  1. Start server: start_music_server()
  2. Find devices: list_chromecasts()
  3. Search music: search_music({"query": "artist name"})
  4. Play tracks: play_multiple_tracks({"tracks": [1,2,3], "device_name": "device"})

šŸš€ Alternative: NPM Scripts

You can also run the interface using npm scripts:

# Start LM Studio interface
npm run lm-studio

# Start persistent server
npm run server

# Start server in background
npm run server:background

# Development mode
npm run dev

šŸ› ļø Available Tools

Server Management (3)

  • start_music_server - Start background server
  • stop_music_server - Stop background server
  • server_status - Check server health

Chromecast Control (3)

  • list_chromecasts - Discover devices
  • connect_chromecast - Connect to device
  • get_chromecast_status - Get connection status

Music Library (2)

  • search_music - Search tracks (supports fuzzy, exact matching)
  • get_library_stats - Library statistics

Playback (6)

  • play_track - Play single track
  • play_multiple_tracks - Play queue with native Cast support
  • pause_playback / resume_playbook / stop_playbook - Playbook control
  • get_playlist_status - Current playbook info

Navigation (4)

  • skip_to_next / skip_to_previous - Skip tracks
  • skip_to_track - Jump to specific track number
  • seek_to_position - Seek within track

Queue & Volume (3)

  • manage_queue - Add/remove/shuffle/repeat queue
  • set_volume - Volume control (0.0-1.0)
  • manage_playlist - Create/manage playlists

šŸ“ Project Structure

music-mcp-server/
ā”œā”€ā”€ lm-studio.js                      # Main LM Studio interface (renamed)
ā”œā”€ā”€ persistent-music-server.js        # Background music server
ā”œā”€ā”€ lm_studio_config_node.json       # LM Studio configuration
ā”œā”€ā”€ src/                              # Core application code
│   ā”œā”€ā”€ controllers/                  # Music & Chromecast controllers
│   ā”œā”€ā”€ services/                     # Database & Chromecast services
│   └── utils/                        # Utilities & validation
ā”œā”€ā”€ data/                             # Database & state files
ā”œā”€ā”€ docs/                             # API documentation
└── scripts/                          # Utility scripts

šŸ”§ Architecture

Two-Component Design

  1. lm-studio.js - Ultra-fast MCP interface for LM Studio (renamed for simplicity)
  2. persistent-music-server.js - Background server for music operations

Why This Works

  • No Timeouts: Protocol methods respond instantly
  • Persistent State: Music server runs independently
  • Automatic Management: Server starts/stops as needed
  • Error Recovery: Robust error handling and reconnection

šŸŽµ Supported Audio Formats

  • MP3, FLAC, WAV, AAC, M4A, OGG, WMA
  • Full ID3 metadata support
  • Automatic content-type detection

šŸ“Š Performance

  • Library Size: 13,294+ tracks tested
  • Response Time: ~20ms for protocol methods
  • Memory Usage: Optimized for large libraries
  • Network: Efficient Chromecast streaming

šŸ” Troubleshooting

Common Issues

  1. Tools not loading: Restart LM Studio after config changes
  2. Server not starting: Check port 8765 availability
  3. Chromecast not found: Ensure devices on same network
  4. Playback stops: Check Chromecast connection stability

Logs

  • Server logs: data/music-server.log
  • Check server status: server_status() tool

šŸ“„ License

MIT License - See LICENSE file for details


Ready for production use with LM Studio! šŸŽµ

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured