Back to MCP Servers

Yutu

A fully functional MCP server and CLI for YouTube to automate YouTube operation

browser-automation
By eat-pray-ai
58166Updated 1 week agoGoApache-2.0

Installation

npx -y yutu

Configuration

{
  "mcpServers": {
    "yutu": {
      "command": "npx",
      "args": ["-y", "yutu"]
    }
  }
}

How to use

  1. Run the installation command above (if needed)
  2. Open your Claude Code settings file (~/.claude/settings.json)
  3. Add the configuration to the mcpServers section
  4. Restart Claude Code to apply changes

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
    {
      "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:

    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.

    {
      "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.

<details> <summary>GitHub Actions</summary>

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.

</details> <details> <summary>Node.js</summary>
❯ npm i -g @eat-pray-ai/yutu
</details> <details> <summary>Docker</summary>
❯ 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
</details> <details> <summary>Gopher</summary>
❯ go install github.com/eat-pray-ai/yutu@latest
</details> <details> <summary>Linux</summary>
❯ curl -sSfL https://raw.githubusercontent.com/eat-pray-ai/yutu/main/scripts/install.sh | bash
</details> <details> <summary>macOS</summary>

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

❯ brew install yutu

# or
❯ curl -sSfL https://raw.githubusercontent.com/eat-pray-ai/yutu/main/scripts/install.sh | bash
</details> <details> <summary>Windows</summary>
❯ winget install yutu
</details> <details> <summary>Verifying Installation</summary>

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

# 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
</details>

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:

❯ 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

View source on GitHub