
youtube comments analyzer
Analyzer YouTube Comments
Repository Info
About This Server
Analyzer YouTube Comments
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
YouTube Comment Analyzer
This application allows you to analyze YouTube comments from channels and videos. It provides insights into comment patterns, engagement, and more.
Reply Count Fix
The application includes a solution for correctly displaying replies to comments:
-
API Endpoint: The
/api/fix-comment-uiendpoint fetches comments with their actual replies, bypassing the database'sreply_countfield which may not be accurate. -
SimpleComment Component: The
SimpleCommentcomponent used on the main page has been updated to:- Fetch the correct reply count on component mount
- Fetch and display replies when the user clicks to expand them
- Use the
fix-comment-uiendpoint to ensure accurate data
-
CommentItem Component: Similarly, the
CommentItemcomponent used in other parts of the application has been updated to use the same approach.
Debugging Tools
The application includes several debugging tools to help diagnose issues with the comment system:
/debug-replies- A UI for examining reply counts and actual replies/api/mcp-debug-replies- API endpoint for debugging reply data/api/fix-comment-ui- API endpoint that returns the correct reply count and replies for a comment/api/fix-reply-counts- Legacy endpoint for updating reply counts in the database
Usage
- Start the application with
npm run dev - Access the main page at
http://localhost:3001 - To debug reply issues, visit
http://localhost:3001/debug-replies
Known Issues
- The database's
reply_countfield may not update correctly. This is a known issue with the database schema and permissions. - The application uses the
fix-comment-uiendpoint as a workaround to ensure correct reply counts are displayed in the UI.
Features
- YouTube OAuth authentication
- Fetch and store comments from your YouTube videos
- Search and filter comments
- Basic comment analysis
Tech Stack
- Next.js 14+ with App Router
- TypeScript
- NextAuth.js for authentication
- Tailwind CSS for styling
- Prisma with PostgreSQL for database
- SWR for data fetching
Setup Instructions
Prerequisites
- Node.js 18+ and npm
- PostgreSQL database
- Google Developer account with YouTube Data API v3 access
Environment Variables
Create a .env file in the root directory with the following variables:
Quick Start
Clone the repository
git clone https://github.com/makeorbreakshop/youtube-comments-analyzerInstall dependencies
cd youtube-comments-analyzer
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.