yutu

平台与服务

by eat-pray-ai

面向 YouTube 的完整 MCP 服务器与 CLI,支持常用功能调用,便于在命令行和智能体中集成。

面向 YouTube 的完整 MCP 服务器与 CLI,把常用能力直接带进命令行和智能体,做内容集成与自动化特别顺手。

什么是 yutu

面向 YouTube 的完整 MCP 服务器与 CLI,支持常用功能调用,便于在命令行和智能体中集成。

README

Yutu

yutu

Static Badge Go Report Card GitHub License Go Reference Go Coverage

GitHub Repo stars GitHub Downloads GitHub Actions build Status GitHub Actions CodeQL Status GitHub Actions test Status LINUX DO

GitHub Release Homebrew Formula Version WinGet Package Version npm Version

YouTube CLI, MCP server, Skill and Agent - AI-powered toolkit that grows YouTube channel on autopilot | Product
Hunt

yutu is a CLI, MCP server, and AI agent for YouTube that automates your entire YouTube workflow — from uploading and optimizing videos to managing comments, playlists, and channel branding — so you can get more views, higher click-through rates, and stronger audience engagement with less manual effort. 中文文档

mcp demo

Table of Contents

Prerequisites

An account on Google Cloud Platform is required. Set up the following:

  1. Create a GCP Project and enable these APIs under APIs & Services -> Enable APIs and services:

  2. Create OAuth credentials:

    • Go to APIs & Services -> OAuth consent screen, create a consent screen with yourself as a test user
    • Go to Credentials -> Create Credentials -> OAuth Client ID, select Desktop app
    • Download the credential file and save it as client_secret.json, it should look like
    json
    {
      "installed": {
        "client_id": "11181119.apps.googleusercontent.com",
        "project_id": "yutu-11181119",
        "auth_uri": "https://accounts.google.com/o/oauth2/auth",
        "token_uri": "https://oauth2.googleapis.com/token",
        "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
        "client_secret": "XXXXXXXXXXXXXXXX",
        "redirect_uris": [
          "http://localhost"
        ]
      }
    }
    
  3. Authenticate:

    bash
    yutu auth --credential client_secret.json
    

    A browser window will open for you to grant YouTube access. After granting permission, a token is saved to youtube.token.json.

    json
    {
      "access_token": "ya29.XXXXXXXXX",
      "token_type": "Bearer",
      "refresh_token": "1//XXXXXXXXXX",
      "expiry": "2024-05-26T18:49:56.1911165+08:00",
      "expires_in": 3599
    }
    

By default, yutu will read client_secret.json and youtube.token.json from the current directory, --credential/-c and --cacheToken/-t flags are available only in auth subcommand. To modify the default path in all subcommands, set these environment variables.

Global Environment Variables

VariableDescriptionDefault
YUTU_CREDENTIALPath, base64, or JSON of OAuth client secretclient_secret.json
YUTU_CACHE_TOKENPath, base64, or JSON of cached OAuth tokenyoutube.token.json
YUTU_ROOTRoot directory for file resolutionCurrent working directory
YUTU_LOG_LEVELLog level: DEBUG, INFO, WARN, ERRORINFO

Installation

You can download yutu from releases page directly, or use the following methods as you prefer.

GitHub Actions

There are two actions available for yutu, one is for general purpose and the other is for uploading video to YouTube. Refer to youtube-action and youtube-uploader for more information.

Node.js

shell
❯ npm i -g @eat-pray-ai/yutu

Docker

shell
❯ docker pull ghcr.io/eat-pray-ai/yutu:latest
❯ docker run --rm ghcr.io/eat-pray-ai/yutu:latest
# make sure client_secret.json is in the current directory
❯ docker run --rm -it -u $(id -u):$(id -g) -v $(pwd):/app -p 8216:8216 ghcr.io/eat-pray-ai/yutu:latest

Gopher

shell
❯ go install github.com/eat-pray-ai/yutu@latest

Linux

shell
❯ curl -sSfL https://raw.githubusercontent.com/eat-pray-ai/yutu/main/scripts/install.sh | bash

macOS

Install yutu using Homebrew🍺(recommended), or run the shell script.

shell
❯ brew install yutu

# or
❯ curl -sSfL https://raw.githubusercontent.com/eat-pray-ai/yutu/main/scripts/install.sh | bash

Windows

shell
❯ winget install yutu

Verifying Installation

Verify the integrity and provenance of yutu using its associated cryptographically signed attestations.

shell
# Docker
❯ gh attestation verify oci://ghcr.io/eat-pray-ai/yutu:latest --repo eat-pray-ai/yutu

# Linux and macOS(if installed using shell script)
❯ gh attestation verify $(which yutu) --repo eat-pray-ai/yutu

# Windows
❯ gh attestation verify $(where.exe yutu.exe) --repo eat-pray-ai/yutu

Agent

yutu provides an agent mode to automate YouTube workflows. The system uses a multi-agent architecture where a central orchestrator delegates tasks to specialized agents:

AgentRoleCapabilities
OrchestratorCoordinates the entire workflow, plans strategy, and delegates to sub-agentsYouTube growth strategy, SEO optimization, task routing
RetrievalGathers data from YouTube and the web (read-only)List/search videos, channels, playlists, comments, captions, subscriptions, members, and more; Google Search
ModifierCreates and updates YouTube contentUpload videos, create playlists, update metadata, post comments, set thumbnails, manage captions and watermarks
DestroyerHandles destructive operations with extra cautionDelete videos, playlists, comments, captions, subscriptions, channel sections, and watermarks

Currently, the agent mode is under active development, only supports Google's Gemini models with the following environment variables set:

shell
❯ export YUTU_ADVANCED_MODEL=google:gemini-3.1-pro-preview
❯ export YUTU_LITE_MODEL=google:gemini-3-flash-preview
❯ export YUTU_LLM_API_KEY=your_gemini_api_key
// Optional settings
❯ export GOOGLE_GEMINI_BASE_URL=https://generativelanguage.googleapis.com/
❯ export YUTU_AGENT_INSTRUCTION=Your custom instruction here

YUTU_ADVANCED_MODEL is used by the orchestrator agent, while YUTU_LITE_MODEL is used by all other agents. Both use the provider:modelName format (only google is supported). If only one is set, the other defaults to the same value.

Agent Environment Variables

VariableDescriptionRequired
YUTU_ADVANCED_MODELModel for orchestrator agent (format: provider:modelName)At least one of YUTU_ADVANCED_MODEL or YUTU_LITE_MODEL
YUTU_LITE_MODELModel for sub-agents (format: provider:modelName)At least one of YUTU_ADVANCED_MODEL or YUTU_LITE_MODEL
YUTU_LLM_API_KEYAPI key for the model providerYes
GOOGLE_GEMINI_BASE_URLBase URL for Gemini APINo
YUTU_AGENT_INSTRUCTIONCustom instruction for orchestrator agentNo
YUTU_RETRIEVAL_INSTRUCTIONCustom instruction for retrieval agentNo
YUTU_MODIFIER_INSTRUCTIONCustom instruction for modifier agentNo
YUTU_DESTROYER_INSTRUCTIONCustom instruction for destroyer agentNo

Then run the following command for detail usage:

code
❯ yutu agent --help
❯ yutu agent --args "help"
# console mode
❯ yutu agent --args "console"
# web mode with three sub-launchers: api, a2a and webui
❯ yutu agent --args "web api a2a webui"

MCP Server

Install in VS Code Install in Cursor

As a MCP server, yutu can be used in MCP clients like Claude Desktop, VS Code or Cursor, which allows you to interact with YouTube resources in a chat-like interface.

Before using yutu as an MCP server, make sure yutu is installed(see Installation section), and you have a valid client_secret.json and youtube.token.json files(refer to Prerequisites section).

You can add yutu as a MCP server in VS Code or Cursor by clicking corresponding badge above, or add the following configuration manually to your MCP client. Remember to replace the values of YUTU_CREDENTIAL and YUTU_CACHE_TOKEN with correct paths on your local machine.

json
{
  "yutu": {
    "type": "stdio",
    "command": "yutu",
    "args": [
      "mcp"
    ],
    "env": {
      "YUTU_CREDENTIAL": "/absolute/path/to/client_secret.json",
      "YUTU_CACHE_TOKEN": "/absolute/path/to/youtube.token.json"
    }
  }
}

Skills

yutu provides a unified skill that extends AI agents with YouTube domain knowledge, common workflows, and SEO best practices — covering videos, playlists, comments, channels, captions, subscriptions, and more.

shell
❯ npx skills add https://github.com/eat-pray-ai/yutu/tree/main/skills/youtube

See skills/youtube/SKILL.md for the full list of supported operations.

Usage

shell
❯ yutu        
yutu is a fully functional MCP server and CLI for YouTube, which can manipulate almost all YouTube resources.

Environment variables:
  YUTU_CREDENTIAL    Path/base64/JSON of OAuth client secret (default: client_secret.json)
  YUTU_CACHE_TOKEN   Path/base64/JSON of cached OAuth token (default: youtube.token.json)
  YUTU_ROOT          Root directory for file resolution (default: current working directory)
  YUTU_LOG_LEVEL     Log level: DEBUG, INFO, WARN, ERROR (default: INFO)

Usage:
  yutu [flags]
  yutu [command]

Available Commands:
  activity               Manage activities on YouTube
  agent                  Start an agent to automate YouTube workflows
  auth                   Authenticate with YouTube APIs
  caption                Manage YouTube video captions
  channel                Manage YouTube channels
  channelBanner          Manage YouTube channel banners
  channelSection         Manage YouTube channel sections
  comment                Manage YouTube comments
  commentThread          Manage YouTube comment threads
  completion             Generate the autocompletion script for the specified shell
  help                   Help about any command
  i18nLanguage           Manage YouTube i18n languages
  i18nRegion             Manage YouTube i18n regions
  mcp                    Start MCP server
  member                 Manage YouTube channel members
  membershipsLevel       Manage YouTube memberships levels
  playlist               Manage YouTube playlists
  playlistImage          Manage YouTube playlist images
  playlistItem           Manage YouTube playlist items
  search                 Manage YouTube search
  subscription           Manage YouTube subscriptions
  superChatEvent         Manage YouTube Super Chat events
  thumbnail              Manage YouTube video thumbnails
  version                Show the version of yutu
  video                  Manage YouTube videos
  videoAbuseReportReason Manage YouTube video abuse report reasons
  videoCategory          Manage YouTube video categories
  watermark              Manage YouTube watermarks

Flags:
  -h, --help   help for yutu

Use "yutu [command] --help" for more information about a command.

Features

Please refer to FEATURES.md for more information.

Contributing

Please refer to CONTRIBUTING.md for more information.

Star History

Star History Chart

常见问题

yutu 是什么?

面向 YouTube 的完整 MCP 服务器与 CLI,支持常用功能调用,便于在命令行和智能体中集成。

相关 Skills

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描137.2k

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描137.2k

接口测试套件

by alirezarezvani

Universal
热门

扫描 Next.js、Express、FastAPI、Django REST 的 API 路由,自动生成覆盖鉴权、参数校验、错误码、分页、上传与限流场景的 Vitest 或 Pytest 测试套件。

帮你把API与集成测试自动化跑顺,减少回归漏测;能力全面,尤其适合复杂接口场景的QA团队。

平台与服务
未扫描15.4k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
85.9k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.9k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
51.1k

评论