Skip to main content

MCP server retrieving transcripts of YouTube videos

Project description

YouTube Transcript MCP Server

Python Application GitHub License pre-commit Ruff Dockerhub

This MCP server retrieves transcripts for given YouTube video URLs.

YouTube Transcript Server MCP server

Tools

This MCP server provides the following tools:

get_transcript

Fetches the transcript of a specified YouTube video.

Parameters

  • url (string): The full URL of the YouTube video. This field is required.
  • lang (string, optional): The desired language for the transcript. Defaults to en if not specified.
  • next_cursor (string, optional): Cursor to retrieve the next page of the transcript.

get_timed_transcript

Fetches the transcript of a specified YouTube video with timestamps..

Parameters

  • url (string): The full URL of the YouTube video. This field is required.
  • lang (string, optional): The desired language for the transcript. Defaults to en if not specified.
  • next_cursor (string, optional): Cursor to retrieve the next page of the transcript.

get_video_info

Fetches the metadata of a specified YouTube video.

Parameters

  • url (string): The full URL of the YouTube video. This field is required.

Installation

[!NOTE] You'll need uv installed on your system to use uvx command.

For codename goose

Please refer to this tutorial for detailed installation instructions: YouTube Transcript Extension.

For Claude Desktop

Download the latest MCP bundle mcp-youtube-transcript.mcpb from the Releases page, then open the downloaded .mcpb file or drag it into the Claude Desktop's Settings window.

You can also manually configure this server for Claude Desktop. Edit the claude_desktop_config.json file by adding the following entry under mcpServers:

{
  "mcpServers": {
    "youtube-transcript": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/jkawamoto/mcp-youtube-transcript",
        "mcp-youtube-transcript"
      ]
    }
  }
}

After editing, restart the application. For more information, see: For Claude Desktop Users - Model Context Protocol.

For LM Studio

To configure this server for LM Studio, click the button below.

Add MCP Server youtube-transcript to LM Studio

Using Docker

A Docker image for this server is available on Docker Hub. Please refer to the Docker Hub page for detailed usage instructions and documentation.

Response Pagination

When retrieving transcripts for longer videos, the content may exceed the token size limits of the LLM. To avoid this issue, this server splits transcripts that exceed 50,000 characters. If a transcript is split, the response will include a next_cursor. To retrieve the next part, include this next_cursor value in your request.

The token size limits vary depending on the LLM and language you are using. If you need to split responses into smaller chunks, you can adjust this using the --response-limit command line argument. For example, the configuration below splits responses to contain no more than 15,000 characters each:

{
  "mcpServers": {
    "youtube-transcript": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/jkawamoto/mcp-youtube-transcript",
        "mcp-youtube-transcript",
        "--response-limit",
        "15000"
      ]
    }
  }
}

Using Proxy Servers

In environments where access to YouTube is restricted, you can use proxy servers.

When using Webshare, set the username and password for the Residential Proxy using either the environment variables WEBSHARE_PROXY_USERNAME and WEBSHARE_PROXY_PASSWORD, or the command line arguments --webshare-proxy-username and --webshare-proxy-password.

When using other proxy servers, set the proxy server URL using either the environment variables HTTP_PROXY or HTTPS_PROXY, or the command line arguments --http-proxy or --https-proxy.

For more details, please visit: Working around IP bans - YouTube Transcript API.

License

This application is licensed under the MIT License. See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_mcp_youtube_transcript-0.5.6.tar.gz (130.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_mcp_youtube_transcript-0.5.6.tar.gz.

File metadata

File hashes

Hashes for iflow_mcp_mcp_youtube_transcript-0.5.6.tar.gz
Algorithm Hash digest
SHA256 6947f3e568d18d1943e79ff9ab4992429d10607e465e47cb9be3a2ba683452b0
MD5 bec941dbf0d7382d021dc945020931fb
BLAKE2b-256 f604efb787372bc397613af00123d1dec85d0a0a972b0e6c7da91a21dcf25203

See more details on using hashes here.

File details

Details for the file iflow_mcp_mcp_youtube_transcript-0.5.6-py3-none-any.whl.

File metadata

File hashes

Hashes for iflow_mcp_mcp_youtube_transcript-0.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0870b2a79ad3ab11f461e80c5e39c47bcbb7ca49708d0c60c9438805e3dad859
MD5 b407c9caaa5ffe7121c39563105705c8
BLAKE2b-256 68965f9f24bb0082b97698463dad077d3d178f7d9d55b85c241bfc687e39af74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page