MY

mondweep/youtube-music-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

22 stars 5 forks 质量 64 趋势 10MIT

这是一个MCP(模型上下文协议)服务器,你可以通过Visual Studio Code与Cline配合使用,并请求歌曲播放Youtube Music。

概览

该项目实现了一个模型上下文协议(MCP)服务器,使AI模型能够通过Google Chrome控制YouTube音乐播放。它弥合了AI助手与音乐播放之间的差距,使AI能够基于歌曲名称和艺人名称搜索并播放歌曲。 模型上下文协议(MCP)是一种标准化的方式,供AI模型与外部工具和服务交互。它提供结构化的通信协议,使AI助手能够:- 发现可用工具 - 了解工具功能 - 通过这些工具执行操作 - 一致处理响应和错误 了解更多关于MCP的信息:- MCP文档 - MCP SDK - 在 YouTube Music 中搜索歌曲 - 直接在 Google Chrome 播放歌曲 - 支持歌曲名称和艺人名搜索 - 错误处理和日志记录 - 跨平台支持(专注于 macOS 的 Chrome 自动化) 这是一个基于TypeScript的MCP服务器,实现了一个简单的笔记系统。

概述(AI 翻译)

概述

该项目实现了一个模型上下文协议(MCP)服务器,使AI模型能够通过Google Chrome控制YouTube音乐播放。它弥合了AI助手与音乐播放之间的差距,使AI能够基于歌曲名称和艺人名称搜索并播放歌曲。

什么是MCP?

模型上下文协议(MCP)是一种标准化的方式,供AI模型与外部工具和服务交互。它提供一种结构化的通信协议,使AI助手能够:

  • 发现可用工具
  • 了解工具功能
  • 通过这些工具执行操作
  • 一致处理响应和错误

了解更多关于MCP的信息:

  • MCP 文档
  • MCP SDK

特色

  • 在YouTube音乐中搜索歌曲
  • 直接在Google Chrome中播放歌曲
  • 支持歌曲名称和艺人名称搜索
  • 错误处理与日志记录
  • 跨平台支持(专注于 macOS 以实现 Chrome 自动化)

建筑

高层级概述

youtube-music-server MCP 服务器

模型上下文协议服务器

这是一个基于TypeScript的MCP服务器,实现了一个简单的笔记系统。它通过提供以下内容演示MCP的核心概念:

本页由 AI 翻译,技术细节请以原文为准。

README

YouTube Music MCP Server

Overview

This project implements a Model Context Protocol (MCP) server that enables AI models to control YouTube Music playback through Google Chrome. It bridges the gap between AI assistants and music playback, allowing AI to search for and play songs based on song names and artist names.

What is MCP?

The Model Context Protocol (MCP) is a standardized way for AI models to interact with external tools and services. It provides a structured communication protocol that allows AI assistants to:

  • Discover available tools
  • Understand tool capabilities
  • Execute actions through these tools
  • Handle responses and errors consistently

Learn more about MCP:

Features

  • Search YouTube Music for songs
  • Play songs directly in Google Chrome
  • Support for song name and artist name search
  • Error handling and logging
  • Cross-platform support (focused on macOS for Chrome automation)

Architecture

High-Level Overview

youtube-music-server MCP Server

A Model Context Protocol server

This is a TypeScript-based MCP server that implements a simple notes system. It demonstrates core MCP concepts by providing:

  • Resources representing text notes with URIs and metadata
  • Tools for creating new notes
  • Prompts for generating summaries of notes

Features

Resources

  • List and access notes via note:// URIs
  • Each note has a title, content and metadata
  • Plain text mime type for simple content access

Tools

  • create_note - Create new text notes
    • Takes title and content as required parameters
    • Stores note in server state

Prompts

  • summarize_notes - Generate a summary of all stored notes
    • Includes all note contents as embedded resources
    • Returns structured prompt for LLM summarization

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Installation

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "youtube-music-server": {
      "command": "/path/to/youtube-music-server/build/index.js"
    }
  }
}

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "youtube-music-server": { "command": "/path/to/youtube-music-server/build/index.js" } } }