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

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

Comunidad
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.

Editordi37
Repositorioyoutube-video-analysis-toolkit
IdiomaPython
Forks
7
Estrellas
20
Herramientas disponibles
0
Tipo de transportestdio, streamable-http
Categorías
LicenciaMIT
Enlaces
  • Conecta herramientas a flujos de trabajo con IA

    MCP-驱动的YouTube视频分析工具包 ofrece funciones MCP que pueden usar los clientes y agentes de IA compatibles.

  • 0 herramientas disponibles

    Explora a continuación las acciones que se pueden invocar, con sus nombres y descripciones cuando el servidor los proporcione.

  • Configuración lista para copiar

    Usa los ejemplos de instalación para configurar este servidor en tu cliente MCP preferido.

  • Indicadores de interés de la comunidad en el repositorio

    20 estrellas y 7 forks en el repositorio enlazado.

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

Instalación

TypingMind
Requisitos:

Node.js 18+

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

Usa el MCP de MCP-驱动的YouTube视频分析工具包 con varios modelos de IA

TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que, una vez conectado MCP-驱动的YouTube视频分析工具包, puedes usarlo con distintos modelos de IA en TypingMind sin tener que configurarlo por separado para cada modelo. Puedes ejecutar MCP localmente en tu dispositivo o conectarte a la URL de un servidor MCP remoto.

Opción 1: usa el conector local

Usa esta opción si el servidor MCP necesita acceder a archivos locales, aplicaciones o recursos privados de tu ordenador.

1

Abre los ajustes de MCP

En TypingMind, ve a Ajustes, luego a Ajustes avanzados y a Model Context Protocol, y elige Configurar conector.

  1. Abre TypingMind en tu navegador.
  2. Haz clic en el icono de Ajustes.
  3. Ve a Ajustes avanzados.
  4. Abre la sección Model Context Protocol.
  5. Haz clic en Configurar conector y elige Este dispositivo.
Pantalla de configuración del conector MCP de TypingMind con «Este dispositivo» seleccionado
2

Ejecuta el comando del conector

Elige Este dispositivo, copia el comando de TypingMind y ejecútalo en Terminal. Mantén el proceso en ejecución mientras uses MCP.

  1. Copia el comando de configuración que muestra TypingMind.
  2. Abre Terminal en macOS o Windows Terminal en Windows.
  3. Pega y ejecuta el comando.
  4. Acepta la instalación del paquete si Terminal te pide confirmación para continuar.
  5. Mantén el proceso en ejecución en la ventana de Terminal mientras uses las herramientas MCP.
3

Añade MCP-驱动的YouTube视频分析工具包 como servidor

Cuando el estado del conector sea «Listo», haz clic en «Editar servidores» y pega la configuración del servidor MCP.

  1. Espera hasta que el estado del conector indique «Listo».
  2. Haz clic en «Editar servidores».
  3. Pega la configuración del servidor MCP de MCP-驱动的YouTube视频分析工具包.
  4. Guarda la lista de servidores.
  5. Actualiza si quieres comprobar que el conector sigue listo.
Ajustes de MCP de TypingMind con un servidor activo y el botón «Editar servidores»
{
  "mcpServers": {
    "di37-youtube-video-analysis-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "youtube-video-analysis-toolkit"
      ]
    }
  }
}
4

Usa la conexión con distintos modelos

Guarda la lista de servidores, abre Plugins, activa las herramientas MCP de MCP-驱动的YouTube视频分析工具包 y selecciona cualquier modelo de IA compatible en TypingMind para usar las herramientas en el chat o asignárselas a un agente de IA.

  1. Abre la página Plugins en TypingMind.
  2. Activa las herramientas MCP de MCP-驱动的YouTube视频分析工具包.
  3. Inicia un chat y elige el modelo de IA que quieras usar.
  4. Usa las herramientas MCP en el chat o asígnalas a un agente de IA.
  5. Cambia a otro modelo de IA cuando lo necesites sin volver a conectar MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar MCP-驱动的YouTube视频分析工具包 para ayudarme con esta tarea?
MCP-驱动的YouTube视频分析工具包
Claro. Lo he leído.
Esto es lo que he encontrado con MCP-驱动的YouTube视频分析工具包.

Opción 2: añade la URL de un servidor MCP

Usa esta opción si MCP-驱动的YouTube视频分析工具包 ya está alojado en un servidor remoto o si tu equipo quiere un conector compartido al que puedan acceder varios usuarios.

1

Abre Conectores MCP

En TypingMind, ve a Plugins, abre Conectores MCP y elige Añadir URL.

  1. Abre TypingMind en tu navegador.
  2. Ve a Plugins.
  3. Abre Conectores MCP.
  4. Haz clic en Añadir URL.
Formulario de TypingMind para añadir la URL de un servidor MCP personalizado
2

Pega la URL del servidor

Introduce la URL de tu servidor en el campo URL del servidor. Añade un nombre de conexión, una descripción, un icono, cabeceras HTTP personalizadas o la configuración del cliente OAuth si el servidor los requiere.

  1. Pega la URL de tu servidor en el campo URL del servidor.
  2. Introduce un nombre para la conexión de MCP-驱动的YouTube视频分析工具包.
  3. Añade una descripción y un icono si quieres que sea más fácil de identificar.
  4. Añade cabeceras HTTP personalizadas o los datos del cliente OAuth si el servidor requiere autenticación.
3

Crea la conexión

Haz clic en Crear conexión, vuelve a la lista de plugins y comprueba que la nueva conexión MCP esté activa.

  1. Haz clic en Crear conexión.
  2. Vuelve a la lista de conectores MCP.
  3. Comprueba que la conexión de MCP-驱动的YouTube视频分析工具包 aparezca como activa.
  4. Actualiza la lista de plugins si la conexión no aparece de inmediato.
4

Cambia de modelo sin volver a conectar MCP

Inicia un chat con tu modelo preferido, activa las herramientas de MCP-驱动的YouTube视频分析工具包 desde Plugins y cambia de modelo cuando lo necesites. La conexión MCP seguirá disponible en el espacio de trabajo de TypingMind.

  1. Inicia un nuevo chat en TypingMind.
  2. Selecciona el modelo de IA que quieras usar.
  3. Activa las herramientas de MCP-驱动的YouTube视频分析工具包 desde Plugins.
  4. Pide al modelo que use la herramienta cuando sea necesario.
  5. Cambia a otro modelo de IA y reutiliza la misma conexión MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar MCP-驱动的YouTube视频分析工具包 para ayudarme con esta tarea?
MCP-驱动的YouTube视频分析工具包
Claro. Lo he leído.
Esto es lo que he encontrado con MCP-驱动的YouTube视频分析工具包.

Preguntas frecuentes

¿Para qué sirve el servidor MCP MCP-驱动的YouTube视频分析工具包?

MCP-驱动的YouTube视频分析工具包 es un servidor MCP que permite a los clientes de IA compatibles conectarse a herramientas externas y acceder a información de contexto de fuentes externas. En TypingMind, basta con añadir este servidor MCP una vez para que sus herramientas estén disponibles en tu espacio de trabajo de IA.

¿Puedo usar el servidor MCP MCP-驱动的YouTube视频分析工具包 con varios modelos de IA en TypingMind?

Sí. TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que puedes usar MCP-驱动的YouTube视频分析工具包 con distintos modelos de IA, como Claude, ChatGPT, Gemini u otros que hayas configurado en TypingMind, sin configurar el servidor MCP por separado para cada modelo.

¿Por qué usar el servidor MCP MCP-驱动的YouTube视频分析工具包 con TypingMind?

TypingMind es una de las mejores interfaces de chat con LLM porque reúne varios modelos de IA, prompts, plugins, agentes de IA, claves API y herramientas MCP en un solo espacio de trabajo. Con MCP-驱动的YouTube视频分析工具包 conectado, puedes usar sus herramientas MCP con tus modelos preferidos y mantener organizado tu trabajo con los chats en TypingMind.

¿Cómo conecto el servidor MCP MCP-驱动的YouTube视频分析工具包 a TypingMind?

Puedes conectar MCP-驱动的YouTube视频分析工具包 en TypingMind con el conector MCP local o añadiendo la URL de un servidor MCP remoto. Usa el conector local cuando el servidor necesite acceder a archivos, aplicaciones o recursos privados de tu dispositivo, y una URL de servidor cuando el servidor MCP esté alojado de forma remota.

¿Qué herramientas ofrece el servidor MCP MCP-驱动的YouTube视频分析工具包 en TypingMind?

MCP-驱动的YouTube视频分析工具包 ofrece funciones MCP que puedes activar desde la página Plugins de TypingMind y usar en el chat o asignar a agentes de IA.

¿Tengo que compartir mis claves API con TypingMind para usar el servidor MCP MCP-驱动的YouTube视频分析工具包?

No. TypingMind prioriza el funcionamiento local y te permite mantener el control de tus proveedores de modelos, claves API, prompts y configuración MCP. Si MCP-驱动的YouTube视频分析工具包 requiere autenticación, añade las cabeceras, los ajustes de OAuth o la configuración local necesarios para ese servidor MCP al crear la conexión.

Servidores MCP relacionados

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇