Skip to main content
Glama

YouTube MCP Agent

An MCP (Model Context Protocol) server agent for analyzing YouTube videos, built with OpenAI's Agent SDK. This tool allows you to extract transcripts, generate summaries, create chapter timestamps, and write content based on YouTube videos.

Requirements

  • Python 3.13+

  • OpenAI API key

  • uv package manager (recommended)

How to run this example

  1. Clone the repository

    git clone <repository-url> cd yt-mcp-agent
  2. Install dependencies with uv

    uv sync
  3. Set up your OpenAI API key

    Create a .env file in the root directory:

    echo "OPENAI_API_KEY=your_api_key_here" > .env
  4. Run the agent

    uv run main.py
  5. Interact with agent

    Once running, you can ask the agent to analyze YouTube videos. Try prompts like:

    • "Summarize this: "

    • "Generate chapter timestamps with links"

    • "Write me a LinkedIn post about the video"

Base Python/pip

  1. Clone the repository

    git clone <repository-url> cd yt-mcp-agent
  2. Create a virtual environment

    python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
  3. Install dependencies

    pip install -e .
  4. Set up your OpenAI API key

    Create a .env file in the root directory:

    echo "OPENAI_API_KEY=your_api_key_here" > .env
  5. Run the agent

    python main.py
  6. Interact with the agent

    Once running, you can interact with the agent via the CLI.

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

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/zhaoyuxuan/yt-mcp-agent'

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