discord-music-mcp
Lets the server play music in Discord voice channels. It lists the servers and voice channels the companion bot can join, resolves channels by name (partial names work) or ID, joins the requested voice channel, and can stop playback and leave the channel. Capabilities include playing a track in a specific guild/voice channel and reporting what is currently playing and where.
Provides YouTube music search and playback: plays the top YouTube result for a text search or a direct URL, and can search YouTube and return a list of results (e.g. several versions of a song) without playing them, so the user can pick one.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@discord-music-mcp play some lo-fi in the Lobby"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
discord-music-mcp
An MCP server that lets Claude (or any MCP client) play music in your Discord voice channel.
"Play some lo-fi in the Lobby" β πΆ
π Learning MCP? This repo is also a commented, step-by-step tutorial (Turkish): docs/TUTORIAL.tr.md.
How it relates to Discord YouTube DJ
This repo is not a Discord bot. It's a small adapter in front of Discord YouTube DJ, the self-hosted bot that does the actual work.
ββββββββββββββββββββ stdio (JSON-RPC) ββββββββββββββββββββ HTTP 127.0.0.1:1231 ββββββββββββββββββββββββ βββββββββββ
β Claude Desktop / β ββββββββββββββββββΊ β discord-music-mcpβ βββββββββββββββββββββΊ β Discord YouTube DJ β ββββββΊ β Discord β
β Claude Code β ββββββββββββββββββ β (this repo) β βββββββββββββββββββββ β bot (other repo) β voice β β
ββββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββββββ βββββββββββClaude starts this server as a child process when it needs it. You don't run it yourself.
This server turns tool calls (
play_song,stop_music, β¦) into requests to the bot's local API.The bot holds the Discord token and joins voice channels. This repo never sees or needs your Discord token.
Because the bot only accepts connections from
127.0.0.1, this server must run on the same computer as the bot.
discord-music-mcp (this repo) | ||
Talks to Discord | β | β |
Needs the bot token | β (entered once in its dashboard) | β |
Runs | all the time (starts with Windows) | only while Claude uses it |
Required | β | optional |
Related MCP server: YouTube Search & Download MCP Server
What you need
Item | Needed? | Secret? | Where you get it |
Discord YouTube DJ installed, set up, and running | β | β | Follow its README. The bot must be invited to a server, and the dashboard at http://localhost:1231 should show "Online". |
Node.js 20+ | β | β | nodejs.org. The Windows installer of the bot bundles its own Node, but this repo needs a normal install. |
β | β | git-scm.com (or download this repo as a ZIP) | |
An MCP client | β | β | Claude Desktop, Claude Code, or any other MCP client |
Bot address | only if not default | no |
|
Not needed: no Discord token, no client secret, no API keys, no server or channel IDs. You refer to channels by name ("Lobby"). Channel IDs also work: enable Discord Settings β Advanced β Developer Mode, then right-click a channel β Copy Channel ID.
Setup
1. Get the code
git clone https://github.com/cengizhanpece/discord-music-mcp
cd discord-music-mcp
npm installNote the full path of src/index.js. You'll need it below, e.g. C:\Users\you\discord-music-mcp\src\index.js or /home/you/discord-music-mcp/src/index.js.
2. Check that it can reach the bot
npm testYou should see the list of tools followed by your voice channels. If you see "Could not reach the Discord YouTube DJ bot", start the bot first.
3. Connect it to your MCP client
Claude Code:
claude mcp add discord-music -- node "C:\full\path\to\discord-music-mcp\src\index.js"Then run /mcp inside Claude Code to confirm it's connected.
Claude Desktop: open Settings β Developer β Edit Config (this opens claude_desktop_config.json) and add:
{
"mcpServers": {
"discord-music": {
"command": "node",
"args": ["C:\\full\\path\\to\\discord-music-mcp\\src\\index.js"]
}
}
}On Windows, write the path with double backslashes (\\) as shown. Fully quit Claude Desktop (including the tray icon) and reopen it.
Non-default bot port: if you changed the bot's port, add the address to the config. MCP clients don't pass your terminal's environment variables to the server, so it has to go in the config:
claude mcp add discord-music -e MUSIC_BOT_URL=http://localhost:4000 -- node "C:\full\path\to\discord-music-mcp\src\index.js""discord-music": {
"command": "node",
"args": ["C:\\full\\path\\to\\discord-music-mcp\\src\\index.js"],
"env": { "MUSIC_BOT_URL": "http://localhost:4000" }
}4. Try it
"Which voice channels can you play in?" "Play Daft Punk β Get Lucky in the Lobby." "Search for three versions of Kuzu Kuzu and let me pick." "What's playing?" / "Stop the music."
Updating
cd discord-music-mcp
git pull
npm installRestart Claude Desktop, or run /mcp β reconnect in Claude Code.
What it can do
Tool | Description |
| Play a URL or the top YouTube result for a search. Optional |
| Search YouTube and list results without playing. |
| List servers and voice channels the bot can join. |
| What's playing, and where. |
| Stop and leave the voice channel. |
Also: resource discord://voice-channels and prompt dj ("pick something that fits a mood and play it").
Troubleshooting
Symptom | Fix |
Could not reach the Discord YouTube DJ bot | Start the bot (Start menu β Discord YouTube DJ). Check that http://localhost:1231 opens. |
The bot is not connected to Discord yet | Finish the bot's setup in its dashboard (token + invite). |
π channel / "The bot can't play in β¦" | The bot has no access to that private channel. See Private voice channels. |
No voice channel selected | Name a channel in your request, or pick one in the bot's dashboard. |
Server doesn't show up in Claude | Check the path to |
Wrong port / 404 errors | Set |
Development
node scripts/test-client.js search "daft punk" # a ~40-line MCP client, see how a host talks to the server
node scripts/test-client.js play "daft punk get lucky"
npm run inspect # MCP Inspector UILogs go to stderr. stdout is reserved for the JSON-RPC stream.
License
MIT
Available Tools
5 toolslist_voice_channelsSes kanallarΔ±nΔ± listeleARead-only
Botun eriΕebildiΔi tΓΌm Discord sunucularΔ±nΔ± ve ses kanallarΔ±nΔ± listeler. KullanΔ±cΔ± bir kanaldan bahsettiΔinde ve hangisi olduΔu belirsizse kullan.
Inputs: guild.
now_playingΕu an ne Γ§alΔ±yor?BRead-only
Botun baΔlΔ± olduΔu kanalΔ± ve Γ§alan ΕarkΔ±yΔ± gΓΆsterir.
Inputs: no named parameters.
play_songΕarkΔ± Γ§alA
Discord ses kanalΔ±nda bir ΕarkΔ± Γ§almaya baΕlar (o an Γ§alanΔ± keser). Ya doΔrudan bir URL (YouTube, SoundCloud vb.) ya da arama metni ver; arama metni verilirse ilk YouTube sonucu Γ§alΔ±nΔ±r. channel verilmezse bot en son kullanΔ±lan kanalda Γ§alar.
Inputs: song (required), guild, channel.
search_songsYouTube'da ΕarkΔ± araARead-only
YouTube'da arama yapar ve sonuΓ§larΔ± (baΕlΔ±k, kanal, sΓΌre, URL) dΓΆndΓΌrΓΌr. Bir Εey ΓALMAZ. KullanΔ±cΔ± seΓ§enek gΓΆrmek istediΔinde ya da doΔru versiyondan emin olmak istediΔinde kullan; sonra play_song'a seΓ§ilen URL'yi ver.
Inputs: query (required), limit.
stop_musicMΓΌziΔi durdurAIdempotent
Γalan mΓΌziΔi durdurur ve botu ses kanalΔ±ndan Γ§Δ±karΔ±r.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 5 tools
Most tools target distinct actions: list channels, search, play, stop, and status. The main overlap is that play_song can accept a search text and play the first result, which could be confused with search_songs, but descriptions clearly guide the agent to use search_songs for selecting options.
Names mostly follow a snake_case verb_noun pattern (list_voice_channels, search_songs, play_song), but now_playing is not verb-first and stop_music uses 'music' while others use 'song'/'songs'. Minor deviations keep it readable but slightly inconsistent.
Five tools is well within the ideal range and each tool has a clear, non-redundant role in the music playback workflow. No obvious bloat or missing count-driven concerns.
The surface covers basic play, stop, search, and status, but omits common music bot operations like queue management, skip, pause/resume, and volume control. These gaps will cause agent failures for typical user requests, such as skipping a track or adding to a queue.
Maintenance
Related MCP Connectors
Generate AI music via the Lacuna Music API from MCP clients like Claude Desktop & Code.
Discord MCP server for ChatGPT, Claude and any AI agent: list servers and channels, read channel messages, search messages, send message, reply to message, send DM, read mentions and assign role in your own Discord account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Discord yourself; Cotlet does not store your password and you need no Discord API key. About the official Discord API: Yes, Discord has an official API for bots and OAuth2 apps, but it acts as a bot that a server manager adds, not as you, and Discord has no official MCP server for it (checked 5 Nov 2026). The MCP server on Discord's docs site only searches documentation. Setup and FAQ: https://cotlet.dev/integrations/discord-api-mcp-server
Spotify MCP server for ChatGPT, Claude and any AI agent: search songs and artists, list playlists, read playlist songs, create playlist, add songs to playlist, remove songs from playlist, set playlist public or private and save to Liked Songs in your own Spotify account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Spotify yourself; Cotlet does not store your password and you need no Spotify API key. About the official Spotify API: Spotify has a full Web API and, since 23 Apr 2026, an official connector for Claude (checked 5 Nov 2026). The API needs an app you register, and in development mode the app owner must have Premium and the app allows 5 users; unlimited users need a registered business with at least 250,000 monthly users. Setup and FAQ: https://cotlet.dev/integrations/spotify-api-mcp-server
MCP server for Producer/Riffusion AI music generation
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to search YouTube for music, download videos as MP3 files, and play audio with playback controls.8-
- AlicenseAqualityDmaintenanceEnables searching, retrieving metadata, and downloading YouTube videos or audio without requiring an API key. It utilizes yt-dlp to support media retrieval and playlist management within MCP-compliant clients like Claude and Cursor.81MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server for managing YouTube Music playlists via Claude. Add and remove songs, create playlists, and ask Claude to suggest music β all through conversation.-
- FlicenseNot gradedqualityCmaintenanceEnables AI coding tools and MCP hosts to search YouTube Music and add or remove tracks on your own playlists through natural-language prompts, authenticated with your Google login. It runs locally over stdio, so credentials and OAuth tokens stay on your machine.-