mcp youtube
Bridges YouTube API and AI assistants, enabling video analysis by downloading and processing closed captions to create summaries of YouTube videos.
Bridges YouTube API and AI assistants, enabling video analysis by downloading and processing closed captions to create summaries of YouTube videos.
The server is a bridge between the Youtube API and the AI assistants and is based on the Model Context Protocol.
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.
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.
Configure Claude Desktop to recognize the Youtube MCP server.
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%Claudeclaude_desktop_config.json
Note: You can also find claude_desktop_config.json inside the settings of Claude Desktop app
Add the server configuration
{
"mcpServers": {
"mcp-youtube": {
"command": "mcp-youtube",
}
}
}
}
uv sync
uv run mcp-youtube --help
Tools can be added to the src/mcp_youtube/tools.py
file.
How to add a new tool:
class NewTool(ToolArgs):
"""Description of the new tool."""
pass
Attributes of the class will be used as arguments for the tool. The class docstring will be used as the tool description.
@tool_runner.register
async def new_tool(args: NewTool) -> t.Sequence[TextContent | ImageContent | EmbeddedResource]:
pass
The function should return a sequence of TextContent, ImageContent or EmbeddedResource. The function should be async and accept a single argument of the new class.
Validation can accomplished either through Claude Desktop or by running the tool directly.
The MCP inspector is a tool that helps to debug the server using fancy UI. To run it, use the following command:
npx @modelcontextprotocol/inspector uv run mcp-youtube
If you see the message 'Could not connect to MCP server mcp-youtube' in Claude Desktop, it means that the server configuration is incorrect.
Try the following:
mcp-youtube
binary in the configuration file[
{
"description": "Download closed captions from YouTube video.",
"inputSchema": {
"description": "Download closed captions from YouTube video.",
"properties": {
"video_url": {
"title": "Video Url",
"type": "string"
}
},
"required": [
"video_url"
],
"title": "DownloadClosedCaptions",
"type": "object"
},
"name": "DownloadClosedCaptions"
}
]