@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 +3 -3
- package/CODE_OF_CONDUCT.md +49 -49
- package/COPYING +7 -7
- package/README.md +186 -207
- package/eslint.config.mjs +88 -88
- package/lib/index.mjs +9 -8
- package/lib/index.mjs.map +1 -1
- package/package.json +28 -28
- package/src/index.mts +208 -207
- package/src/vtt2txt.mts +24 -24
- package/tsconfig.json +28 -28
- package/documentation/mcp-inspector-guide.md +0 -308
- package/documentation/mcp-llm-guide.md +0 -379
package/.prettierrc
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
{
|
2
|
-
"endOfLine": "auto"
|
3
|
-
}
|
1
|
+
{
|
2
|
+
"endOfLine": "auto"
|
3
|
+
}
|
package/CODE_OF_CONDUCT.md
CHANGED
@@ -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
|
-
##
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
### 1.
|
23
|
-
|
24
|
-
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
```
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
```
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
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.
|