μ΄ λ ν¬μ§ν 리λ FastMCPλ₯Ό κΈ°λ°μΌλ‘ ꡬμΆλ YouTube λ°μ΄ν° μμ§μ© MCP(Model Context Protocol) μλ²μ λλ€.
Claude, ChatGPT λ±μ LLMμ YouTube APIμ μ°λνμ¬ μλ§ μΆμΆ, μμ κ²μ, μ±λ λΆμ, λκΈ μμ§ λ±μ μμ μ μνν μ μλλ‘ 4κ°μ§ ν΅μ¬ λꡬ(Tool)λ₯Ό μ 곡ν©λλ€.
νλ‘ νΈμλ/MCP ν΄λΌμ΄μΈνΈλ μ΄ λ ν¬μ§ν 리 λ₯Ό μ°Έκ³ ν΄ μ£ΌμΈμ.
μ΄ MCP μλ²λ λ€μκ³Ό κ°μ κΈ°λ₯μ μ 곡ν©λλ€.
- μλ§(Transcript) μΆμΆ: YouTube μμμ μλ§μ κ°μ Έμ΅λλ€ (νκ΅μ΄/μμ΄ μ§μ).
- μμ κ²μ: ν€μλλ‘ μμμ κ²μνκ³ μ‘°νμ, μ’μμ μ λ± μΈλΆ μ 보λ₯Ό νμΈν©λλ€.
- μ±λ μ 보 λΆμ: νΉμ μμμ μ±λ μ 보λ₯Ό νμ νκ³ , ν΄λΉ μ±λμ μ΅κ·Ό μ λ‘λ λͺ©λ‘μ κ°μ Έμ΅λλ€.
- λκΈ μμ§: μμμ λκΈμ κ΄λ ¨μ± λλ μκ°μμΌλ‘ μμ§νμ¬ μ¬λ‘ μ νμ ν©λλ€.
- Python 3.10+
- FastMCP: MCP μλ² κ΅¬μΆ νλ μμν¬
- YouTube Data API v3: μμ λ©νλ°μ΄ν° λ° λκΈ κ²μ
- youtube-transcript-api: λΉκ³΅μ μλ§ μΆμΆ λΌμ΄λΈλ¬λ¦¬
μ΄ μλ²λ₯Ό μ€ννκΈ° μν΄μλ Google Cloud Platformμμ λ°κΈλ°μ YouTube Data API ν€κ° νμν©λλ€. FastMCP Cloudμ Secrets μ€μ μ λ€μ λ³μλ₯Ό μΆκ°ν΄μ£ΌμΈμ.
| λ³μλͺ | μ€λͺ |
|---|---|
YOUTUBE_API_KEY |
(νμ) Google Cloud Consoleμμ λ°κΈλ°μ YouTube Data API v3 Key |
μ νλΈ μμμ μλ§ ν μ€νΈλ₯Ό μΆμΆν©λλ€. λ΄μ©μ μμ½νκ±°λ λΆμν λ μ μ©ν©λλ€.
- Arguments:
url(str): λΆμν μ νλΈ μμ URLlanguages(list[str]): μ°μ μμ μΈμ΄ μ½λ (κΈ°λ³Έκ°:['ko', 'en'])
ν€μλλ₯Ό μ¬μ©νμ¬ μ νλΈ μμμ κ²μν©λλ€.
- Arguments:
query(str): κ²μμ΄order(str): μ λ ¬ κΈ°μ€ (relevance,date,viewCount,rating,title,videoCount/ κΈ°λ³Έκ°:relevance)max_results(int): λ°νν μμ κ°μ (κΈ°λ³Έκ°: 5)
νΉμ μμμ΄ μν μ±λμ μ 보(ꡬλ μ μ, μ΄ μ‘°νμ)μ ν΄λΉ μ±λμ μ΅μ /μΈκΈ° μμμ μ‘°νν©λλ€.
- Arguments:
video_url(str): λμ μ νλΈ μμ URL (μ±λ μλ³μ©)order(str): μμ λͺ©λ‘ μ λ ¬ κΈ°μ€ (date,viewCount,rating/ κΈ°λ³Έκ°:date)max_results(int): κ°μ Έμ¬ μ±λ μμ κ°μ (κΈ°λ³Έκ°: 5)
μμμ λκΈ λ°μμ μμ§ν©λλ€.
- Arguments:
video_url(str): λμ μ νλΈ μμ URLorder(str): μ λ ¬ κΈ°μ€ (relevance: μΈκΈ°μ,time: μ΅μ μ / κΈ°λ³Έκ°:relevance)max_results(int): μμ§ν λκΈ μ (κΈ°λ³Έκ°: 10)
μ΄ νλ‘μ νΈλ FastMCP Cloudμ μ΅μ νλμ΄ μμ΅λλ€.
- μ΄ λ ν¬μ§ν 리λ₯Ό GitHubμ νΈμν©λλ€.
- FastMCP Cloud λμ보λμμ λ ν¬μ§ν 리λ₯Ό μ°κ²°ν©λλ€.
YOUTUBE_API_KEYνκ²½ λ³μλ₯Ό μ€μ ν©λλ€.- λ°°ν¬κ° μλ£λλ©΄ Claude Desktop λλ μ§μλλ ν΄λΌμ΄μΈνΈμμ ν΄λΉ μλ²λ₯Ό μ¬μ©ν μ μμ΅λλ€.
This repository is a YouTube data collection MCP (Model Context Protocol) server built on FastMCP.
It provides 4 core tools that allow LLMs like Claude and ChatGPT to interact with the YouTube API for tasks such as transcript extraction, video search, channel analysis, and comment collection.
Please refer to this repository for the frontent/MCP Client.
This MCP server provides the following functionalities:
- Transcript Extraction: Retrieves subtitles from YouTube videos (Supports Korean/English).
- Video Search: Searches for videos by keyword and retrieves details like view counts and likes.
- Channel Analysis: Identifies channel information from a specific video and fetches the channel's recent uploads.
- Comment Collection: Collects video comments sorted by relevance or time to analyze public opinion.
- Python 3.10+
- FastMCP: Framework for building MCP servers
- YouTube Data API v3: For retrieving video metadata and comments
- youtube-transcript-api: Unofficial library for extracting transcripts
To run this server, a YouTube Data API key from Google Cloud Platform is required. Please add the following variable to your Secrets configuration in FastMCP Cloud.
| Variable Name | Description |
|---|---|
YOUTUBE_API_KEY |
(Required) YouTube Data API v3 Key issued from Google Cloud Console |
Extracts transcript text from a YouTube video. Useful for content summarization or analysis.
- Arguments:
url(str): The URL of the YouTube video to analyze.languages(list[str]): Priority list of language codes (default:['ko', 'en']).
Searches for YouTube videos using specific keywords.
- Arguments:
query(str): Search keyword.order(str): Sort order (relevance,date,viewCount,rating,title,videoCount/ default:relevance).max_results(int): Number of videos to return (default: 5).
Retrieves information (subscribers, total views) for the channel associated with a specific video, along with its recent/popular videos.
- Arguments:
video_url(str): The URL of a video from the target channel (used to identify the channel).order(str): Sort order for the video list (date,viewCount,rating/ default:date).max_results(int): Number of channel videos to retrieve (default: 5).
Collects comments and reactions from a specific video.
- Arguments:
video_url(str): The URL of the target YouTube video.order(str): Sort order (relevance: top rated,time: newest / default:relevance).max_results(int): Number of comments to collect (default: 10).
This project is optimized for FastMCP Cloud.
- Push this repository to GitHub.
- Connect the repository in the FastMCP Cloud dashboard.
- Set the
YOUTUBE_API_KEYenvironment variable. - Once deployed, the server is available for use in Claude Desktop or other supported clients.