YouTube Shorts Agent
Agent-first YouTube Shorts uploader with dry-run validation, OAuth checks and synthetic-media metadata.
README
<!-- delx header v2 --> <h1 align="center">YouTube Shorts Agent</h1>
<div align="center"> <img src="assets/banner.png" alt="YouTube Shorts Agent" width="85%" /> </div>
<h3 align="center"> Agent-first YouTube Shorts uploader for the YouTube Data API.<br>Dry-run safe, OAuth readiness checks, MCP-ready for Codex / Claude / Cursor / Hermes. </h3>
<p align="center"> <a href="https://www.npmjs.com/package/youtube-shorts-agent"><img src="https://img.shields.io/npm/v/youtube-shorts-agent?style=for-the-badge&labelColor=0F172A&color=10B981&logo=npm&logoColor=white" alt="npm version" /></a> <a href="https://www.npmjs.com/package/youtube-shorts-agent"><img src="https://img.shields.io/npm/dm/youtube-shorts-agent?style=for-the-badge&labelColor=0F172A&color=0EA5A3&logo=npm&logoColor=white" alt="npm downloads" /></a> <a href="LICENSE"><img src="https://img.shields.io/badge/LICENSE-MIT-22C55E?style=for-the-badge&labelColor=0F172A" alt="License MIT" /></a> <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/BUILT_FOR-MCP-7C3AED?style=for-the-badge&labelColor=0F172A" alt="Built for MCP" /></a> </p>
<p align="center"> <a href="https://github.com/davidmosiah/youtube-shorts-agent/stargazers"><img src="https://img.shields.io/github/stars/davidmosiah/youtube-shorts-agent?style=for-the-badge&labelColor=0F172A&color=FBBF24&logo=github" alt="GitHub stars" /></a> <a href="https://github.com/davidmosiah/youtube-shorts-agent/actions/workflows/ci.yml"><img src="https://github.com/davidmosiah/youtube-shorts-agent/actions/workflows/ci.yml/badge.svg" alt="CI status" /></a> <a href="https://github.com/davidmosiah"><img src="https://img.shields.io/badge/PART_OF-Delx_Agent_Stack-0EA5A3?style=for-the-badge&labelColor=0F172A" alt="Part of the Delx agent stack" /></a> <a href="https://github.com/davidmosiah/youtube-shorts-agent"><img src="https://img.shields.io/badge/CATEGORY-Reach-FF0000?style=for-the-badge&labelColor=0F172A" alt="Category" /></a> </p>
⭐ If this agent-first tool helps your workflow, please star the repo. Stars make this tooling easier for other builders to discover and help Delx keep shipping open infrastructure.<br> 🧱 Part of the Delx agent stack — 15 open-source MCP servers across body, reach and coordination.
<!-- /delx header v2 -->
Agent-first YouTube Shorts uploader for the YouTube Data API. It is designed for Codex, Claude, Cursor, Hermes, OpenClaw and any MCP client that needs a predictable upload workflow with dry-run safety, OAuth readiness checks and structured output.
Use it when an agent needs to prepare, validate or upload Shorts through the official API without touching YouTube Studio UI.
What Agents Get
youtube_agent_manifestfor install/runtime guidanceyoutube_connection_statusbefore upload attemptsyoutube_privacy_auditfor local token and media boundariesyoutube_oauth_authorize_urlwith local PKCE session storageyoutube_upload_shortwithcontainsSyntheticMediasupportyoutube_list_recent_videosfor lightweight post-upload checks
Install
npm install -g youtube-shorts-agent
Or run directly:
npm exec --yes --package=youtube-shorts-agent -- youtube-shorts-agent doctor
CLI
youtube-shorts-agent manifest --client codex
youtube-shorts-agent doctor
youtube-shorts-agent privacy-audit
youtube-shorts-agent auth-url --redirect-uri http://localhost:8787/callback
youtube-shorts-agent upload-short --video ./short.mp4 --title "Launch title" --caption-file copy.txt
youtube-shorts-agent list-recent --max-results 10
Dry-run is enabled by default. Set YOUTUBE_DRY_RUN=false only when doctor reports a complete OAuth setup and you intend to call the live API.
First Upload (dry-run walkthrough)
This is the full first-run path. Every step here is dry-run safe — no credentials are required and nothing is sent to YouTube. The output below is captured verbatim from a real run.
1. Check readiness. With no OAuth configured, doctor confirms you are in dry-run mode:
youtube-shorts-agent doctor
{
"ok": true,
"dry_run": true,
"configured": {
"client_credentials": "missing",
"access_token": "missing",
"refresh_token": "missing"
},
"missing_count": 3,
"ready_for_live_upload": false,
"next_steps": [
"Current mode is dry-run. Validate metadata and agent flow before live uploads."
]
}
2. Prepare a Short and its caption.
printf 'Launching the agent-first Shorts uploader.\n#shorts #ai #agents' > copy.txt
# short.mp4 is your vertical 9:16 clip
3. Run the upload in dry-run. No network call is made; the tool returns the exact job and result it would publish, so an agent can validate metadata before going live:
youtube-shorts-agent upload-short \
--video ./short.mp4 \
--title "Agent-first Shorts upload" \
--caption-file copy.txt \
--tags ai,agents \
--duration 24
{
"ok": true,
"dry_run": true,
"job": {
"id": "youtube_1780082215631",
"platform": "youtube",
"status": "queued",
"createdAt": "2026-05-29T19:16:55.631Z",
"caption": "Launching the agent-first Shorts uploader.\n#shorts #ai #agents",
"targetUrl": "",
"mediaPaths": ["./short.mp4"],
"metadata": {
"title": "Agent-first Shorts upload",
"youtube_title": "Agent-first Shorts upload",
"youtube_tags": ["ai", "agents"],
"youtube_contains_synthetic_media": true,
"video_duration_sec": 24,
"video_aspect_ratio": "9:16"
}
},
"result": {
"provider": "youtube_official",
"platformPostId": "dryrun_1780082215631",
"releaseUrl": "https://www.youtube.com",
"raw": { "dryRun": true, "jobId": "youtube_1780082215631" }
}
}
platformPostId is prefixed with dryrun_ and releaseUrl is the YouTube root — both signal that nothing was uploaded. The id, createdAt and dryrun_* values vary per run.
4. Confirm the channel listing path (returns an empty list in dry-run):
youtube-shorts-agent list-recent --max-results 5
{ "items": [] }
Going live. Configure OAuth (youtube-shorts-agent auth-url --redirect-uri http://localhost:8787/callback, then exchange the callback code for tokens), set YOUTUBE_CLIENT_ID / YOUTUBE_CLIENT_SECRET / YOUTUBE_ACCESS_TOKEN / YOUTUBE_REFRESH_TOKEN in .env, re-run doctor until ready_for_live_upload is true, then set YOUTUBE_DRY_RUN=false and re-run the same upload-short command.
MCP
youtube-shorts-mcp
HTTP transport:
YOUTUBE_MCP_TRANSPORT=http youtube-shorts-mcp
Hermes-style config:
mcp_servers:
youtube_shorts:
command: npx
args: ["-y", "youtube-shorts-agent"]
sampling:
enabled: false
Recommended first calls:
youtube_connection_statusyoutube_privacy_audityoutube_upload_short
Agent Surfaces
| Tool | Purpose |
|---|---|
youtube_agent_manifest |
Install/runtime guidance for Codex, Claude, Cursor, Hermes and OpenClaw |
youtube_connection_status |
OAuth and dry-run readiness without token values |
youtube_privacy_audit |
Upload scope, synthetic media and local file boundaries |
youtube_oauth_authorize_url |
PKCE authorization URL with local session storage |
youtube_upload_short |
Dry-run or live Shorts upload |
youtube_list_recent_videos |
Lightweight channel verification |
Copy-Paste Agent Prompt
Use youtube-shorts-agent. First call youtube_connection_status and youtube_privacy_audit.
If uploading AI-generated media, keep containsSyntheticMedia=true. Never print token values.
Configuration
Copy .env.example to .env. Keep .env and .agent-data/ out of Git.
The upload tool sets containsSyntheticMedia=true by default for AI-generated or AI-edited videos. Override only when that is not true for the asset.
Safety Model
- OAuth tokens are never returned by CLI or MCP tools.
- PKCE verifier is stored locally in
.agent-data/. - Live upload requires
YOUTUBE_DRY_RUN=false. - The package uses the official YouTube Data API and does not automate Studio UI.
Development
npm install
npm test
npm run check
📧 Contact & Support
- 📨 support@delx.ai — general questions, integration help, partnerships
- 🐛 Bug reports / feature requests — GitHub Issues
- 🐦 Updates — @delx369 on X
- 🌐 Site — wellness.delx.ai
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。