mcp-headless-youtube-transcript 0.1.1 → 0.1.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.
Files changed (2) hide show
  1. package/build/index.js +4 -6
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -3,7 +3,7 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3
3
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
4
  import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
5
5
  import { getSubtitles } from 'headless-youtube-captions';
6
- import { extractVideoId, formatTime } from './utils.js';
6
+ import { extractVideoId } from './utils.js';
7
7
  const server = new Server({
8
8
  name: 'mcp-headless-youtube-transcript',
9
9
  version: '1.0.0',
@@ -54,15 +54,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
54
54
  videoID: extractedVideoId,
55
55
  lang: lang,
56
56
  });
57
- // Format the transcript
58
- const transcript = subtitles
59
- .map((subtitle) => `[${formatTime(subtitle.start)}] ${subtitle.text}`)
60
- .join('\n');
57
+ // Just get the raw text content, no timestamps
58
+ const transcript = subtitles.map(s => s.text).join(' ');
61
59
  return {
62
60
  content: [
63
61
  {
64
62
  type: 'text',
65
- text: `YouTube Transcript for video ID: ${extractedVideoId}\nLanguage: ${lang}\n\n${transcript}`,
63
+ text: transcript,
66
64
  },
67
65
  ],
68
66
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-headless-youtube-transcript",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "MCP server for extracting YouTube video transcripts using headless-youtube-captions",
5
5
  "main": "build/index.js",
6
6
  "bin": {