@felores/mcp-video 0.5.3 → 0.5.4

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.
package/.prettierrc CHANGED
@@ -1,3 +1,3 @@
1
- {
2
- "endOfLine": "auto"
3
- }
1
+ {
2
+ "endOfLine": "auto"
3
+ }
@@ -1,49 +1,49 @@
1
- # Contributor Code of Conduct
2
-
3
- As contributors and maintainers of this project, and in the interest of
4
- fostering an open and welcoming community, we pledge to respect all people who
5
- contribute through reporting issues, posting feature requests, updating
6
- documentation, submitting pull requests or patches, and other activities.
7
-
8
- We are committed to making participation in this project a harassment-free
9
- experience for everyone, regardless of level of experience, gender, gender
10
- identity and expression, sexual orientation, disability, personal appearance,
11
- body size, race, ethnicity, age, religion, or nationality.
12
-
13
- Examples of unacceptable behavior by participants include:
14
-
15
- - The use of sexualized language or imagery
16
- - Personal attacks
17
- - Trolling or insulting/derogatory comments
18
- - Public or private harassment
19
- - Publishing other's private information, such as physical or electronic
20
- addresses, without explicit permission
21
- - Other unethical or unprofessional conduct
22
-
23
- Project maintainers have the right and responsibility to remove, edit, or
24
- reject comments, commits, code, wiki edits, issues, and other contributions
25
- that are not aligned to this Code of Conduct, or to ban temporarily or
26
- permanently any contributor for other behaviors that they deem inappropriate,
27
- threatening, offensive, or harmful.
28
-
29
- By adopting this Code of Conduct, project maintainers commit themselves to
30
- fairly and consistently applying these principles to every aspect of managing
31
- this project. Project maintainers who do not follow or enforce the Code of
32
- Conduct may be permanently removed from the project team.
33
-
34
- This Code of Conduct applies both within project spaces and in public spaces
35
- when an individual is representing the project or its community.
36
-
37
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
- reported by contacting a project maintainer at anais@anaisbetts.org. All
39
- complaints will be reviewed and investigated and will result in a response that
40
- is deemed necessary and appropriate to the circumstances. Maintainers are
41
- obligated to maintain confidentiality with regard to the reporter of an
42
- incident.
43
-
44
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
- version 1.3.0, available at
46
- [http://contributor-covenant.org/version/1/3/0/][version]
47
-
48
- [homepage]: http://contributor-covenant.org
49
- [version]: http://contributor-covenant.org/version/1/3/0/
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ - The use of sexualized language or imagery
16
+ - Personal attacks
17
+ - Trolling or insulting/derogatory comments
18
+ - Public or private harassment
19
+ - Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ - Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This Code of Conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at anais@anaisbetts.org. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
package/COPYING CHANGED
@@ -1,7 +1,7 @@
1
- Copyright (c) 2024 Anaïs Betts
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
-
5
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2024 Anaïs Betts
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,207 +1,186 @@
1
- # Video MCP Server
2
-
3
- A powerful Model Context Protocol (MCP) server that enables AI assistants like Claude to work with video content. This server provides capabilities for downloading video transcripts in plain text and videos from various platforms including YouTube, Vimeo, Twitter/X, and TikTok.
4
-
5
- This project is a fork from anaisbetts/mcp-youtube which only outputs the transcript with timestamps. This project outputs the transcript in plain text without timestamps for easy LLM consumption and adds the download tool.
6
-
7
- ## Features
8
-
9
- - Download and process video subtitles/closed captions for AI analysis
10
- - Download videos in high quality (up to 1080p)
11
- - Support for multiple platforms:
12
- - YouTube
13
- - Vimeo
14
- - Twitter/X
15
- - TikTok
16
- - And more platforms supported by yt-dlp
17
-
18
- ## MCP Tools
19
-
20
- This server provides two powerful tools that can be used by AI assistants through the Model Context Protocol:
21
-
22
- ### 1. Video Transcript Tool (`get_video_transcript`)
23
- - Downloads and processes video subtitles/closed captions into plain text format
24
- - Removes timestamps and formatting for easy AI consumption
25
- - Supports auto-generated captions when available
26
- - Works with multiple languages (defaults to English)
27
- - Input: Video URL from any supported platform
28
- - Output: Clean, plain text transcript ready for AI analysis
29
-
30
- ### 2. Video Download Tool (`download_video`)
31
- - Downloads videos in high quality (limited to 1080p for reasonable file sizes)
32
- - Automatically selects the best quality format
33
- - Merges video and audio streams when necessary
34
- - Saves files to a configurable downloads directory
35
- - Input:
36
- - Video URL from any supported platform
37
- - Optional filename (recommended format: platform-id, e.g., 'youtube-MhOTvvmlqLM')
38
- - Output:
39
- - Downloaded video file in MP4 format
40
- - File information including title, duration, resolution, and file size
41
-
42
- ## Prerequisites
43
-
44
- ### Node.js and npm
45
-
46
- 1. Install Node.js (version 18 or higher) and npm from [nodejs.org](https://nodejs.org/)
47
- 2. Verify installation:
48
- ```bash
49
- node --version
50
- npm --version
51
- ```
52
-
53
- ### Installing yt-dlp
54
-
55
- The server requires `yt-dlp` to be installed on your system. Here are the installation methods for different platforms:
56
-
57
- #### Windows
58
- 1. Using WinGet (Recommended):
59
- ```powershell
60
- winget install yt-dlp
61
- ```
62
- 2. Using Scoop:
63
- ```powershell
64
- scoop install yt-dlp
65
- ```
66
- 3. Manual Installation:
67
- - Download the latest release from [yt-dlp releases](https://github.com/yt-dlp/yt-dlp/releases)
68
- - Place the executable in a directory in your PATH
69
-
70
- #### macOS
71
- 1. Using Homebrew:
72
- ```bash
73
- brew install yt-dlp
74
- ```
75
- 2. Using MacPorts:
76
- ```bash
77
- sudo port install yt-dlp
78
- ```
79
-
80
- #### Linux
81
- 1. Using package manager:
82
- ```bash
83
- # On Debian/Ubuntu
84
- sudo apt install yt-dlp
85
-
86
- # On Fedora
87
- sudo dnf install yt-dlp
88
-
89
- # On Arch Linux
90
- sudo pacman -S yt-dlp
91
- ```
92
- 2. Using pip:
93
- ```bash
94
- python3 -m pip install -U yt-dlp
95
- ```
96
-
97
- ## Installation and Setup
98
-
99
- ### Option 1: Direct Installation (Recommended for Users)
100
-
101
- Install the MCP server using the [mcp-installer](https://github.com/anaisbetts/mcp-installer):
102
- ```bash
103
- # Install mcp-installer if you haven't already
104
- npm install -g @anaisbetts/mcp-installer
105
-
106
- # Install this MCP server
107
- mcp-installer install @felores/mcp-video
108
- ```
109
-
110
- ### Option 2: Manual Installation (Recommended for Developers)
111
-
112
- 1. Clone the repository:
113
- ```bash
114
- git clone https://github.com/felores/mcp-video.git
115
- cd mcp-video
116
- ```
117
-
118
- 2. Install dependencies:
119
- ```bash
120
- npm install
121
- ```
122
-
123
- 3. Build the project:
124
- ```bash
125
- npm run build
126
- ```
127
-
128
- 4. Start the server:
129
- ```bash
130
- npm start
131
- ```
132
-
133
- ## Usage
134
-
135
- Once installed, you can use this server through any MCP-compatible client (like Claude.ai). Here are some example prompts:
136
-
137
- 1. To analyze a video's content:
138
- ```
139
- Summarize the YouTube video https://youtube.com/watch?v=VIDEO_ID
140
- ```
141
-
142
- 2. To get specific information:
143
- ```
144
- What are the main points discussed in this video: https://youtube.com/watch?v=VIDEO_ID
145
- ```
146
-
147
- The server will automatically:
148
- 1. Download the video's subtitles/closed captions
149
- 2. Process and clean the text
150
- 3. Make it available to the AI assistant for analysis
151
-
152
- ## Environment Variables
153
-
154
- - `DOWNLOADS_DIR`: Specify a custom directory for downloaded videos (default: `./downloads`)
155
-
156
- ## Development
157
-
158
- ### Setting Up Development Environment
159
-
160
- 1. Fork and clone the repository:
161
- ```bash
162
- git clone https://github.com/YOUR_USERNAME/mcp-video.git
163
- cd mcp-video
164
- ```
165
-
166
- 2. Install development dependencies:
167
- ```bash
168
- npm install
169
- ```
170
-
171
- 3. Build the project:
172
- ```bash
173
- npm run build
174
- ```
175
-
176
- 4. Start the development server:
177
- ```bash
178
- npm start
179
- ```
180
-
181
- ### Running Tests
182
- ```bash
183
- npm test
184
- ```
185
-
186
- ### Making Changes
187
- 1. Create a new branch:
188
- ```bash
189
- git checkout -b feature/your-feature-name
190
- ```
191
-
192
- 2. Make your changes and commit:
193
- ```bash
194
- git add .
195
- git commit -m "Description of changes"
196
- ```
197
-
198
- 3. Push to your fork:
199
- ```bash
200
- git push origin feature/your-feature-name
201
- ```
202
-
203
- 4. Create a Pull Request from your fork to the main repository
204
-
205
- ## License
206
-
207
- MIT License - See [COPYING](COPYING) for details.
1
+ # Video MCP Server
2
+
3
+ A powerful Model Context Protocol (MCP) server that enables AI assistants like Claude to work with video content. This server provides capabilities for downloading video transcripts in plain text and videos from various platforms including YouTube, Vimeo, Twitter/X, and TikTok.
4
+
5
+ This project is a fork from anaisbetts/mcp-youtube which only outputs the transcript with timestamps. This project outputs the transcript in plain text without timestamps for easy LLM consumption and adds the download tool.
6
+
7
+ ## Features
8
+
9
+ - Download and process video subtitles/closed captions for AI analysis
10
+ - Download videos in high quality (up to 1080p)
11
+ - Support for multiple platforms:
12
+ - YouTube
13
+ - Vimeo
14
+ - Twitter/X
15
+ - TikTok
16
+ - And more platforms supported by yt-dlp
17
+
18
+ ## Prerequisites
19
+
20
+ Before installing the MCP server, make sure you have the following prerequisites:
21
+
22
+ ### 1. yt-dlp (Required)
23
+
24
+ The server requires [yt-dlp](https://github.com/yt-dlp/yt-dlp) to be installed on your system first. Here are the installation methods for different platforms:
25
+
26
+ #### Windows
27
+ Using WinGet (Recommended):
28
+ ```powershell
29
+ winget install yt-dlp
30
+ ```
31
+ #### macOS
32
+ Using Homebrew:
33
+ ```bash
34
+ brew install yt-dlp
35
+ ```
36
+ #### Linux
37
+ Using package manager:
38
+ ```bash
39
+ sudo apt install yt-dlp
40
+ ```
41
+
42
+ ### 2. Node.js and npm
43
+
44
+ 1. Install Node.js (version 18 or higher) and npm from [nodejs.org](https://nodejs.org/)
45
+ 2. Verify installation:
46
+ ```bash
47
+ node --version
48
+ npm --version
49
+ ```
50
+
51
+ ## Installation and Setup
52
+
53
+ After installing the prerequisites above, you can install the MCP server using one of these methods:
54
+
55
+ ### Option 1: NPX Installation (Recommended)
56
+
57
+ Add the following to your `claude_desktop_config.json`:
58
+
59
+ ```bash
60
+ {
61
+ "mcpServers": {
62
+ "video": {
63
+ "command": "npx",
64
+ "args": [
65
+ "@felores/mcp-video"
66
+ ],
67
+ "env": {
68
+ "DOWNLOADS_DIR": "path/to/downloads"
69
+ }
70
+ }
71
+ }
72
+ }
73
+ ```
74
+ Replace `path/to/downloads` with the path to your desired downloads directory.
75
+
76
+ This will automatically install and run the latest version of the server.
77
+
78
+ ### Option 2: Using MCP Installer
79
+
80
+ Install the [mcp-installer](https://github.com/anaisbetts/mcp-installer), restart Claude, and prompt claude to install the Video MCP Server:
81
+ ```bash
82
+ Install @felores/mcp-video with environment DOWNLOADS_DIR set to path/to/downloads
83
+ ```
84
+ Modify path/to/downloads to your desired downloads directory system path.
85
+
86
+ ### Option 3: Manual Installation (For Developers)
87
+
88
+ 1. Clone the repository:
89
+ ```bash
90
+ git clone https://github.com/felores/mcp-video.git
91
+ cd mcp-video
92
+ ```
93
+
94
+ 2. Install dependencies:
95
+ ```bash
96
+ npm install
97
+ ```
98
+
99
+ 3. Build the project:
100
+ ```bash
101
+ npm run build
102
+ ```
103
+
104
+ 4. Start the server:
105
+ ```bash
106
+ npm start
107
+ ```
108
+
109
+ Add the following to your `claude_desktop_config.json`:
110
+
111
+ ```bash
112
+ {
113
+ "mcpServers": {
114
+ "video": {
115
+ "command": "node",
116
+ "args": ["path/to/mcp-video/lib/index.mjs"],
117
+ "env": {
118
+ "DOWNLOADS_DIR": "path/to/downloads"
119
+ }
120
+ }
121
+ }
122
+ }
123
+ ```
124
+ ## Usage
125
+
126
+ ## MCP Tools
127
+
128
+ This server provides two powerful tools that can be used by AI assistants through the Model Context Protocol:
129
+
130
+ ### 1. Video Transcript Tool (`get_video_transcript`)
131
+ - Downloads and processes video subtitles/closed captions into plain text format
132
+ - Removes timestamps and formatting for easy AI consumption
133
+ - Supports auto-generated captions when available
134
+ - Works with multiple languages (defaults to English)
135
+ - Input: Video URL from any supported platform
136
+ - Output: Clean, plain text transcript ready for AI analysis
137
+
138
+ ### 2. Video Download Tool (`download_video`)
139
+ - Downloads videos in high quality (limited to 1080p for reasonable file sizes)
140
+ - Automatically selects the best quality format
141
+ - Merges video and audio streams when necessary
142
+ - Saves files to a configurable downloads directory
143
+ - Input:
144
+ - Video URL from any supported platform
145
+ - Optional filename (recommended format: platform-id, e.g., 'youtube-MhOTvvmlqLM')
146
+ - Output:
147
+ - Downloaded video file in MP4 format
148
+ - File information including title, duration, resolution, and file size
149
+
150
+ Once installed, you can use this server through any MCP-compatible client (like Claude.ai). Here are some example prompts:
151
+
152
+ 1. To analyze a video's content:
153
+ ```
154
+ Summarize the YouTube video https://youtube.com/watch?v=VIDEO_ID
155
+ ```
156
+
157
+ 2. To get specific information:
158
+ ```
159
+ What are the main points discussed in this video: https://youtube.com/watch?v=VIDEO_ID
160
+ ```
161
+
162
+ The server will automatically:
163
+ 1. Download the video's subtitles/closed captions
164
+ 2. Process and clean the text
165
+ 3. Make it available to the AI assistant for analysis
166
+
167
+ ## Environment Variables
168
+
169
+ - `DOWNLOADS_DIR`: Specify a custom directory for downloaded videos (default: `./downloads`)
170
+
171
+ ## Reference
172
+
173
+ ### Supported Platforms
174
+ - YouTube
175
+ - Vimeo
176
+ - Twitter/X
177
+ - TikTok
178
+ - And any platform supported by [yt-dlp](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md)
179
+
180
+ ### Dependencies
181
+ - [yt-dlp](https://github.com/yt-dlp/yt-dlp) - Video downloader
182
+ - [Model Context Protocol](https://github.com/anaisbetts/mcp) - AI communication protocol
183
+
184
+ ## License
185
+
186
+ MIT License - See [COPYING](COPYING) for details.