Skip to main content
Glama

YouTube MCP Server

npm version npm downloads npm total downloads

Eine Model Context Protocol (MCP)-Serverimplementierung für YouTube, die es KI-Sprachmodellen ermöglicht, über eine standardisierte Schnittstelle mit YouTube-Inhalten zu interagieren.

Website: zubeidhendricks.github.io/youtube-mcp-server

Verfügbare Tools

Der Server stellt derzeit 10 MCP-Tools bereit.

Tool

Beschreibung

Erforderliche Parameter

Optionale Parameter

videos_getVideo

Detaillierte Informationen zu einem YouTube-Video abrufen

videoId

parts

videos_searchVideos

Auf YouTube nach Videos suchen

query

maxResults, order, publishedAfter, publishedBefore, channelId, uniqueChannels, channelMinSubscribers, channelMaxSubscribers, channelLastUploadAfter, channelLastUploadBefore, creatorOnly, sortBy

transcripts_getTranscript

Das Transkript eines YouTube-Videos abrufen

videoId

language

channels_getChannel

Informationen zu einem YouTube-Kanal abrufen

channelId

Keine

channels_getChannels

Informationen zu mehreren YouTube-Kanälen abrufen

channelIds

parts, includeLatestUpload

channels_searchChannels

YouTube-Kanäle nach Handle, Name oder Suchbegriff durchsuchen

query

maxResults, order, channelType, minSubscribers, maxSubscribers, lastUploadAfter, lastUploadBefore, creatorOnly, sortBy

channels_findCreators

Creator-Kanäle anhand von Video-Erwähnungen mit Filtern für Kanalgröße und Aktivität finden

query

maxResults, order, videoPublishedAfter, videoPublishedBefore, channelMinSubscribers, channelMaxSubscribers, channelLastUploadAfter, channelLastUploadBefore, creatorOnly, sortBy, sampleVideosPerChannel

channels_listVideos

Videos von einem bestimmten Kanal abrufen

channelId

maxResults

playlists_getPlaylist

Informationen zu einer YouTube-Playlist abrufen

playlistId

Keine

playlists_getPlaylistItems

Videos in einer YouTube-Playlist abrufen

playlistId

maxResults

Tool-Parameter

videos_getVideo

  • videoId (string): Die YouTube-Video-ID.

  • parts (string[], optional): Bestimmte Teile der Video-Ressource, die abgerufen werden sollen.

videos_searchVideos

  • query (string): Suchabfrage.

  • maxResults (number, optional): Maximale Anzahl der zurückzugebenden Ergebnisse.

  • order (string, optional): Sortierung der Ergebnisse, z. B. relevance oder date.

  • publishedAfter (string, optional): Nur Videos einbeziehen, die nach diesem ISO-8601-Datum veröffentlicht wurden.

  • publishedBefore (string, optional): Nur Videos einbeziehen, die vor diesem ISO-8601-Datum veröffentlicht wurden.

  • channelId (string, optional): Ergebnisse auf einen bestimmten Kanal beschränken.

  • uniqueChannels (boolean, optional): Pro eindeutigem Kanal nur ein Video zurückgeben.

  • channelMinSubscribers / channelMaxSubscribers (number, optional): Übereinstimmende Videos nach dem Abonnentenbereich ihres Kanals filtern.

  • channelLastUploadAfter / channelLastUploadBefore (string, optional): Übereinstimmende Videos nach der letzten Upload-Aktivität ihres Kanals filtern.

  • creatorOnly (boolean, optional): Ergebnisse auf Kanäle beschränken, die heuristisch als Creator eingestuft werden.

  • sortBy (string, optional): Unterstützt relevance, subscribers_asc, subscribers_desc, indie_priority und recent_activity.

transcripts_getTranscript

  • videoId (string): Die YouTube-Video-ID.

  • language (string, optional): Sprachcode des Transkripts. Fällt auf YOUTUBE_TRANSCRIPT_LANG oder en zurück.

channels_getChannel

  • channelId (string): Die YouTube-Kanal-ID.

Die Antworten enthalten jetzt:

  • latestVideoPublishedAt

  • normalizedMetadata

    • enthält country, defaultLanguage, joinedAt, customUrl, emailsFound, contactLinks sowie heuristische Felder zur Unterscheidung von Creator und Marke

channels_getChannels

  • channelIds (string[]): Eine Liste von YouTube-Kanal-IDs.

  • includeLatestUpload (boolean, optional): Gibt an, ob latestVideoPublishedAt enthalten sein soll. Standardmäßig true.

channels_searchChannels

  • query (string): Kanal-Suchabfrage oder Handle.

  • maxResults (number, optional): Maximale Anzahl der zurückzugebenden Kanäle.

  • order (string, optional): Sortierung der Ergebnisse, z. B. relevance.

  • channelType (string, optional): Die Suche auf einen Kanaltyp beschränken.

  • minSubscribers / maxSubscribers (number, optional): Kanäle nach Abonnentenbereich filtern.

  • lastUploadAfter / lastUploadBefore (string, optional): Kanäle nach der letzten Upload-Aktivität filtern.

  • creatorOnly (boolean, optional): Ergebnisse auf Kanäle beschränken, die heuristisch als Creator eingestuft werden.

  • sortBy (string, optional): Unterstützt relevance, subscribers_asc, subscribers_desc, indie_priority und recent_activity.

channels_findCreators

  • query (string): Themen-, Spiel- oder Erwähnungsabfrage, um Kanäle anhand übereinstimmender Videos zu entdecken.

  • videoPublishedAfter / videoPublishedBefore (string, optional): Aktualitätsfilter für die übereinstimmenden Videos.

  • channelMinSubscribers / channelMaxSubscribers (number, optional): Filter für den Abonnentenbereich der zurückgegebenen Kanäle.

  • channelLastUploadAfter / channelLastUploadBefore (string, optional): Filter für die letzte Upload-Aktivität der zurückgegebenen Kanäle.

  • creatorOnly (boolean, optional): Ergebnisse auf Kanäle beschränken, die heuristisch als Creator eingestuft werden.

  • sortBy (string, optional): Unterstützt relevance, subscribers_asc, subscribers_desc, indie_priority und recent_activity.

  • sampleVideosPerChannel (number, optional): Wie viele übereinstimmende Videos pro zurückgegebenem Kanal enthalten sein sollen.

channels_listVideos

  • channelId (string): Die YouTube-Kanal-ID.

  • maxResults (number, optional): Maximale Anzahl der zurückzugebenden Videos.

playlists_getPlaylist

  • playlistId (string): Die YouTube-Playlist-ID.

playlists_getPlaylistItems

  • playlistId (string): Die YouTube-Playlist-ID.

  • maxResults (number, optional): Maximale Anzahl der zurückzugebenden Playlist-Elemente.

Related MCP server: mcp-server-youtube

Installation

Schnelle Einrichtung für Claude Desktop

  1. Installieren Sie das Paket:

npm install -g zubeid-youtube-mcp-server
  1. Fügen Sie es Ihrer Claude-Desktop-Konfiguration hinzu (~/Library/Application Support/Claude/claude_desktop_config.json unter macOS oder %APPDATA%\Claude\claude_desktop_config.json unter Windows):

{
  "mcpServers": {
    "zubeid-youtube-mcp-server": {
      "command": "zubeid-youtube-mcp-server",
      "env": {
        "YOUTUBE_API_KEY": "your_primary_youtube_api_key",
        "YOUTUBE_API_KEY2": "your_secondary_youtube_api_key",
        "YOUTUBE_API_KEY3": "your_tertiary_youtube_api_key"
      }
    }
  }
}

Alternative: Verwendung von NPX (keine Installation erforderlich)

Fügen Sie dies Ihrer Claude-Desktop-Konfiguration hinzu:

{
  "mcpServers": {
    "youtube": {
      "command": "npx",
      "args": ["-y", "zubeid-youtube-mcp-server"],
      "env": {
        "YOUTUBE_API_KEY": "your_primary_youtube_api_key",
        "YOUTUBE_API_KEY2": "your_secondary_youtube_api_key",
        "YOUTUBE_API_KEY3": "your_tertiary_youtube_api_key"
      }
    }
  }
}

Installation über Smithery

Um den YouTube-MCP-Server automatisch über Smithery für Claude Desktop zu installieren:

npx -y @smithery/cli install @ZubeidHendricks/youtube --client claude

Konfiguration

Legen Sie die folgenden Umgebungsvariablen fest:

  • YOUTUBE_API_KEY: Primärer YouTube-Data-API-Schlüssel

  • YOUTUBE_API_KEY2: Sekundärer Fallback-API-Schlüssel

  • YOUTUBE_API_KEY3: Dritter Fallback-API-Schlüssel

  • YOUTUBE_TRANSCRIPT_LANG: Standardsprache für Transkripte (optional, Standard ist 'en')

Mindestens einer der Schlüssel YOUTUBE_API_KEY, YOUTUBE_API_KEY2 oder YOUTUBE_API_KEY3 muss gesetzt sein. Wenn eine Anfrage fehlschlägt, weil ein Schlüssel sein Kontingent ausgeschöpft hat, wiederholt der Server dieselbe Anfrage mit dem nächsten konfigurierten Schlüssel.

Verwendung mit VS Code

Für die Ein-Klick-Installation klicken Sie auf einen der Installations-Buttons unten:

Install with NPX in VS Code Install with NPX in VS Code Insiders

Manuelle Installation

Wenn Sie eine manuelle Installation bevorzugen, prüfen Sie zuerst die Installations-Buttons am Anfang dieses Abschnitts. Andernfalls gehen Sie wie folgt vor:

Fügen Sie den folgenden JSON-Block zu Ihrer Datei „User Settings (JSON)“ in VS Code hinzu. Drücken Sie dazu Ctrl + Shift + P und geben Sie Preferences: Open User Settings (JSON) ein.

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "apiKey",
        "description": "YouTube API Key",
        "password": true
      }
    ],
    "servers": {
      "youtube": {
        "command": "npx",
        "args": ["-y", "zubeid-youtube-mcp-server"],
        "env": {
          "YOUTUBE_API_KEY": "${input:apiKey}"
        }
      }
    }
  }
}

Optional können Sie ihn zu einer Datei namens .vscode/mcp.json in Ihrem Arbeitsbereich hinzufügen:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "apiKey",
      "description": "YouTube API Key",
      "password": true
    }
  ],
  "servers": {
    "youtube": {
      "command": "npx",
      "args": ["-y", "zubeid-youtube-mcp-server"],
      "env": {
        "YOUTUBE_API_KEY": "${input:apiKey}"
      }
    }
  }
}

Entwicklung

# Install dependencies
npm install

# Build
npm run build

# Start the server (requires at least one configured YouTube API key)
npm start

# Development mode with auto-rebuild
npm run dev

Docker

Das enthaltene Docker-Image startet den Server standardmäßig über HTTP.

  • Standardtransport: http

  • Standard-Endpunkt: http://localhost:8088/mcp

  • Readiness-Endpunkt: http://localhost:8088/ready

  • Standardmodus: zustandslos

Der Docker-Build kopiert .env in das Laufzeit-Image und der Server lädt es beim Start automatisch. Das bedeutet, dass der Container ohne Übergabe von API-Anmeldedaten bei docker run ausgeführt werden kann, solange .env während des docker build vorhanden war.

docker build -t youtube-mcp-server .
docker run --rm -p 8088:8088 youtube-mcp-server

Der Container verwendet standardmäßig:

MCP_TRANSPORT=http
MCP_HOST=0.0.0.0
MCP_PORT=8088
MCP_STATELESS=true

Mitwirken

Informationen zum Beitragen zu diesem Repository findest du in CONTRIBUTING.md.

Lizenz

Dieses Projekt ist unter der MIT-Lizenz lizenziert - siehe die Datei LICENSE für Details.

Available Tools

10 tools
channels_findCreatorsB

Find creator channels from video mentions with subscriber band and recent activity filters in one call

Inputs: query (required), order, sortBy, maxResults, +8 more.

channels_getChannelC

Get information about a YouTube channel

Inputs: channelId (required).

channels_getChannelsC

Get information about multiple YouTube channels

Inputs: channelIds (required), parts, includeLatestUpload.

channels_listVideosC

Get videos from a specific channel

Inputs: channelId (required), maxResults.

channels_searchChannelsC

Search for YouTube channels by handle, name, or query

Inputs: query (required), order, sortBy, maxResults, +6 more.

playlists_getPlaylistC

Get information about a YouTube playlist

Inputs: playlistId (required).

playlists_getPlaylistItemsB

Get videos in a YouTube playlist

Inputs: playlistId (required), maxResults.

transcripts_getTranscriptC

Get the transcript of a YouTube video

Inputs: videoId (required), language.

videos_getVideoB

Get detailed information about a YouTube video

Inputs: videoId (required), parts.

videos_searchVideosC

Search for videos on YouTube

Inputs: query (required), order, sortBy, channelId, +9 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 10 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes: getVideo, searchVideos, getTranscript, getChannel, etc. However, channels_getChannels and channels_findCreators both retrieve multiple channels, which could cause confusion, though findCreators has specific filters. Overlap is limited and descriptions help differentiate.

    Naming Consistency5/5

    All tool names follow a consistent pattern of resource_category + verb_noun (e.g., videos_getVideo, playlists_getPlaylistItems, channels_getChannel). The pattern is predictable and uniform across all tools.

    Tool Count5/5

    With 10 tools, the set is well-scoped for YouTube interactions, covering core entities like videos, playlists, channels, and transcripts without excessive redundancy. Each tool appears to earn its place.

    Completeness4/5

    The surface covers key read operations for videos, playlists, channels, and transcripts. However, there is no tool for searching playlists or retrieving video comments, which could be considered gaps, but they are minor for most agent use cases.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers