YouTube MCP server and CLI logo

YouTube MCP server and CLI

Community
umbertotancorre

MCP server and CLI tool that gives AI agents access to YouTube

Publisherumbertotancorre
Repositoryyoutube-mcp-cli
LanguageTypeScript
Forks
3
Stars
32
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

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

  • 0 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

    32 stars and 3 forks from the linked repository.

YouTube MCP server and CLI

npm mcp npm cli License: MIT Node

Zero Setup · No API Key · No Account · Open Source

YouTube is full of knowledge, but it is trapped there. AI agents cannot access it natively. This repo ships two packages that fix that: an MCP server for AI agents and a CLI for the terminal.

  • Fetch transcript (plain text or with timestamps)
  • Download transcript as .md
  • Get video metadata
  • Search within captions
  • Download video or audio

Available as:

All locally. No API keys required.


Table of Contents


MCP Server

Tools

ToolDescription
get_transcriptFetches the full transcript as plain text
get_transcript_timedTranscript with [MM:SS] timestamps per segment
download_transcriptSaves transcript as a .md file
download_transcript_timedSaves transcript as a .md file with timestamps
get_metadataReturns title, channel, publish date, view count, duration, likes, and description
search_transcriptSearches for a keyword or phrase and returns matching segments with timestamps
download_videoDownloads video+audio as .mp4
download_audioDownloads audio as .mp3 (or m4a, flac, opus, ...)

download_video and download_audio are fully self-contained. yt-dlp and ffmpeg are downloaded automatically on npm install.

Installation

Method A: let your AI do it

Tell your AI agent:

Add youtube-mcp as an MCP server. Run it with: npx @umbertotancorre/youtube-mcp

Method B: manual config

Add this to your MCP client config (e.g. claude_desktop_config.json):

json
{
  "mcpServers": {
    "youtube": {
      "command": "npx",
      "args": ["-y", "@umbertotancorre/youtube-mcp"]
    }
  }
}

All tools appear automatically. No install needed, npx handles it on first run.


CLI

Commands

youtube-cli transcript <url>                  Print transcript as plain text
youtube-cli transcript <url> --timestamps     Include [MM:SS] timestamps
youtube-cli transcript <url> --save           Save as .md to Downloads
youtube-cli transcript <url> --language it    Fetch in a specific language

youtube-cli search <url> <query>              Search transcript with timestamps
youtube-cli metadata <url>                    Print title, channel, views, duration
youtube-cli metadata <url> --json             Output as JSON

youtube-cli download <url>                    Download video to Downloads
youtube-cli download <url> --quality hd1080   Choose quality
youtube-cli download <url> --audio            Download audio only (mp3)
youtube-cli download <url> --audio --format flac

youtube-cli completions                       Print bash completion script
youtube-cli completions zsh                   Print zsh completion script

Downloads always go to the platform-native Downloads folder:

OSPath
macOS~/Downloads
Linux$XDG_DOWNLOAD_DIR or ~/Downloads
Windows%USERPROFILE%\Downloads

Installation

Global install (recommended):

bash
npm install -g @umbertotancorre/youtube-cli
youtube-cli --help

One-off use without installing:

bash
npx @umbertotancorre/youtube-cli transcript dQw4w9WgXcQ

Shell completions (optional):

bash
# bash
source <(youtube-cli completions)

# zsh
youtube-cli completions zsh > ~/.zsh/completions/_youtube-cli

Development

This is an npm workspaces monorepo with three packages:

youtube-mcp-cli/
  packages/
    core/     # shared logic (transcripts, metadata, downloads)
    mcp/      # MCP server (@umbertotancorre/youtube-mcp)
    cli/      # CLI tool     (@umbertotancorre/youtube-cli)
bash
npm run build        # build all packages (core, mcp, cli in order)
npm run dev:mcp      # build core, then run MCP server via ts-node
npm run dev:cli      # build core, then run CLI via ts-node

Disclaimer

This project only accesses publicly available YouTube data: the same captions, metadata, and streams visible in any browser. It does not bypass authentication, paywalls, or age gates. No API key, account, or login is required.

End users are responsible for complying with YouTube's Terms of Service. The maintainer does not host or operate any service. This is a local tool you run on your own machine.

License

youtube-mcp-cli is fully open source, licensed under the MIT License.

Installation

TypingMind
{
  "mcpServers": {
    "youtube-mcp-cli": {
      "command": "npx",
      "args": [
        "-y",
        "@umbertotancorre/youtube-mcp"
      ]
    }
  }
}

Use YouTube MCP server and CLI MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once YouTube MCP server and CLI is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to 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 MCP server and CLI 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 MCP server and CLI 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": {
    "youtube-mcp-cli": {
      "command": "npx",
      "args": [
        "-y",
        "youtube-mcp-cli"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the YouTube MCP server and CLI 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 MCP server and CLI 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 MCP server and CLI to help me with this task?
YouTube MCP server and CLI
Sure. I read it.
Here is what I found using YouTube MCP server and CLI.

Frequently asked questions

What is the YouTube MCP server and CLI MCP server used for?

YouTube MCP server and CLI 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 MCP server and CLI MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use YouTube MCP server and CLI 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 MCP server and CLI 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 MCP server and CLI connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect YouTube MCP server and CLI MCP to TypingMind?

YouTube MCP server and CLI runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does YouTube MCP server and CLI MCP provide in TypingMind?

YouTube MCP server and CLI exposes MCP capabilities 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 MCP server and CLI MCP?

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

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 👇