Skip to main content
Glama
DumplingAI

Dumpling AI MCP Server

Official
by DumplingAI

get-youtube-transcript

Extract transcripts from YouTube videos with options for timestamps and language preferences to support content analysis and accessibility.

Instructions

Extract transcripts from YouTube videos with optional parameters for timestamps and language preferences.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
videoUrlYesURL of the YouTube video
includeTimestampsNoWhether to include timestamps
timestampsToCombineNoNumber of timestamps to combine
preferredLanguageNoPreferred language code

Implementation Reference

  • Handler function that proxies the request to Dumpling AI's get-youtube-transcript API endpoint, authenticates with API key, and returns the transcript data as JSON string.
    async ({ videoUrl, includeTimestamps, timestampsToCombine, preferredLanguage, }) => { const apiKey = process.env.DUMPLING_API_KEY; if (!apiKey) throw new Error("DUMPLING_API_KEY not set"); const response = await fetch( `${NWS_API_BASE}/api/v1/get-youtube-transcript`, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${apiKey}`, }, body: JSON.stringify({ videoUrl, includeTimestamps, timestampsToCombine, preferredLanguage, }), } ); if (!response.ok) throw new Error(`Failed: ${response.status} ${await response.text()}`); const data = await response.json(); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; }
  • Zod schema defining the input parameters for the get-youtube-transcript tool.
    videoUrl: z.string().url().describe("URL of the YouTube video"), includeTimestamps: z .boolean() .optional() .default(true) .describe("Whether to include timestamps"), timestampsToCombine: z .number() .optional() .describe("Number of timestamps to combine"), preferredLanguage: z .string() .optional() .describe("Preferred language code"), },
  • src/index.ts:16-64 (registration)
    MCP server.tool registration for the get-youtube-transcript tool, including description, input schema, and inline handler.
    server.tool( "get-youtube-transcript", "Extract transcripts from YouTube videos with optional parameters for timestamps and language preferences.", { videoUrl: z.string().url().describe("URL of the YouTube video"), includeTimestamps: z .boolean() .optional() .default(true) .describe("Whether to include timestamps"), timestampsToCombine: z .number() .optional() .describe("Number of timestamps to combine"), preferredLanguage: z .string() .optional() .describe("Preferred language code"), }, async ({ videoUrl, includeTimestamps, timestampsToCombine, preferredLanguage, }) => { const apiKey = process.env.DUMPLING_API_KEY; if (!apiKey) throw new Error("DUMPLING_API_KEY not set"); const response = await fetch( `${NWS_API_BASE}/api/v1/get-youtube-transcript`, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${apiKey}`, }, body: JSON.stringify({ videoUrl, includeTimestamps, timestampsToCombine, preferredLanguage, }), } ); if (!response.ok) throw new Error(`Failed: ${response.status} ${await response.text()}`); const data = await response.json(); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DumplingAI/mcp-server-dumplingai'

If you have feedback or need assistance with the MCP directory API, please join our Discord server