youtube-mcp: Instructions file for Codex

AGENTS.md

youtube-mcp AGENTS.md is an instructions file for Codex, OpenCode from EthanDM/youtube-mcp. It costs 589 tokens per session, scanned A, original, MIT.

Repository instructions for a local YouTube connector that lets an agent discover public videos, read limited comments and captions, and manage selected owned playlists.

In plain words
What is it for?
Use it when developing or checking changes to this YouTube connector, especially its public search, comment retrieval, caption research, and owned-playlist workflows.
Why use it?
They keep the connector small and read-focused, while separating public requests, signed-in playlist access, and local caption reading. They also define boundaries around credentials, downloads, caching, and saved data.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is EthanDM/youtube-mcp's own configuration. It tells Codex and OpenCode how to work on youtube-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything youtube-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to EthanDM/youtube-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/EthanDM/youtube-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/EthanDM/youtube-mcp

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for youtube-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ethandm/youtube-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/ethandm/youtube-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/ethandm/youtube-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/ethandm/youtube-mcp/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for youtube-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ethandm/youtube-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/ethandm/youtube-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 589 This file is loaded in full into every session.
When invoked 589 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00589 $0.00589
Opus 5.5 $0.00236 $0.00236
Sonnet 5.5 $0.00118 $0.00118
Haiku 4.5 $0.00059 $0.00059

Measured 1mo ago against content hash 593976066580, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

youtube-mcp AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 39 lines

How it starts

The opening of the file, as written. The whole thing — 39 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Purpose

This repository is a local YouTube MCP for public discovery, bounded comment retrieval, local caption-track research, and explicitly scoped owned-playlist management. It is published as source code, but each installation uses its own local credentials and OAuth session.

Working Rules

  • Keep the tool surface small and workflow-oriented.
  • Do not add account-library tools, media downloads, ASR/Whisper fallback, caching, persistence beyond the local OAuth token store, or write actions outside owned-playlist management without an explicit product decision.
  • Keep API-key public reads in the centralized GET-only request client. Keep OAuth-authenticated playlist reads and writes in the separate authenticated request client.
  • Keep yt-dlp caption extraction local, explicit, read-only, and separate from the Data API client. Never use it to download media or persist transcript data.
  • For a transient caption fetch failure, refresh metadata and retry once only; preserve safe failure detail without exposing caption URLs or retrying permanent failures.
  • Do not add transcript export, caching, or artifact persistence to the MCP. If an external assistant creates a user-requested transcript export, keep it outside the repository under ~/.config/youtube-mcp/artifacts/ as user-local output, not server state.
  • Keep OAuth interactive and local through the auth CLI. Store tokens only in the private user-scoped token file; never expose them through MCP tools or Git.
  • Authenticate playlist writes with OAuth and reject playlists not owned by the resolved authenticated channel. Require confirm: true for removal and reordering.
  • Verify every playlist mutation through an observed-state readback before reporting success. Cleanup planning is deterministic and read-only; do not infer subjective sequencing.
  • Batch cleanup executes only explicit, confirm-gated planner removals after preflight; stop and report exact partial state on a write failure. Playlist cloning stays caller-bounded (five pages maximum), preserves source order, and never rolls back a partial target.
  • Batch video adds are append-only, preflight every requested public video before the first write, and retain exact completed, remaining, and indeterminate IDs. Batch ordering requires a complete reviewed item-ID order for an owned playlist of at most 250 items; reject stale/incomplete orders before mutation and read back the final order.
  • Keep transcript search bounded to the requested cursor window and state its retrieved-segments-only scope.
  • Preserve explicit pagination. Never crawl comment pages implicitly.
  • State the retrieved-page-only limit whenever local comment-term matching is used.
  • Keep API keys and tunnel credentials outside Git.
  • Prefer the built stdio server for normal use. Rebuild after source changes.

Read the full file on GitHub · 39 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +1 lines · +29 tokens per session 593976066580
  2. 1mo ago First seen · 38 lines · 560 tokens per session scan A a2aabc8f6880

Subscribe to this mod's changes

youtube-mcp AGENTS.md is an instructions file published in the GitHub repository EthanDM/youtube-mcp (0 stars, last pushed 4d ago), licensed MIT. It adds 589 tokens to every session, about $0.0024 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories