SM

sparfenyuk/mcp-youtube

开发工具

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

21 stars 7 forks 质量 64 趋势 10MIT

YouTube 的 MCP 服务器

概览

服务器是 YouTube API 与 AI 助手之间的桥梁,基于模型上下文协议(Model Context Protocol)。 模型上下文协议(MCP)是一个系统,使人工智能应用(如Claude Desktop)能够连接到外部工具和数据源。它为人工智能助手提供了一种清晰且安全的方式,能够与本地服务和API协作,同时保持用户的控制权。 - [x] 下载该视频的隐藏字幕 如果你已经安装了服务器,可以用 uv 工具升级——reinstall 命令更新它。 如果你想删除服务器,可以用 uv 工具的 mcp-youtube 卸载命令。 配置Claude Desktop识别Youtube MCP服务器。 1. 打开 Claude Desktop 配置文件:- 在 MacOS 中,配置文件位于 ~/Library/Application Support/Claude/claude_desktop_config.json;在 Windows 中,配置文件位于 %APPDATA%\Claude\claude_desktop_config.json 你也可以找到claude_desktop_config。

概述(AI 翻译)

  • YouTube MCP 服务器
  • 关于
  • 什么是MCP?
  • 这个服务器是干什么的?
  • 实际应用场景
  • 先决条件
  • 安装
  • 配置
  • Claude桌面配置
  • 发展
  • 开始
  • 在检查器中调试服务器
  • 故障排除
  • 消息“无法连接到MCP服务器mcp-youtube”

关于

服务器是 YouTube API 与 AI 助手之间的桥梁,基于模型上下文协议(Model Context Protocol)。

什么是MCP?

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

这个服务器是干什么的?

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

实际应用场景

  • [x] 制作视频摘要

先修条件

  • [uv 工具

安装

[!注] 如果你已经安装了服务器,可以用 uv tool upgrade --reinstall 命令更新它。

[!注] 如果你想删除服务器,可以使用 uv tool uninstall mcp-youtube 命令。

配置

Claude Desktop Configuration

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

README

以下为原文 README 节选,完整内容请查看原文。

Youtube MCP server

About

The server is a bridge between the Youtube API and the AI assistants and is based on the Model Context Protocol.

What is MCP?

The Model Context Protocol (MCP) is a system that lets AI apps, like Claude Desktop, connect to external tools and data sources. It gives a clear and safe way for AI assistants to work with local services and APIs while keeping the user in control.

What does this server do?

  • [x] Download closed captions for the given video

Practical use cases

  • [x] Create a summary of the video

Prerequisites

Installation

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

[!NOTE] If you have already installed the server, you can update it using uv tool upgrade --reinstall command.

[!NOTE] If you want to delete the server, use the uv tool uninstall mcp-youtube command.

Configuration

Claude Desktop Configuration

Configure Claude Desktop to recognize the Youtube MCP server.

  1. Open the Claude Desktop configuration file:

    • in MacOS, the configuration file is located at ~/Library/Application Support/Claude/claude_desktop_config.json
    • in Windows, the configuration file is located at %APPDATA%\Claude\claude_desktop_config.json

    Note: You can also find claude_desktop_config.json inside the settings of Claude Desktop app

  2. Add the server configuration

    {
      "mcpServers": {
        "mcp-youtube": {
            "command": "mcp-youtube",
          }
        }
      }
    }
    

Development

Getting started

  1. Clone the repository

  2. Install the dependencies

    uv sync
    
  3. Run the server

    uv run mcp-youtube --help
    

Tools can be added to the src/mcp_youtube/tools.py file.

How to add a new tool:

  1. Create a new class that inherits from ToolArgs

    class NewTool(ToolArgs):
        """Description of the new tool."""
        pass
    
在 GitHub 查看完整 README

安装

npx @modelcontextprotocol/inspector uv run mcp-youtube
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "mcp-youtube": { "command": "mcp-youtube", } } } }