iflow-mcp_seanpedersen-youtube-transcript-mcp-server 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ Metadata-Version: 2.4
2
+ Name: iflow-mcp_seanpedersen-youtube-transcript-mcp-server
3
+ Version: 0.1.0
4
+ Requires-Python: >=3.11
5
+ Requires-Dist: fastmcp>=2.10.1
6
+ Requires-Dist: youtube-transcript-api>=1.2.1
@@ -0,0 +1,36 @@
1
+ # youtube-transcript-mcp
2
+
3
+ Transcribe YouTube videos for LLM chat apps.
4
+
5
+ ## Usage
6
+
7
+ Example prompt: Summarize https://www.youtube.com/watch?v=uB9yZenVLzg
8
+
9
+ ## Install
10
+
11
+ - Install [Claude Desktop](https://claude.ai/download)
12
+ - Install [uv](https://docs.astral.sh/uv/getting-started/installation/)
13
+ - Clone repo: `git clone https://github.com/SeanPedersen/youtube-transcript-mcp`
14
+ - `cd youtube-transcript-mcp/`
15
+ - Setup environment: `uv venv && uv pip install -r pyproject.toml && source .venv/bin/activate`
16
+ - Install the MCP server: `fastmcp install claude-desktop mcp_server.py --with youtube-transcript-api`
17
+ - Restart Claude Desktop
18
+
19
+ ## MCP JSON Config
20
+ ```json
21
+ "YouTube transcription service": {
22
+ "command": "uv",
23
+ "args": [
24
+ "run",
25
+ "--with",
26
+ "fastmcp",
27
+ "--with",
28
+ "youtube-transcript-api",
29
+ "fastmcp",
30
+ "run",
31
+ "$INSERT_PATH/youtube-transcript-mcp/mcp_server.py"
32
+ ],
33
+ "env": {},
34
+ "transport": "stdio"
35
+ }
36
+ ```
@@ -0,0 +1,6 @@
1
+ Metadata-Version: 2.4
2
+ Name: iflow-mcp_seanpedersen-youtube-transcript-mcp-server
3
+ Version: 0.1.0
4
+ Requires-Python: >=3.11
5
+ Requires-Dist: fastmcp>=2.10.1
6
+ Requires-Dist: youtube-transcript-api>=1.2.1
@@ -0,0 +1,9 @@
1
+ README.md
2
+ mcp_server.py
3
+ pyproject.toml
4
+ iflow_mcp_seanpedersen_youtube_transcript_mcp_server.egg-info/PKG-INFO
5
+ iflow_mcp_seanpedersen_youtube_transcript_mcp_server.egg-info/SOURCES.txt
6
+ iflow_mcp_seanpedersen_youtube_transcript_mcp_server.egg-info/dependency_links.txt
7
+ iflow_mcp_seanpedersen_youtube_transcript_mcp_server.egg-info/entry_points.txt
8
+ iflow_mcp_seanpedersen_youtube_transcript_mcp_server.egg-info/requires.txt
9
+ iflow_mcp_seanpedersen_youtube_transcript_mcp_server.egg-info/top_level.txt
@@ -0,0 +1,36 @@
1
+ import re
2
+ from fastmcp import FastMCP
3
+ from youtube_transcript_api import YouTubeTranscriptApi
4
+
5
+ mcp = FastMCP("YouTube transcription service")
6
+
7
+
8
+ @mcp.tool
9
+ def transcribe(youtube_video_url: str) -> str:
10
+ """
11
+ Transcribe a YouTube video using its URL.
12
+ """
13
+ # Extract video ID using regex to handle various YouTube URL formats
14
+ video_id_pattern = (
15
+ r"(?:youtube\.com/watch\?v=|youtu\.be/|youtube\.com/embed/)([a-zA-Z0-9_-]{11})"
16
+ )
17
+ match = re.search(video_id_pattern, youtube_video_url)
18
+
19
+ if not match:
20
+ raise ValueError("Invalid YouTube URL format")
21
+
22
+ video_id = match.group(1)
23
+ ytt_api = YouTubeTranscriptApi()
24
+ transcript = ytt_api.fetch(video_id, languages=["en", "de", "es", "fr", "ru"])
25
+ adblock_prompt = "Remove any mention of sponsorships, ads, or promotional content from the following transcript:\n\n"
26
+ transcript_text = "\n".join(snippet.text for snippet in transcript)
27
+ return adblock_prompt + transcript_text
28
+
29
+
30
+ if __name__ == "__main__":
31
+ mcp.run()
32
+
33
+
34
+ def main():
35
+ """Main entry point for the MCP server."""
36
+ mcp.run()
@@ -0,0 +1,11 @@
1
+ [project]
2
+ name = "iflow-mcp_seanpedersen-youtube-transcript-mcp-server"
3
+ version = "0.1.0"
4
+ requires-python = ">=3.11"
5
+ dependencies = [
6
+ "fastmcp>=2.10.1",
7
+ "youtube-transcript-api>=1.2.1",
8
+ ]
9
+
10
+ [project.scripts]
11
+ youtube-transcript = "mcp_server:main"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+