YouTube Studio MCP Server
Provides tools for interacting with YouTube Studio, including retrieving channel statistics, fetching unanswered comments, and posting comment replies.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@YouTube Studio MCP ServerWhat are my channel stats and unanswered comments?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π Google Gemini AI + YouTube MCP + Ngrok Gateway Engine
A zero-cost, persistent YouTube Studio Automation Engine powered by Google Gemini 2.5 Flash, a YouTube Studio Model Context Protocol (MCP) Server over Server-Sent Events (SSE) or Stdio, and an Ngrok HTTPS Gateway.
π Key Features
π§ AI-Powered Channel Creator Assistant: Uses Google Gemini (
gemini-2.5-flashvia@google/genai) to evaluate comment sentiment, craft engaging responses, and retrieve channel analytics.π‘ Model Context Protocol (MCP) Server: Exposes YouTube Studio capabilities (
get_channel_stats,fetch_unanswered_comments,post_comment_reply) as standard MCP tools.π Ngrok Gateway: Programmatically establishes a secure public HTTPS tunnel to remote SSE/Webhook clients.
π OAuth2 Persistent Connectivity: Automatically refreshes Google YouTube Data API access tokens seamlessly.
β±οΈ Rate-Limit Resilience: Built-in exponential backoff retry logic handling HTTP 429 and rate-limiting gracefully.
π Flexible Transports: Supports both Embedded Express SSE Mode out-of-the-box and External GitHub MCP Servers (via
stdio).
Related MCP server: YouTube Browser Control
π Architecture
graph TD
A[Google Gemini API] <-->|Tool Declarations & Function Calls| B[Gemini Agent Orchestrator]
B <-->|MCP Client Transport| C[Ngrok Gateway / HTTPS Tunnel]
C <-->|SSE Transport /sse & /message| D[Express YouTube MCP Server]
D <-->|OAuth2 Token Refresh & API Calls| E[YouTube Data API v3]π οΈ Step-by-Step Prerequisites & Setup
1. Google Cloud OAuth2 Credentials
Go to the Google Cloud Console.
Create a new project or select an existing one.
Enable the YouTube Data API v3.
Go to APIs & Services > Credentials.
Click Create Credentials -> OAuth client ID.
Select Web application.
Under Authorized redirect URIs, add
http://localhost:3000/oauth2callback.Copy your Client ID and Client Secret.
2. Obtain YouTube OAuth Refresh Token
Run the included token setup wizard CLI to obtain your YOUTUBE_REFRESH_TOKEN:
Copy
.env.exampleto.envand fill in yourYOUTUBE_CLIENT_IDandYOUTUBE_CLIENT_SECRET:cp .env.example .envLaunch the OAuth helper wizard:
npm run auth-helperOpen the generated authorization link in your browser, log in with your YouTube account, and accept the permissions.
The wizard will automatically output your
YOUTUBE_REFRESH_TOKEN. Copy and paste it into.env.
3. Google Gemini API Key
Obtain a free API Key from Google AI Studio.
Add it to your
.envfile asGEMINI_API_KEY.
4. Ngrok Setup (Optional but Recommended)
Sign up for a free account at ngrok.com.
Copy your Auth Token from your Ngrok dashboard.
Set
NGROK_AUTHTOKENin your.envfile.
βοΈ Environment Configuration (.env)
# Google Gemini API Key
GEMINI_API_KEY=your_gemini_api_key_here
# YouTube Data API v3 OAuth2 Credentials
YOUTUBE_CLIENT_ID=your_youtube_client_id_here
YOUTUBE_CLIENT_SECRET=your_youtube_client_secret_here
YOUTUBE_REFRESH_TOKEN=your_youtube_refresh_token_here
# Ngrok Auth Token
NGROK_AUTHTOKEN=your_ngrok_authtoken_here
# Server Configuration
PORT=3000
# MCP Connection Mode: "sse" (built-in express server) or "stdio" (external github mcp binary)
MCP_MODE=sse
# External GitHub MCP command configuration (only used if MCP_MODE=stdio)
EXTERNAL_MCP_COMMAND=npx
EXTERNAL_MCP_ARGS=-y,@pauling-ai/youtube-mcp-serverπ Running the Engine
Installation
npm installDevelopment Mode
npm run devProduction Build & Launch
npm run build
npm startπ Connecting External GitHub YouTube MCP Servers
If you want to use an external GitHub MCP Server (such as pauling-ai/youtube-mcp-server or a Python MCP binary):
Set
MCP_MODE=stdioin your.env.Configure
EXTERNAL_MCP_COMMANDandEXTERNAL_MCP_ARGSto point to the executable:For Node/NPM package:
EXTERNAL_MCP_COMMAND=npx EXTERNAL_MCP_ARGS=-y,@pauling-ai/youtube-mcp-serverFor Python MCP server:
EXTERNAL_MCP_COMMAND=python EXTERNAL_MCP_ARGS=path/to/server.py
Run
npm run devto connect the Gemini Agent to the external MCP server process automatically.
π License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceProduction-grade Model Context Protocol server for YouTube intelligence. Extract, analyze, and automate insights from YouTube channels and videos using the official YouTube Data API v3. Built for AI agents, automation pipelines, and content intelligence workflows.Last updated161MIT
- Flicense-qualityDmaintenanceAn MCP server for YouTube automation using Playwright and Gemini AI agent. Enables browser control for YouTube operations like searching, playing videos, skipping ads, and managing playback through natural language commands.Last updated
- AlicenseAqualityBmaintenanceMCP server for YouTube creator-ops β video metadata, comments, playlists, channel analytics, plus a ComfyUI bridge for AI thumbnail generation.Last updated1555MIT
- AlicenseAqualityCmaintenanceA local stdio MCP server that gives Claude (or any MCP client) full programmatic control over a single YouTube channel, including video upload, channel management, comments, analytics, and more.Last updated4626MIT
Related MCP Connectors
YouTube MCP β wraps the YouTube Data API v3 (BYO API key)
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoβ¦
Provide token-optimized, structured YouTube data to enhance your LLM applications. Access efficienβ¦
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/IamSRC12/youtube-studio-gemini-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server