yt-transcript-strapi-plugin 0.0.27-oauth.1 → 0.1.1
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/README.md +93 -17
- package/dist/server/index.js +242 -26146
- package/dist/server/index.mjs +257 -26131
- package/dist/server/src/content-types/index.d.ts +0 -147
- package/dist/server/src/controllers/index.d.ts +0 -16
- package/dist/server/src/index.d.ts +2 -182
- package/dist/server/src/middlewares/index.d.ts +1 -5
- package/dist/server/src/policies/index.d.ts +1 -5
- package/dist/server/src/services/index.d.ts +0 -9
- package/dist/server/src/types.d.ts +0 -9
- package/package.json +7 -2
- package/dist/server/src/content-types/oauth-client/index.d.ts +0 -53
- package/dist/server/src/content-types/oauth-code/index.d.ts +0 -47
- package/dist/server/src/content-types/oauth-token/index.d.ts +0 -50
- package/dist/server/src/controllers/oauth-client.d.ts +0 -26
- package/dist/server/src/controllers/oauth.d.ts +0 -26
- package/dist/server/src/middlewares/oauth-auth.d.ts +0 -18
- package/dist/server/src/policies/oauth-auth.d.ts +0 -29
- package/dist/server/src/routes/oauth.d.ts +0 -10
- package/dist/server/src/services/oauth.d.ts +0 -23
package/README.md
CHANGED
|
@@ -1,35 +1,111 @@
|
|
|
1
|
-
#
|
|
1
|
+
# YouTube Transcript Strapi Plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A Strapi plugin that provides YouTube transcript extraction with **MCP (Model Context Protocol)** support for AI assistants like ChatGPT and Claude.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Extract transcripts from YouTube videos
|
|
8
|
+
- MCP server endpoint for AI assistant integration
|
|
9
|
+
- OAuth 2.0 authentication support (for ChatGPT)
|
|
10
|
+
- API token authentication support (for Claude Desktop)
|
|
11
|
+
- Automatic transcript chunking and search
|
|
12
|
+
- Works with `strapi-oauth-mcp-manager` for centralized OAuth
|
|
4
13
|
|
|
5
14
|
## Installation
|
|
6
15
|
|
|
7
16
|
```bash
|
|
8
|
-
|
|
17
|
+
npm install yt-transcript-strapi-plugin
|
|
9
18
|
```
|
|
10
19
|
|
|
11
|
-
##
|
|
20
|
+
## Configuration
|
|
12
21
|
|
|
13
|
-
|
|
22
|
+
Add the plugin to your `config/plugins.ts`:
|
|
14
23
|
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
|
|
24
|
+
```typescript
|
|
25
|
+
export default () => ({
|
|
26
|
+
'yt-transcript-strapi-plugin': {
|
|
18
27
|
enabled: true,
|
|
19
|
-
resolve: "./src/plugins/yt-transcript-strapi-plugin",
|
|
20
28
|
config: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
proxyUrl: process.env.PROXY_URL, // Optional: proxy for YouTube requests
|
|
30
|
+
chunkSizeSeconds: 300, // Chunk size for pagination (5 minutes)
|
|
31
|
+
previewLength: 500, // Preview length in characters
|
|
32
|
+
maxFullTranscriptLength: 50000, // Auto-load full transcript if under this
|
|
33
|
+
searchSegmentSeconds: 30, // Segment size for search
|
|
25
34
|
},
|
|
26
35
|
},
|
|
27
36
|
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## MCP Endpoint
|
|
28
40
|
|
|
41
|
+
The plugin exposes an MCP endpoint at:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
/api/yt-transcript-strapi-plugin/mcp
|
|
29
45
|
```
|
|
30
46
|
|
|
31
|
-
|
|
47
|
+
### Available MCP Tools
|
|
48
|
+
|
|
49
|
+
| Tool | Description |
|
|
50
|
+
|------|-------------|
|
|
51
|
+
| `get_transcript_preview` | Get video metadata and transcript preview |
|
|
52
|
+
| `get_transcript_chunk` | Get a specific chunk of the transcript |
|
|
53
|
+
| `search_transcript` | Search within a transcript |
|
|
54
|
+
| `get_full_transcript` | Get the complete transcript |
|
|
55
|
+
|
|
56
|
+
## Authentication
|
|
57
|
+
|
|
58
|
+
### Option 1: OAuth 2.0 (ChatGPT)
|
|
59
|
+
|
|
60
|
+
For ChatGPT integration, use with `strapi-oauth-mcp-manager`:
|
|
61
|
+
|
|
62
|
+
1. Install and enable `strapi-oauth-mcp-manager` plugin
|
|
63
|
+
2. Create an OAuth client in Strapi admin
|
|
64
|
+
3. Configure ChatGPT with:
|
|
65
|
+
- MCP Server URL: `https://your-domain/api/yt-transcript-strapi-plugin/mcp`
|
|
66
|
+
- OAuth Client ID and Secret from Strapi admin
|
|
67
|
+
|
|
68
|
+
The plugin automatically registers with the OAuth manager on startup.
|
|
69
|
+
|
|
70
|
+
### Option 2: API Token (Claude Desktop)
|
|
71
|
+
|
|
72
|
+
For Claude Desktop, use direct API token authentication:
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"mcpServers": {
|
|
77
|
+
"yt-transcript": {
|
|
78
|
+
"command": "npx",
|
|
79
|
+
"args": [
|
|
80
|
+
"mcp-remote",
|
|
81
|
+
"https://your-server.com/api/yt-transcript-strapi-plugin/mcp",
|
|
82
|
+
"--header",
|
|
83
|
+
"Authorization: Bearer YOUR_STRAPI_API_TOKEN"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Get your API token from: Strapi Admin > Settings > API Tokens
|
|
91
|
+
|
|
92
|
+
## Usage with AI Assistants
|
|
93
|
+
|
|
94
|
+
Once connected, you can ask your AI assistant:
|
|
95
|
+
|
|
96
|
+
- "Get the transcript from this YouTube video: [URL]"
|
|
97
|
+
- "Search for mentions of 'machine learning' in this video"
|
|
98
|
+
- "Summarize the main points from this YouTube video"
|
|
99
|
+
|
|
100
|
+
## Requirements
|
|
101
|
+
|
|
102
|
+
- Strapi v5.x
|
|
103
|
+
- Node.js >= 18
|
|
104
|
+
|
|
105
|
+
## Optional Dependencies
|
|
106
|
+
|
|
107
|
+
- `strapi-oauth-mcp-manager` - For OAuth 2.0 support (required for ChatGPT)
|
|
108
|
+
|
|
109
|
+
## License
|
|
32
110
|
|
|
33
|
-
|
|
34
|
-
- temp: temperature of the model
|
|
35
|
-
- maxTokens: max tokens for the model
|
|
111
|
+
MIT
|