youtube-knowledge-mcp 1.0.1 → 1.0.2
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/LICENSE +1 -1
- package/README.md +52 -18
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -46,9 +46,9 @@ npm run build
|
|
|
46
46
|
|
|
47
47
|
## Configuration
|
|
48
48
|
|
|
49
|
-
###
|
|
49
|
+
### Quick Start with npx (Recommended)
|
|
50
50
|
|
|
51
|
-
Add to your
|
|
51
|
+
No installation needed! Add to your MCP configuration:
|
|
52
52
|
|
|
53
53
|
```json
|
|
54
54
|
{
|
|
@@ -61,7 +61,11 @@ Add to your Claude Code MCP configuration:
|
|
|
61
61
|
}
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
### With
|
|
64
|
+
### With Global Installation
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm install -g youtube-knowledge-mcp
|
|
68
|
+
```
|
|
65
69
|
|
|
66
70
|
```json
|
|
67
71
|
{
|
|
@@ -73,20 +77,17 @@ Add to your Claude Code MCP configuration:
|
|
|
73
77
|
}
|
|
74
78
|
```
|
|
75
79
|
|
|
76
|
-
###
|
|
80
|
+
### Configuration File Locations
|
|
77
81
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
```
|
|
82
|
+
| Client | Path |
|
|
83
|
+
| ---------------------------- | ----------------------------------------------------------------- |
|
|
84
|
+
| **Claude Desktop (macOS)** | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
85
|
+
| **Claude Desktop (Windows)** | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
86
|
+
| **Claude Desktop (Linux)** | `~/.config/Claude/claude_desktop_config.json` |
|
|
87
|
+
| **Claude Code** | `.mcp.json` in your project or `~/.claude/settings.json` |
|
|
88
|
+
| **Cursor** | `.cursor/mcp.json` in your project |
|
|
88
89
|
|
|
89
|
-
|
|
90
|
+
Restart your client after updating configuration.
|
|
90
91
|
|
|
91
92
|
## MCP Tools
|
|
92
93
|
|
|
@@ -210,6 +211,20 @@ Content is stored in `~/.youtube-knowledge/`:
|
|
|
210
211
|
"Create a Claude Code skill from this video's content"
|
|
211
212
|
```
|
|
212
213
|
|
|
214
|
+
## Testing
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
npm test # Run all tests
|
|
218
|
+
npm run test:watch # Watch mode
|
|
219
|
+
npm run test:coverage # Coverage report
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Test Suite:**
|
|
223
|
+
|
|
224
|
+
- ✅ **11 tests** passing
|
|
225
|
+
- ⚡ **Execution time:** ~100ms
|
|
226
|
+
- 🧰 **Framework:** Vitest
|
|
227
|
+
|
|
213
228
|
## Development
|
|
214
229
|
|
|
215
230
|
```bash
|
|
@@ -221,14 +236,33 @@ npm start # Run the server
|
|
|
221
236
|
|
|
222
237
|
## Contributing
|
|
223
238
|
|
|
224
|
-
|
|
239
|
+
Contributions are welcome! Please:
|
|
240
|
+
|
|
241
|
+
1. Fork the repository
|
|
242
|
+
2. Create a feature branch
|
|
243
|
+
3. Run tests (`npm test`)
|
|
244
|
+
4. Submit a pull request
|
|
225
245
|
|
|
226
246
|
## License
|
|
227
247
|
|
|
228
|
-
[
|
|
248
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
249
|
+
|
|
250
|
+
**Attribution appreciated!** If you use YouTube Knowledge MCP, consider:
|
|
251
|
+
|
|
252
|
+
- ⭐ Starring this repository
|
|
253
|
+
- 💬 Mentioning it in your project
|
|
254
|
+
- 🔗 Linking back to this repo
|
|
255
|
+
|
|
256
|
+
## Acknowledgments
|
|
257
|
+
|
|
258
|
+
- [yt-dlp](https://github.com/yt-dlp/yt-dlp) for the powerful YouTube extraction
|
|
259
|
+
- [Anthropic](https://anthropic.com) for the Model Context Protocol
|
|
260
|
+
- All contributors and users of this project
|
|
229
261
|
|
|
230
262
|
---
|
|
231
263
|
|
|
232
264
|
<div align="center">
|
|
233
|
-
<strong>Built by <a href="https://github.com/teobouancheau">teobouancheau</a
|
|
265
|
+
<strong>Built with ❤️ by <a href="https://github.com/teobouancheau">teobouancheau</a> for the YouTube community</strong>
|
|
266
|
+
<br>
|
|
267
|
+
<sub>AI + YouTube knowledge to supercharge content creation</sub>
|
|
234
268
|
</div>
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync } from 'fs';
|
|
3
|
+
import { dirname, join } from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
2
5
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
6
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
7
|
import { fetchVideosSchema, fetchVideosHandler } from './tools/fetch-videos.js';
|
|
@@ -7,9 +10,11 @@ import { getTranscriptSchema, getTranscriptHandler } from './tools/get-transcrip
|
|
|
7
10
|
import { saveToLibrarySchema, saveToLibraryHandler } from './tools/save-to-library.js';
|
|
8
11
|
import { listLibrarySchema, listLibraryHandler } from './tools/list-library.js';
|
|
9
12
|
import { listFormatsSchema, listFormatsHandler, downloadVideoSchema, downloadVideoHandler, } from './tools/download-video.js';
|
|
13
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
14
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
|
|
10
15
|
const server = new McpServer({
|
|
11
|
-
name: 'youtube-knowledge-
|
|
12
|
-
version:
|
|
16
|
+
name: 'youtube-knowledge-mcp',
|
|
17
|
+
version: pkg.version,
|
|
13
18
|
});
|
|
14
19
|
// Tool 1: Fetch videos from playlist or channel
|
|
15
20
|
server.registerTool('youtube_fetch_videos', {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAC3B,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,2B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W,EAAE,mBAAmB;CACjC,EACD,oBAAoB,CACrB,CAAC;AAEF,uBAAuB;AACvB,MAAM,CAAC,YAAY,CACjB,sBAAsB,EACtB;IACE,KAAK,EAAE,cAAc;IACrB,WAAW,EACT,mFAAmF;IACrF,WAAW,EAAE,iBAAiB;CAC/B,EACD,kBAAkB,CACnB,CAAC;AAEF,6BAA6B;AAC7B,MAAM,CAAC,YAAY,CACjB,sBAAsB,EACtB;IACE,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,+GAA+G;IACjH,WAAW,EAAE,iBAAiB;CAC/B,EACD,kBAAkB,CACnB,CAAC;AAEF,yBAAyB;AACzB,MAAM,CAAC,YAAY,CACjB,wBAAwB,EACxB;IACE,KAAK,EAAE,gBAAgB;IACvB,WAAW,EACT,+LAA+L;IACjM,WAAW,EAAE,mBAAmB;CACjC,EACD,oBAAoB,CACrB,CAAC;AAEF,8BAA8B;AAC9B,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC9B,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;IACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "youtube-knowledge-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "MCP Server for extracting and managing YouTube video knowledge",
|
|
5
5
|
"author": "teobouancheau",
|
|
6
6
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"type": "module",
|
|
25
25
|
"main": "dist/index.js",
|
|
26
26
|
"bin": {
|
|
27
|
-
"youtube-knowledge-mcp": "
|
|
27
|
+
"youtube-knowledge-mcp": "dist/index.js"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "tsc -p tsconfig.build.json && chmod 755 dist/index.js",
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
"test:coverage": "vitest run --coverage",
|
|
42
42
|
"typecheck": "tsc --noEmit",
|
|
43
43
|
"validate": "npm run typecheck && npm run lint && npm run test",
|
|
44
|
-
"prepare": "husky"
|
|
44
|
+
"prepare": "husky",
|
|
45
|
+
"prepublishOnly": "npm run rebuild && npm run validate"
|
|
45
46
|
},
|
|
46
47
|
"files": [
|
|
47
48
|
"dist"
|