Logo van MCP-驱动的YouTube视频分析工具包

MCP-驱动的YouTube视频分析工具包

Community
di37

AI-powered YouTube video analysis toolkit using MCP. Extract transcripts, generate knowledge graphs, generate high-quality detailed notes, perform sentiment analysis, and topic modeling through an intuitive Streamlit dashboard.

Uitgeverdi37
Repositoryyoutube-video-analysis-toolkit
TaalPython
Forks
7
Sterren
20
Beschikbare tools
0
Transporttypestdio, streamable-http
Categorieën
LicentieMIT
Links
  • Koppel tools aan AI-workflows

    MCP-驱动的YouTube视频分析工具包 biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • Beschikbare tools: 0

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Belangstelling voor het opensourceproject

    Statistieken van de gekoppelde repository (sterren: 20, forks: 7).

MCP-Powered YouTube Video Analysis Toolkit

A comprehensive toolkit for analyzing YouTube videos using AI-powered analysis capabilities. This project provides transcript extraction, knowledge graph generation, sentiment analysis, topic modeling, and note generation for educational and research purposes.

Features

YouTube Video Analysis - Chat Interface

Youtube Video Chat

Interface of MCP Powered YouTube Video Analysis Toolkit. Extract and analyze transcripts from YouTube videos.

Knowledge Graph Generation

Knowledge Graph Generation

Interactive knowledge graphs from video content.

High Quality Note Generation

High Quality Note Generation

Automated markdown note generation from transcripts.

Sentiment Analysis

Sentiment Analysis

Comprehensive sentiment analysis with emotional breakdowns.

Topic Modeling

Topic Modeling

Content classification and structure analysis.

MCP Integration: Model Context Protocol for seamless AI agent integration

  • Standardized tool access across multiple AI providers
  • Multi-server support for distributed analysis capabilities
  • Asynchronous streaming for real-time agent interactions

Architecture

The project consists of two main components:

Server (/server)

  • FastMCP Server: Built with FastMCP 2.0 framework for Model Context Protocol implementation
    • Automatic tool discovery and async support for high-performance operations
    • Pythonic decorators for simple function-to-tool conversion
    • Built-in authentication and proxying capabilities
    • Comprehensive protocol handling with minimal boilerplate code
  • YouTube Tools: Video transcript extraction and search capabilities via MCP tools
  • Analysis Tools: AI-powered prompts exposed as MCP resources for knowledge graphs, sentiment analysis, and topic modeling
  • Data Storage: Persistent storage management for transcripts, notes, and analysis results

Client (/client)

  • MCP Client Integration: Built with mcp-use library for seamless MCP server communication
    • Multi-server support enabling connection to multiple MCP servers simultaneously
    • Asynchronous streaming of agent outputs for real-time interactions
    • Dynamic server selection for optimized task execution
    • Configurable via JSON for flexible server management
  • Streamlit Dashboard: Interactive web interface for visualization
  • Multi-tab Interface: Separate views for different analysis types
  • Real-time Chat: MCP-powered chatbot for video analysis using intelligent agents
  • Data Visualization: Interactive charts and graphs for analysis results

Project Structure

youtube-video-analysis-kit/
├── README.md
├── data/                          # Shared data directory
│   ├── transcripts/              # YouTube video transcripts
│   ├── knowledge_graphs/         # Generated knowledge graphs
│   ├── notes_md/                 # Generated markdown notes
│   ├── sentiment_analysis/       # Sentiment analysis results
│   └── topic_modeling/           # Topic modeling analysis
├── server/                       # Backend MCP server
│   ├── docker-compose.yml
│   ├── Dockerfile
│   ├── main.py                   # Main server application
│   ├── requirements.txt
│   ├── tools/
│   │   ├── prompt_tools.py       # AI analysis prompts
│   │   └── youtube_tools.py      # YouTube integration
│   └── prompts/
│       └── prompts.py           # Prompt templates
├── client/                      # Frontend Streamlit app
│   ├── docker-compose.yml
│   ├── Dockerfile
│   ├── combined_app.py          # Main Streamlit application
│   ├── requirements.txt
│   ├── config/
│   │   └── mcpServers.json      # MCP server configuration
│   └── proxy.py                 # Development proxy
└── screenshots/                 # Documentation screenshots

MCP Integration

Model Context Protocol (MCP)

This project leverages the Model Context Protocol to provide standardized communication between AI applications and external data sources. MCP enables:

  • Standardized Tool Access: Consistent interface for AI agents to access various tools and resources
  • Scalable Architecture: Support for multiple concurrent connections and server instances
  • Protocol Flexibility: JSON-RPC based communication with support for various transports

FastMCP Server Implementation

The server component uses FastMCP 2.0, a comprehensive Python framework that:

  • Reduces boilerplate code by 90% compared to manual MCP implementation
  • Provides automatic tool discovery through Python decorators
  • Supports async operations for high-performance data processing
  • Includes built-in authentication and server proxying capabilities
  • Offers production-ready deployment patterns

MCP-Use Client Library

The client integrates with mcp-use library to:

  • Connect to multiple MCP servers simultaneously
  • Enable dynamic server selection based on task requirements
  • Provide asynchronous streaming for real-time agent interactions
  • Support various LLM providers (OpenAI, Anthropic, Groq)
  • Offer flexible configuration management via JSON files

Getting Started

Prerequisites

  • Docker and Docker Compose
  • OpenAI API key
  • Python 3.12+ (for local development)

Clone the repository

bash
git clone https://github.com/di37/youtube-video-analysis-toolkit.git
cd youtube-video-analysis-toolkit

Docker Deployment

Server only:

bash
cd server
docker-compose up --build
# Server will be available at http://localhost:8000

Client only:

bash
cd client
docker-compose up --build
# Client will be available at http://localhost:8501

Usage

Web Interface

  1. Access the Streamlit dashboard at http://localhost:8501
  2. Configure your OpenAI API key in the sidebar
  3. Select the appropriate tab for your analysis needs:
    • YouTube Video Chat: Interactive chatbot for video analysis
    • Saved Transcripts: View and manage video transcripts
    • Knowledge Graph: Visualize entity relationships
    • Generated Notes: View markdown notes
    • Sentiment Analysis: Emotional and sentiment insights
    • Topic Modeling: Educational content analysis

API Usage

The server exposes MCP tools at http://localhost:8000. Available tools include:

  • get_youtube_transcript(url): Extract transcript from YouTube video
  • save_transcript(content, source): Save transcript data
  • generate_knowledge_graph_prompt(): Get knowledge graph generation prompt
  • generate_notes_prompt(): Get note generation prompt
  • generate_sentiment_analysis_prompt(text): Get sentiment analysis prompt
  • generate_topic_modeling_prompt(text): Get topic modeling prompt
  • save_analysis(analysis_json, analysis_type): Save analysis results

Workflow Example

  1. Analyze a YouTube Video:

    Chat: "Please analyze this YouTube video: https://youtube.com/watch?v=..."
  2. Generate Knowledge Graph:

    Chat: "Create a knowledge graph from the latest transcript"
  3. Perform Sentiment Analysis:

    Chat: "Analyze the sentiment of the video content"
  4. Create Notes:

    Chat: "Generate comprehensive notes from the transcript"
  5. Topic Modeling:

    Chat: "Classify the educational content and identify topics"

Data Persistence

All analysis results are stored in the /data directory:

  • Transcripts: JSON format with metadata
  • Knowledge Graphs: Neo4j-compatible JSON structure
  • Notes: Markdown files with YAML front matter
  • Sentiment Analysis: Comprehensive JSON analysis
  • Topic Modeling: Educational content classification

Configuration

MCP Server Configuration

Edit client/config/mcpServers.json to configure the MCP connection:

json
{
    "mcpServers": {
        "video-analysis-kit": {
            "url": "http://{your_ip_address}:8000/mcp",
            "transport": "streamable-http"
        }
    }
}

Use ifconfig | grep inet to find your ip address.

Docker Configuration

Both services use Docker Compose with volume mounts for data persistence:

  • Server: Mounts shared data directory and exposes port 8000
  • Client: Mounts shared data directory and exposes port 8501

Development

Adding New Analysis Types

  1. Create prompt template in server/prompts/prompts.py
  2. Add tool function in server/main.py
  3. Update client interface in client/combined_app.py
  4. Add visualization tab for results display

Extending the Dashboard

The Streamlit dashboard is modular with separate render functions for each tab:

  • render_chat_tab(): MCP chatbot interface
  • render_knowledge_graph_tab(): Interactive graph visualization
  • render_notes_tab(): Markdown note display
  • render_sentiment_analysis_tab(): Sentiment visualization
  • render_topic_modeling_tab(): Educational content analysis

Troubleshooting

Common Issues

  1. Port conflicts: Ensure ports 8000 and 8501 are available
  2. API key errors: Verify OpenAI API key is correctly set
  3. Volume mount issues: Check Docker volume permissions
  4. MCP connection errors: Verify server is running and accessible

Logs

View container logs:

bash
docker logs -f <name_of_the_container>

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built with FastMCP for MCP server implementation - A comprehensive Python framework for building Model Context Protocol servers with automatic tool discovery, async support, authentication, and production-ready deployment patterns
  • Client integration powered by mcp-use - Open-source library for connecting any LLM to any MCP server with multi-server support, asynchronous streaming, and flexible agent configuration
  • Uses Streamlit for web interface
  • Powered by OpenAI GPT models for AI analysis

Installatie

TypingMind
Vereisten:

Node.js 18+

{
  "mcpServers": {
    "di37-youtube-video-analysis-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "youtube-video-analysis-toolkit"
      ]
    }
  }
}

Gebruik MCP-驱动的YouTube视频分析工具包 MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra MCP-驱动的YouTube视频分析工具包 is verbonden, kun je de verbinding dus met verschillende AI-modellen in TypingMind gebruiken, zonder die voor elk model apart in te stellen. Je kunt MCP lokaal op je apparaat uitvoeren of verbinding maken met de URL van een externe MCP-server.

Optie 1: gebruik de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg MCP-驱动的YouTube视频分析工具包 toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus op ‘Gereed’ staat.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van MCP-驱动的YouTube视频分析工具包.
  4. Sla de serverlijst op.
  5. Vernieuw de pagina als je wilt controleren of de connectorstatus nog op ‘Gereed’ staat.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "di37-youtube-video-analysis-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "youtube-video-analysis-toolkit"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van MCP-驱动的YouTube视频分析工具包 in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van MCP-驱动的YouTube视频分析工具包 in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je MCP-驱动的YouTube视频分析工具包 gebruiken om me hiermee te helpen?
MCP-驱动的YouTube视频分析工具包
Zeker. Ik heb het gelezen.
Dit vond ik met MCP-驱动的YouTube视频分析工具包.

Optie 2: voeg een MCP-server-URL toe

Gebruik dit als MCP-驱动的YouTube视频分析工具包 al extern wordt gehost of als je team één gedeelde connector wil waar meerdere gebruikers toegang toe hebben.

1

Open MCP-connectoren

Ga in TypingMind naar Plug-ins, open MCP-connectoren en kies URL toevoegen.

  1. Open TypingMind in je browser.
  2. Ga naar Plug-ins.
  3. Open MCP-connectoren.
  4. Klik op URL toevoegen.
TypingMind-formulier om een eigen MCP-server-URL toe te voegen
2

Plak de server-URL

Voer je server-URL in het veld Server-URL in. Voeg een verbindingsnaam, beschrijving, icoon, aangepaste HTTP-headers of OAuth-clientinstellingen toe als de server die vereist.

  1. Plak je server-URL in het veld Server-URL.
  2. Voer een verbindingsnaam in voor MCP-驱动的YouTube视频分析工具包.
  3. Voeg een beschrijving en een icoon toe als je de verbinding makkelijker wilt herkennen.
  4. Voeg aangepaste HTTP-headers of OAuth-clientgegevens toe als de server authenticatie vereist.
3

Maak de verbinding aan

Klik op Verbinding maken, ga terug naar de lijst met plug-ins en controleer of de nieuwe MCP-verbinding actief is.

  1. Klik op Verbinding maken.
  2. Ga terug naar de lijst met MCP-connectoren.
  3. Controleer of de verbinding met MCP-驱动的YouTube视频分析工具包 als actief wordt weergegeven.
  4. Vernieuw de lijst met plug-ins als de verbinding niet meteen verschijnt.
4

Wissel van model zonder opnieuw verbinding te maken

Start een chat met je favoriete model, schakel de tools van MCP-驱动的YouTube视频分析工具包 in via Plug-ins en wissel van model wanneer dat nodig is. De MCP-verbinding blijft beschikbaar in de TypingMind-werkruimte.

  1. Start een nieuwe chat in TypingMind.
  2. Selecteer het AI-model dat je wilt gebruiken.
  3. Schakel de tools van MCP-驱动的YouTube视频分析工具包 in via Plug-ins.
  4. Vraag het model om de tool te gebruiken wanneer dat nodig is.
  5. Schakel over naar een ander AI-model en gebruik dezelfde MCP-verbinding opnieuw.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je MCP-驱动的YouTube视频分析工具包 gebruiken om me hiermee te helpen?
MCP-驱动的YouTube视频分析工具包
Zeker. Ik heb het gelezen.
Dit vond ik met MCP-驱动的YouTube视频分析工具包.

Veelgestelde vragen

Waarvoor wordt de MCP-server MCP-驱动的YouTube视频分析工具包 gebruikt?

MCP-驱动的YouTube视频分析工具包 is een MCP-server waarmee compatibele AI-clients toegang krijgen tot externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik MCP-驱动的YouTube视频分析工具包 MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je MCP-驱动的YouTube视频分析工具包 gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom MCP-驱动的YouTube视频分析工具包 MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als MCP-驱动的YouTube视频分析工具包 verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik MCP-驱动的YouTube视频分析工具包 MCP met TypingMind?

Je kunt MCP-驱动的YouTube视频分析工具包 met TypingMind verbinden via de lokale MCP-connector of door de URL van een externe MCP-server toe te voegen. Gebruik de lokale connector als de server toegang nodig heeft tot bestanden, apps of privébronnen op je apparaat. Gebruik een server-URL als de MCP-server extern wordt gehost.

Welke tools biedt MCP-驱动的YouTube视频分析工具包 MCP in TypingMind?

MCP-驱动的YouTube视频分析工具包 biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om MCP-驱动的YouTube视频分析工具包 MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als MCP-驱动的YouTube视频分析工具包 authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇