Skip to main content
Glama

YouTube 音乐 MCP 🎵

这是一个简单的 MCP 服务器,允许您直接从 AI 助手(如 Cursor 或 Claude Desktop)搜索和播放 YouTube 音乐上的曲目。

内置:

可用工具

  • searchTrack :按名称搜索 YouTube 音乐上的曲目。

  • playTrack :通过在默认浏览器中搜索并打开曲目来直接播放曲目。

安装

Related MCP server: MCP Spotify Server

1. 获取钥匙

要实现此功能,您需要一个有效的Google Youtube API 密钥

2. 添加到光标

将以下 MCP 配置添加到您的 Cursor .cursor/mcp.json设置中:

{
  "mcpServers": {
    "youtube-music-mcp": {
      "command": "npx",
      "args": ["-y", "@instructa/mcp-youtube-music"],
      "env": {
        "YOUTUBE_API_KEY": "<INSERT_API_KEY_HERE>"
      }
    }
  }
}

发展

此 MCP 通常直接使用npx运行,无需本地安装或构建,除非您打算修改源代码。如果您要在本地开发,通常需要克隆源代码库(如果有)并遵循其特定的贡献指南。

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。


链接

课程

查看我的其他项目:

  • AI 提示- 为 Cursor AI、Cline、Windsurf 和 Github Copilot 精心策划的 AI 提示

  • codefetch - 使用一个简单的终端命令将代码转换为 LLM 的 Markdown

  • aidex一个 CLI 工具,提供有关 AI 语言模型的详细信息,帮助开发人员根据他们的需求选择正确的模型。

  • codetie - XCode CLI

Available Tools

2 tools
playTrackA

Search for a track on YouTube Music and open the top result in the default browser.

ParametersJSON Schema
NameRequiredDescriptionDefault
trackNameYesThe name of the track to search for and play

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the tool opens the top result in the default browser, which is useful behavioral context, but does not mention potential side effects like browser pop-ups, authentication needs, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action without any wasted words, making it easy to understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (searching and opening in browser) with no annotations or output schema, the description is reasonably complete but lacks details on error handling, what happens if no results are found, or the format of any potential output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the 'trackName' parameter. The description adds no additional meaning beyond implying the parameter is used for searching, which aligns with the schema's description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('search for a track on YouTube Music and open the top result in the default browser') with the resource ('track'), distinguishing it from the sibling tool 'searchTrack' which presumably only searches without opening.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for playing tracks via YouTube Music, but does not explicitly state when to use this tool versus 'searchTrack' or other alternatives, nor does it provide exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

searchTrackC

Search for tracks on YouTube Music by name.

ParametersJSON Schema
NameRequiredDescriptionDefault
trackNameYesThe name of the track to search for

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the tool searches, implying a read-only operation, but does not disclose behavioral traits like rate limits, authentication needs, result format, pagination, or error handling. For a search tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It is appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It does not explain what the search returns (e.g., list of tracks, metadata), how results are structured, or any limitations. For a search tool, this leaves critical context gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the parameter 'trackName' fully documented in the schema. The description adds no additional meaning beyond what the schema provides, such as search syntax or examples. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Search for tracks on YouTube Music by name.' It specifies the verb ('search'), resource ('tracks'), and platform ('YouTube Music'), but does not explicitly differentiate from its sibling tool 'playTrack'. This makes it clear but not fully sibling-aware.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention the sibling tool 'playTrack' or any other search methods, nor does it specify prerequisites or exclusions. This leaves usage context entirely implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 2 tool updatesv1.0.0
    • First observedplayTrack
    • First observedsearchTrack

TDQS

B3.1/5.0

Scored across 2 tools

Disambiguation2/5

The two tools have overlapping purposes that could cause confusion. Both 'playTrack' and 'searchTrack' involve searching for tracks on YouTube Music, with 'playTrack' additionally opening the top result in a browser. An agent might misselect between them when the intent is ambiguous, such as wanting to search without playing or vice versa, as the descriptions don't clearly delineate distinct use cases.

Naming Consistency5/5

The tool names follow a consistent pattern throughout. Both use camelCase with a verb-noun structure ('playTrack' and 'searchTrack'), making them predictable and readable. There are no deviations or mixed conventions, which aids in clarity and usability.

Tool Count2/5

The tool count of 2 feels too thin for a YouTube Music server's apparent scope. With only search and play functionality, there are obvious gaps like managing playlists, controlling playback, or accessing user data. This limited set may hinder agents from performing common music-related tasks, indicating an incomplete surface for the domain.

Completeness2/5

The tool surface is severely incomplete for a YouTube Music domain. It only covers searching and playing tracks, missing essential operations such as pausing, skipping, volume control, playlist management, or user authentication. These gaps will likely cause agent failures when attempting broader music interactions, as the current tools don't support a full lifecycle or common workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers