Skip to main content
Glama

Youtube MCP Server

Youtube MCP 服务器

关于

该服务器是 Youtube API 和 AI 助手之间的桥梁,基于模型上下文协议

什么是 MCP?

模型上下文协议 (MCP) 是一个允许 AI 应用(例如 Claude Desktop)连接到外部工具和数据源的系统。它为 AI 助手提供了一种清晰、安全的方式,使其能够使用本地服务和 API,同时保持用户的控制权。

这个服务器是做什么的?

  • [x] 下载指定视频的隐藏字幕

实际用例

  • [x] 创建视频摘要

先决条件

安装

uv tool install git+https://github.com/sparfenyuk/mcp-youtube

[!NOTE] 如果您已经安装了服务器,则可以使用uv tool upgrade --reinstall命令进行更新。

[!NOTE] 如果要删除服务器,请使用uv tool uninstall mcp-youtube命令。

配置

Claude桌面配置

配置 Claude Desktop 以识别 Youtube MCP 服务器。

  1. 打开Claude桌面配置文件:
    • 在 MacOS 中,配置文件位于~/Library/Application Support/Claude/claude_desktop_config.json
    • 在 Windows 中,配置文件位于%APPDATA%\Claude\claude_desktop_config.json

    **注意:**您还可以在 Claude Desktop 应用程序的设置中找到 claude_desktop_config.json

  2. 添加服务器配置
    { "mcpServers": { "mcp-youtube": { "command": "mcp-youtube", } } } }

发展

入门

  1. 克隆存储库
  2. 安装依赖项
    uv sync
  3. 运行服务器
    uv run mcp-youtube --help

可以将工具添加到src/mcp_youtube/tools.py文件中。

如何添加新工具:

  1. 创建一个继承自 ToolArgs 的新类
    class NewTool(ToolArgs): """Description of the new tool.""" pass
    该类的属性将用作该工具的参数。类的文档字符串将用作工具的描述。
  2. 为新类实现 tool_runner 函数
    @tool_runner.register async def new_tool(args: NewTool) -> t.Sequence[TextContent | ImageContent | EmbeddedResource]: pass
    该函数应返回 TextContent、ImageContent 或 EmbeddedResource 的序列。该函数应为异步函数,并接受新类的单个参数。
  3. 完成!重启客户端,新工具就可以使用了。

验证可以通过 Claude Desktop 或直接运行工具来完成。

在检查器中调试服务器

MCP 检查器是一款使用精美 UI 帮助调试服务器的工具。要运行它,请使用以下命令:

npx @modelcontextprotocol/inspector uv run mcp-youtube

故障排除

消息“无法连接到 MCP 服务器 mcp-youtube”

如果您在 Claude Desktop 中看到消息“无法连接到 MCP 服务器 mcp-youtube”,则表示服务器配置不正确。

请尝试以下操作:

  • 在配置文件中使用mcp-youtube二进制文件的完整路径

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

连接 YouTube API 和 AI 助手,通过下载和处理隐藏字幕来实现视频分析,从而创建 YouTube 视频摘要。

  1. 关于
    1. 什么是 MCP?
      1. 这个服务器是做什么的?
        1. 实际用例
          1. 先决条件
            1. 安装
              1. 配置
                1. Claude桌面配置
              2. 发展
                1. 入门
                2. 在检查器中调试服务器
              3. 故障排除
                1. 消息“无法连接到 MCP 服务器 mcp-youtube”

              Related MCP Servers

              • -
                security
                F
                license
                -
                quality
                This server allows AI language models to interact with YouTube content through a standardized interface, providing features such as video and channel information retrieval, transcript management, and playlist operations.
                Last updated -
                169
                179
                TypeScript
                • Linux
                • Apple
              • -
                security
                F
                license
                -
                quality
                The MCP Server integrates APIs from the Youtube-Summarizer as tools within the MCP protocol, allowing for local AI application interaction and tool utilization through natural language queries.
                Last updated -
                Python
              • -
                security
                F
                license
                -
                quality
                Enables AI applications to integrate with YouTube-Summarizer's APIs through the MCP protocol, offering local tool-based interaction for summarizing YouTube content.
                Last updated -
                1
                Python
              • -
                security
                F
                license
                -
                quality
                Enables AI language models to interact with YouTube content through a standardized interface, providing tools for retrieving video information, transcripts, channel analytics, and trend analysis.
                Last updated -
                852
                1
                JavaScript

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/sparfenyuk/mcp-youtube'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server