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 CHANGED
@@ -1,35 +1,111 @@
1
- # YT TRANSCRIPT STRAPI PLUGIN
1
+ # YouTube Transcript Strapi Plugin
2
2
 
3
- Here is a basic strapi plugin that allows you to get the transcript of a youtube video and save it to the database.
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
- npm install yt-transcript-strapi-plugin
17
+ npm install yt-transcript-strapi-plugin
9
18
  ```
10
19
 
11
- ## Update Configuration
20
+ ## Configuration
12
21
 
13
- In your Strapi project directory, go to the `config/plugins.ts` file and add the following:
22
+ Add the plugin to your `config/plugins.ts`:
14
23
 
15
- ```ts
16
- export default () => ({
17
- "yt-transcript-strapi-plugin": {
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
- openAIApiKey: process.env.OPENAI_API_KEY,
22
- model: "gpt-4o-mini",
23
- temp: 0.7,
24
- maxTokens: 1000,
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
- You will need to add the `OPENAI_API_KEY` to your `.env` file and provide the other parameters as needed.
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
- - model: can be any model that is supported by OpenAI
34
- - temp: temperature of the model
35
- - maxTokens: max tokens for the model
111
+ MIT