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

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.

Publisherdi37
Repositoryyoutube-video-analysis-toolkit
LanguagePython
Forks
7
Stars
20
Available tools
0
Transport typestdio, streamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    MCP-驱动的YouTube视频分析工具包 exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    20 stars and 7 forks from the linked repository.

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

Installation

TypingMind
Prerequisites:

Node.js 18+

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

Use MCP-驱动的YouTube视频分析工具包 MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MCP-驱动的YouTube视频分析工具包 is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MCP-驱动的YouTube视频分析工具包 as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MCP-驱动的YouTube视频分析工具包 MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "di37-youtube-video-analysis-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "youtube-video-analysis-toolkit"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MCP-驱动的YouTube视频分析工具包 MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MCP-驱动的YouTube视频分析工具包 MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCP-驱动的YouTube视频分析工具包 to help me with this task?
MCP-驱动的YouTube视频分析工具包
Sure. I read it.
Here is what I found using MCP-驱动的YouTube视频分析工具包.

Option 2: Add an MCP server URL

Use this when MCP-驱动的YouTube视频分析工具包 is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter your server URL in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste your server URL into the Server URL field.
  2. Enter a connection name for MCP-驱动的YouTube视频分析工具包.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the MCP-驱动的YouTube视频分析工具包 connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the MCP-驱动的YouTube视频分析工具包 tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the MCP-驱动的YouTube视频分析工具包 tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCP-驱动的YouTube视频分析工具包 to help me with this task?
MCP-驱动的YouTube视频分析工具包
Sure. I read it.
Here is what I found using MCP-驱动的YouTube视频分析工具包.

Frequently asked questions

What is the MCP-驱动的YouTube视频分析工具包 MCP server used for?

MCP-驱动的YouTube视频分析工具包 is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MCP-驱动的YouTube视频分析工具包 MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MCP-驱动的YouTube视频分析工具包 with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MCP-驱动的YouTube视频分析工具包 MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MCP-驱动的YouTube视频分析工具包 connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MCP-驱动的YouTube视频分析工具包 MCP to TypingMind?

MCP-驱动的YouTube视频分析工具包 can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does MCP-驱动的YouTube视频分析工具包 MCP provide in TypingMind?

MCP-驱动的YouTube视频分析工具包 exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MCP-驱动的YouTube视频分析工具包 MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MCP-驱动的YouTube视频分析工具包 requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇