View as Markdown

YouTube Integration

Search and access YouTube videos and channels

The YouTube integration provides access to search and access YouTube videos and channels through the Integrate MCP server.

Installation

The YouTube integration is included with the SDK:

import { youtubeIntegration } from "integrate-sdk/server";

Setup

1. Create a YouTube OAuth App

  1. Go to Google Cloud Console
  2. Create a new OAuth application
  3. Configure your redirect URI
  4. Note your Client ID and Client Secret

2. Configure the Integration on Your Server

Add the YouTube integration to your server configuration. The integration automatically reads YOUTUBE_CLIENT_ID and YOUTUBE_CLIENT_SECRET from your environment variables:

import { createMCPServer, youtubeIntegration } from "integrate-sdk/server";
 
export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [
    youtubeIntegration({
    }),
  ],
});

You can override the environment variables by passing explicit values:

youtubeIntegration({
  clientId: process.env.CUSTOM_YOUTUBE_ID,
  clientSecret: process.env.CUSTOM_YOUTUBE_SECRET,
});

3. Client-Side Usage

The default client automatically includes all integrations. You can use it directly:

import { client } from "integrate-sdk";
 
await client.authorize("youtube");
const result = await client.youtube.search({
  query: "value",
});
 
console.log(result);

If you're using a custom client, add the integration to the integrations array:

import { createMCPClient, youtubeIntegration } from "integrate-sdk";
 
const customClient = createMCPClient({
  integrations: [youtubeIntegration()],
});

Configuration Options

export interface YouTubeIntegrationConfig {
  /** YouTube OAuth client ID (defaults to YOUTUBE_CLIENT_ID env var) */
  clientId?: string;

Tools

youtube_add_comment

Post a new top-level comment on a video

export interface YoutubeAddCommentParams {
    /** Video ID to comment on */
    video_id: string;

youtube_add_to_playlist

Add a video to a playlist

export interface YoutubeAddToPlaylistParams {
    /** Playlist ID */
    playlist_id: string;

youtube_create_playlist

Create a new playlist

export interface YoutubeCreatePlaylistParams {
    /** Playlist title */
    title: string;

youtube_delete_playlist

Permanently delete a playlist

export interface YoutubeDeletePlaylistParams {
    /** Playlist ID */
    playlist_id: string;

youtube_get_captions

List available caption tracks for a video

export interface YoutubeGetCaptionsParams {
    /** Video ID */
    video_id: string;

youtube_get_channel

Get details for any channel by ID

export interface YoutubeGetChannelParams {
    /** Channel ID (e.g. UCxxxxxx) */
    channel_id: string;

youtube_get_my_channel

Get the authenticated user's own channel

No parameters.

youtube_get_playlist

Get details for a specific playlist

export interface YoutubeGetPlaylistParams {
    /** Playlist ID (e.g. PLxxxxxx) */
    playlist_id: string;

youtube_get_video

Get full details for a specific video

export interface YoutubeGetVideoParams {
    /** YouTube video ID */
    video_id: string;

youtube_get_video_rating

Get the authenticated user's rating for one or more videos

export interface YoutubeGetVideoRatingParams {
    /** Video ID, or comma-separated list (max 50) */
    video_id: string;

youtube_list_comment_replies

List replies to a specific comment thread

export interface YoutubeListCommentRepliesParams {
    /** Comment thread ID (the id from listComments) */
    comment_thread_id: string;

youtube_list_comments

List top-level comment threads on a video

export interface YoutubeListCommentsParams {
    /** Video ID */
    video_id: string;

youtube_list_my_videos

List videos uploaded by the authenticated user

export interface YoutubeListMyVideosParams {
    /** 1–50 (default: 10) */
    max_results?: number;

youtube_list_playlist_items

List videos in a playlist

export interface YoutubeListPlaylistItemsParams {
    /** Playlist ID */
    playlist_id: string;

youtube_list_playlists

List playlists for the authenticated user or a specific channel

export interface YoutubeListPlaylistsParams {
    /** Channel ID, or omit for authenticated user's playlists */
    channel_id?: string;

youtube_list_subscriptions

List channels the authenticated user is subscribed to

export interface YoutubeListSubscriptionsParams {
    /** Default: 5 */
    max_results?: number;

youtube_rate_video

Like, dislike, or remove a rating from a video

export interface YoutubeRateVideoParams {
    /** Video ID */
    video_id: string;

youtube_remove_from_playlist

Remove an item from a playlist

export interface YoutubeRemoveFromPlaylistParams {
    /** Playlist item ID (the id field from listPlaylistItems) */
    playlist_item_id: string;

youtube_reply_to_comment

Reply to an existing comment thread

export interface YoutubeReplyToCommentParams {
    /** Comment thread ID (the id from listComments) */
    comment_thread_id: string;

Search for videos, channels, or playlists

export interface YoutubeSearchParams {
    /** Search query text */
    query: string;

youtube_subscribe

Subscribe to a channel

export interface YoutubeSubscribeParams {
    /** Channel ID to subscribe to */
    channel_id: string;

youtube_unsubscribe

Unsubscribe from a channel

export interface YoutubeUnsubscribeParams {
    /** Subscription ID (the id field from listSubscriptions) */
    subscription_id: string;

youtube_update_playlist

Update a playlist's metadata

export interface YoutubeUpdatePlaylistParams {
    /** Playlist ID */
    playlist_id: string;

youtube_update_video

Update a video's metadata

export interface YoutubeUpdateVideoParams {
    /** Video ID (must be owned by authenticated user) */
    video_id: string;

Notes

  • Category: Entertainment
  • Authentication mode: OAuth