KosmoKrator

data

YouTube MCP Integration for OpenAI Agents SDK

Connect YouTube to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.

7 functions 7 read 0 write API key auth

Connect YouTube to OpenAI Agents SDK

Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.

Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with --write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.

YouTube MCP Config for OpenAI Agents SDK

Use headless JSON commands for CI-style execution and MCP for agent tool discovery.

{
  "mcpServers": {
    "kosmokrator-youtube": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=youtube",
        "--write=deny"
      ]
    }
  }
}

Run the Gateway Manually

kosmokrator mcp:serve --integration=youtube --write=deny

Why Use KosmoKrator Here

Scoped tools

Expose only YouTube instead of a broad multi-service tool list.

Local credentials

Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.

Write policy

Start read-only, then opt into ask or allow for trusted workspaces.

YouTube Tools Visible to OpenAI Agents

OpenAI Agents sees stable MCP tool names generated from the YouTube integration catalog.

MCP toolSource functionTypeDescription
integration__youtube__youtube_search_videos youtube.youtube_search_videos Read Search for videos, channels, or playlists on YouTube using keywords, filters, and sorting options. Returns matching results with snippet metadata.
integration__youtube__youtube_get_video_details youtube.youtube_get_video_details Read Get detailed information about one or more YouTube videos by ID, including title, description, thumbnails, duration, view count, likes, and channel info.
integration__youtube__youtube_list_channels youtube.youtube_list_channels Read List YouTube channels by username, channel ID, or category. Returns channel snippets, statistics, and content details.
integration__youtube__youtube_get_channel youtube.youtube_get_channel Read Get detailed information about a specific YouTube channel by ID, including snippet, statistics (subscribers, views, videos), content details, and branding settings.
integration__youtube__youtube_list_playlists youtube.youtube_list_playlists Read List playlists for a YouTube channel or by playlist IDs. Returns playlist snippets and content details.
integration__youtube__youtube_get_playlist youtube.youtube_get_playlist Read Get details about a specific YouTube playlist by ID, including its metadata and up to 50 playlist items (videos).
integration__youtube__youtube_get_current_user youtube.youtube_get_current_user Read Get the authenticated user's YouTube channel information, including channel title, description, subscriber count, total views, and video count.

Related YouTube Pages