YouTube Research MCP logo

YouTube Research MCP

Community
coyaSONG

Citation-ready YouTube research for AI agents — transcript search, exact timestamp links, cross-video evidence, and channel intelligence over MCP

PublishercoyaSONG
Repositoryyoutube-mcp-server
LanguageJavaScript
Forks
9
Stars
21
Available tools
14
Transport typestdio, streamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    YouTube Research MCP exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 14 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    21 stars and 9 forks from the linked repository.

YouTube Research MCP

CI npm npm downloads GitHub stars Smithery MIT License

Turn YouTube videos into citation-ready research for Codex, Claude, Cursor, and other MCP clients. Paste a video URL and get transcript evidence with timestamps and links that open at the exact quoted moment.

YouTube Research MCP turns a video URL into focused timestamp-linked evidence

text
Input:  https://youtu.be/dQw4w9WgXcQ
Output: [01:05] ...evidence text...
        https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=65s

No YouTube API key is required for transcript research.

Why this server

  • Citation-ready research — every transcript segment includes a timestamp and source URL.
  • Zero-key quick start — transcripts work immediately; add an API key only for search and analytics.
  • URL-first input — accepts normal, short, Shorts, embed, live, and raw video-ID formats.
  • Agent-efficient filtering — search inside transcripts and return nearby context instead of spending tokens on the entire video.
  • Full YouTube intelligence — optional API mode adds comments, video/channel statistics, trends, and comparisons.
  • Remote-native MCP — Streamable HTTP transport at /mcp, plus Docker and Smithery support.

Architecture and trust boundary

The MCP layer validates inputs and returns structured evidence; it does not ask a model to invent summaries or citations. Transcript tools derive timestamps and canonical links from caption segments. Data API tools return an explicit key-required error when YOUTUBE_API_KEY is unavailable, and remote authentication is enforced before MCP session handling.

Focused evidence, not a transcript dump

The included live smoke test asks a focused question about a public video and compares the response with the full timestamped transcript:

ResponseCharacters returned
Full transcript85,518
research-video (3 citations with source identity)1,550
Reduction98.2%

This measures response characters, not model-specific tokens. Reproduce it against the default public fixture—or substitute your own video and query:

bash
npm run test:live
LIVE_TEST_VIDEO='https://youtu.be/VIDEO_ID' LIVE_TEST_QUERY='evaluation' npm run test:live

Quick start — no API key

Requirements: Node.js 20 or newer.

The shortest local install uses stdio and needs no API key:

bash
codex mcp add youtube-research -- npx -y @coyasong/youtube-mcp-server@latest

For Claude Desktop and other MCPB-compatible desktop clients, download the latest one-click MCP bundle and open it. The bundle vendors its runtime dependencies, starts locally over stdio, and asks for a YouTube API key only if you want the optional analytics tools.

Install in VS Code

Or install from the VS Code command line:

bash
code --add-mcp '{"name":"youtube-research","command":"npx","args":["-y","@coyasong/youtube-mcp-server@latest"]}'

For Claude Desktop, Cursor, and other stdio clients, use command npx with arguments -y @coyasong/youtube-mcp-server@latest.

To run the Streamable HTTP transport instead:

bash
git clone https://github.com/coyaSONG/youtube-mcp-server.git
cd youtube-mcp-server
npm install
npm run build
npm start

The server starts at http://localhost:3000/mcp in transcript-only mode. Confirm it with:

bash
curl http://localhost:3000/health

Connect from Codex

With the HTTP server running:

bash
codex mcp add youtube-research --url http://localhost:3000/mcp

Then ask Codex:

text
Use research-video to find what this video says about evaluation,
and cite the exact moments: https://www.youtube.com/watch?v=VIDEO_ID

Connect with MCP Inspector

bash
npx @modelcontextprotocol/inspector
# Connect to http://localhost:3000/mcp

Install through Smithery

bash
npx -y smithery@latest auth login
npx -y smithery@latest mcp add coyaSONG/youtube-mcp-server --client claude

Enable search, comments, and analytics

Set a YouTube Data API v3 key to switch from transcript-only to full mode:

bash
export YOUTUBE_API_KEY=your_key_here
npm start

YOUTUBE_API_KEY is optional. PORT defaults to 3000.

Secure a remote deployment

Do not expose a full-mode server publicly without authentication: unauthenticated users could consume your YouTube API quota. Set a strong bearer token and restrict browser origins when deploying outside localhost:

bash
export MCP_BEARER_TOKEN='replace-with-a-long-random-secret'
export CORS_ORIGIN='https://your-client.example'
export MAX_SESSIONS=100
export SESSION_IDLE_TIMEOUT_MS=1800000
npm start

Browser origins are denied by default. CORS_ORIGIN accepts a comma-separated allowlist of exact http:// or https:// origins; wildcard origins are rejected.

Connect Codex using an environment variable rather than writing the secret into its configuration:

bash
export YOUTUBE_MCP_TOKEN='replace-with-a-long-random-secret'
codex mcp add youtube-research \
  --url https://your-server.example/mcp \
  --bearer-token-env-var YOUTUBE_MCP_TOKEN

/health remains public for container health checks. MCP requests return 401 when authentication is enabled and the bearer token is missing or invalid. Idle sessions are removed automatically, and MAX_SESSIONS bounds memory use.

Best first tool

research-video accepts:

  • video: a YouTube URL or 11-character video ID
  • language: optional caption language such as en, ko, or ja
  • query: optional phrase to find inside the transcript
  • contextLines: surrounding segments to retain, from 0 to 5
  • matchMode: word (default) or substring
  • startSeconds / endSeconds: optional time window
  • offset: result offset for pagination
  • maxSegments: response cap from 1 to 1,000 (default: 200)

It returns structured JSON containing the video title and channel identity, canonical video URL, full caption-track duration and segment count, matching transcript segments, human-readable citation labels, timestamps, directly navigable citation URLs, and pagination metadata. For long videos, use a query or time window first; follow nextOffset only when more evidence is needed.

Compare evidence across videos

research-videos applies one focused query to 2–5 video URLs concurrently. It returns the same structured, timestamp-linked evidence for each source while capping results per video. This is useful for comparing interviews, checking whether multiple sources support a claim, or researching a topic across a short watchlist.

json
{
  "videos": [
    "https://youtu.be/VIDEO_ONE",
    "https://youtu.be/VIDEO_TWO"
  ],
  "query": "evaluation",
  "maxSegmentsPerVideo": 10
}

See YouTube Research Recipes for copy-paste workflows for fact-checking claims, comparing interviews, navigating long talks, researching multilingual captions, and building citation-ready notes.

Capability modes

CapabilityNo-key modeWith YOUTUBE_API_KEY
Transcript research, filtering, key moments, segmentation, summariesYesYes
Video search and commentsNoYes
Video/channel metadata, statistics, trends, and comparisonsNoYes

Captions must be available for the requested video. Age-restricted, private, region-restricted, or caption-disabled videos may not return a transcript.

If this project saves you research time, consider starring the repository so other agent builders can discover it.

See the broader AI tooling portfolio for the reliability principles shared with ralph-research and tmuxicate.

Docker

bash
docker build -t youtube-research-mcp .
docker run --rm -p 3000:3000 youtube-research-mcp

# Full mode
docker run --rm -p 3000:3000 -e YOUTUBE_API_KEY=your_key youtube-research-mcp

Development

bash
npm run dev             # HTTP server from TypeScript
npm test                # build and run all tests
npm run test:live       # live public-video transcript and citation smoke test
npm run test:user       # clean-room smoke test against the published npm package
npm run test:mcpb       # build, unpack, and exercise the installable MCP bundle

Maintainers can follow the release guide. Published GitHub releases run the complete npm, MCP Registry, MCPB, and Smithery delivery pipeline.

API Reference

Resources

  • youtube://video/{videoId} - Get detailed information about a specific video
  • youtube://channel/{channelId} - Get information about a specific channel
  • youtube://transcript/{videoId} - Get transcript for a specific video
    • Optional query parameter: ?language=LANGUAGE_CODE (e.g., en, ko, ja)

Tools

Basic Tools

  • research-video - Get citation-ready transcript evidence from a URL or video ID without an API key
  • research-videos - Compare timestamp-linked evidence across 2–5 videos without an API key
  • search-videos - Search for YouTube videos with advanced filtering options
  • get-video-comments - Get comments for a specific video
  • get-video-transcript - Get transcript for a specific video with optional language
  • enhanced-transcript - Advanced transcript extraction with filtering, search, and multi-video capabilities
  • get-key-moments - Extract key moments with timestamps from a video transcript for easier navigation
  • get-segmented-transcript - Divide a video transcript into segments for easier analysis

Tools requiring YOUTUBE_API_KEY are search, comments, statistics, discovery, and channel analysis. enhanced-transcript needs the key only when includeMetadata is true.

Statistical Tools

  • get-video-stats - Get statistical information for a specific video
  • get-channel-stats - Get subscriber count, view count, and other channel statistics
  • compare-videos - Compare statistics across multiple videos

Discovery Tools

  • get-trending-videos - Retrieve trending videos by region and category
  • get-video-categories - Get available video categories for a specific region

Analysis Tools

  • analyze-channel-videos - Analyze performance trends of videos from a specific channel

Prompts

  • video-analysis - Generate an analysis of a YouTube video
  • transcript-summary - Generate a summary of a video based on its transcript with customizable length and keywords extraction
  • segment-by-segment-analysis - Provide detailed breakdown of content by analyzing each segment of the video

Examples

Accessing a Video Transcript

youtube://transcript/dQw4w9WgXcQ

Getting a Transcript in a Specific Language

youtube://transcript/dQw4w9WgXcQ?language=en

Using the Statistical Tools

javascript
// Get video statistics
{
  "type": "tool",
  "name": "get-video-stats",
  "parameters": {
    "videoId": "dQw4w9WgXcQ"
  }
}

// Compare multiple videos
{
  "type": "tool",
  "name": "compare-videos",
  "parameters": {
    "videoIds": ["dQw4w9WgXcQ", "9bZkp7q19f0"]
  }
}

Using the Transcript Summary Prompt

javascript
{
  "type": "prompt",
  "name": "transcript-summary",
  "parameters": {
    "videoId": "dQw4w9WgXcQ",
    "language": "en"
  }
}

Using the Enhanced Transcript Tool

javascript
// Basic multi-video transcript extraction
{
  "type": "tool",
  "name": "enhanced-transcript",
  "parameters": {
    "videoIds": ["dQw4w9WgXcQ", "9bZkp7q19f0"],
    "format": "timestamped"
  }
}

// With search and time filtering
{
  "type": "tool",
  "name": "enhanced-transcript",
  "parameters": {
    "videoIds": ["dQw4w9WgXcQ"],
    "filters": {
      "timeRange": {
        "start": 60,  // Start at 60 seconds
        "end": 180    // End at 180 seconds
      },
      "search": {
        "query": "never gonna",
        "contextLines": 2
      }
    },
    "format": "merged"
  }
}

// With duration-based segmentation for easier analysis
{
  "type": "tool",
  "name": "enhanced-transcript",
  "parameters": {
    "videoIds": ["dQw4w9WgXcQ"],
    "filters": {
      "segment": {
        "count": 5,
        "method": "smart"  // Balances caption duration across segments
      }
    },
    "format": "timestamped",
    "language": "en"
  }
}

Using the Enhanced Transcript Analysis Features

javascript
// Get key moments from a video
{
  "type": "tool",
  "name": "get-key-moments",
  "parameters": {
    "videoId": "dQw4w9WgXcQ",
    "maxMoments": 5
  }
}

// Get a segmented transcript
{
  "type": "tool",
  "name": "get-segmented-transcript",
  "parameters": {
    "videoId": "dQw4w9WgXcQ",
    "segmentCount": 4
  }
}

// Get a segment-by-segment analysis
{
  "type": "prompt",
  "name": "segment-by-segment-analysis",
  "parameters": {
    "videoId": "dQw4w9WgXcQ",
    "segmentCount": 4
  }
}

// Get customized transcript summary
{
  "type": "prompt",
  "name": "transcript-summary",
  "parameters": {
    "videoId": "dQw4w9WgXcQ",
    "language": "en",
    "summaryLength": "detailed",
    "includeKeywords": true
  }
}

Error Handling

The server handles various error conditions, including:

  • Invalid or missing API key for Data API tools
  • Video or channel not found
  • Transcript not available
  • Network issues

License

MIT

Acknowledgements

Installation

TypingMind
{
  "mcpServers": {
    "coyasong-youtube-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@coyasong/youtube-mcp-server@latest"
      ]
    }
  }
}

Available Tools

  • search-videos

    [Requires YOUTUBE_API_KEY] Search for YouTube videos with advanced filtering options. Supports parameters: - query: Search term (required) - maxResults: Number of results to return (1-50) - channelId: Filter by specific channel - order: Sort by date, rating, viewCount, relevance, title - type: Filter by resource type (video, channel, playlist) - videoDuration: Filter by length (short: <4min, medium: 4-20min, long: >20min) - publishedAfter/publishedBefore: Filter by publish date (ISO format) - videoCaption: Filter by caption availability - videoDefinition: Filter by quality (standard/high) - regionCode: Filter by country (ISO country code)

  • get-video-comments

    [Requires YOUTUBE_API_KEY] Retrieve comments for a specific YouTube video with sorting options

  • research-video

    Extract a citation-ready YouTube transcript without requiring a YouTube API key. Accepts a video ID or URL and returns timestamped source links that agents can cite and open directly.

  • research-videos

    Run the same focused transcript query across 2 to 5 YouTube videos and return timestamp-linked evidence for comparison. No YouTube API key is required.

  • get-video-transcript

    Get the transcript/captions for a YouTube video with optional language selection. This tool retrieves the full transcript of a video with timestamped captions. Each caption includes the text and its timestamp in the video. Parameters: videoId (required) - The YouTube video ID; language (optional) - Language code for the transcript (e.g., "en", "ko", "ja"). If not specified, the default language for the video will be used. Returns a text with each caption line preceded by its timestamp.

  • get-video-stats

    [Requires YOUTUBE_API_KEY] Get statistical information for a specific YouTube video (views, likes, comments, upload date, etc.)

  • get-channel-stats

    [Requires YOUTUBE_API_KEY] Get statistical information for a specific YouTube channel (subscriber count, total views, video count, etc.)

  • compare-videos

    [Requires YOUTUBE_API_KEY] Compare statistics for multiple YouTube videos

  • get-trending-videos

    [Requires YOUTUBE_API_KEY] Retrieve trending videos by region and category. This helps analyze current popular content trends.

  • get-video-categories

    [Requires YOUTUBE_API_KEY] Retrieve available video categories for a specific region

  • analyze-channel-videos

    [Requires YOUTUBE_API_KEY] Analyze recent videos from a specific channel to identify performance trends

  • enhanced-transcript

    Advanced transcript extraction tool with filtering, search, and multi-video capabilities. Provides rich transcript data for detailed analysis and processing. This tool offers multiple advanced features: 1) Extract transcripts from multiple videos in one request; 2) Filter by time ranges to focus on specific parts; 3) Search for specific content within transcripts; 4) Segment transcripts for structural analysis; 5) Format output in different ways (raw, timestamped, merged text); 6) Include video metadata. Parameters: videoIds (required) - Array of YouTube video IDs (up to 5); language (optional) - Language code; format (optional) - Output format ("raw", "timestamped", "merged"); includeMetadata (optional) - Whether to include video details; filters (optional) - Complex filtering options including timeRange, search, and segment.

  • get-key-moments

    Extract concise, timestamp-linked key moments from a video transcript without returning the full transcript. Useful for quickly navigating longer videos. Parameters: videoId (required) - A YouTube video ID or URL; maxMoments (optional) - Number of key moments to extract (default: 5, max: 10).

  • get-segmented-transcript

    Divide a video transcript into segments for easier analysis and navigation. This tool splits the video into equal time segments and extracts the transcript for each segment with proper timestamps. Ideal for analyzing the structure of longer videos or when you need to focus on specific parts of the content. Parameters: videoId (required) - The YouTube video ID; segmentCount (optional) - Number of segments to divide the video into (default: 4, max: 10). Returns a markdown-formatted text with each segment clearly labeled with time ranges and containing the relevant transcript text.

Use YouTube Research MCP MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once YouTube Research MCP is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add YouTube Research MCP as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the YouTube Research MCP MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "coyasong-youtube-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@coyasong/youtube-mcp-server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the YouTube Research MCP MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the YouTube Research MCP MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use YouTube Research MCP to help me with this task?
YouTube Research MCP
Sure. I read it.
Here is what I found using YouTube Research MCP.

Option 2: Add an MCP server URL

Use this when YouTube Research MCP is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter the MCP server URL from the provider in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste the MCP server URL from the provider into the Server URL field.
  2. Enter a connection name for YouTube Research MCP.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the YouTube Research MCP connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the YouTube Research MCP tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the YouTube Research MCP tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use YouTube Research MCP to help me with this task?
YouTube Research MCP
Sure. I read it.
Here is what I found using YouTube Research MCP.

Frequently asked questions

What is the YouTube Research MCP MCP server used for?

YouTube Research MCP is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use YouTube Research MCP MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use YouTube Research MCP with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use YouTube Research MCP MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With YouTube Research MCP connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect YouTube Research MCP MCP to TypingMind?

YouTube Research MCP can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does YouTube Research MCP MCP provide in TypingMind?

YouTube Research MCP exposes 14 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use YouTube Research MCP MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If YouTube Research MCP requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

segment-by-segment-analysis

Analyze a YouTube video segment by segment for a detailed breakdown of content. This prompt divides the video into the specified number of segments and provides a comprehensive analysis of each part. Particularly useful for longer videos where the content changes throughout or for educational videos with multiple topics. The analysis includes key points, important quotes, and how each segment connects to the overall theme. Parameters: videoId (required) - The YouTube video ID; segmentCount (optional) - Number of segments to divide the video into (default: 4, range: 2-8).

video-analysis

Generate an analysis of a YouTube video based on its content and statistics

transcript-summary

Generate a summary of a YouTube video based on its transcript content with customizable options. This prompt provides different summary levels from brief overviews to detailed analyses, and can extract key topics from the content. Optimal for quickly understanding video content without watching the entire video. Parameters: videoId (required) - The YouTube video ID; language (optional) - Language code for transcript (e.g., "en", "ko"); summaryLength (optional) - Level of detail in summary ("short", "medium", or "detailed", default: "medium"); includeKeywords (optional) - Whether to extract key topics (set to "true" to enable).

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇