Borrowing it
Nothing to install: this file belongs to granitebps/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.
curl -O https://raw.githubusercontent.com/granitebps/youtube-mcp/main/.github/copilot-instructions.mdgit clone --depth 1 https://github.com/granitebps/youtube-mcpWrote 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.
[](https://agentmods.dev/instructions/granitebps/youtube-mcp/copilot-instructions)<a href="https://agentmods.dev/instructions/granitebps/youtube-mcp/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/granitebps/youtube-mcp/copilot-instructions/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.
<a href="https://agentmods.dev/instructions/granitebps/youtube-mcp/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/granitebps/youtube-mcp/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01375 | $0.01375 |
| Opus 5.5 | $0.00550 | $0.00550 |
| Sonnet 5.5 | $0.00275 | $0.00275 |
| Haiku 4.5 | $0.00137 | $0.00137 |
Grade A, and why
youtube-mcp copilot-instructions.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 19d 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.
How it starts
The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Copilot Instructions
Build, test, and lint commands
npm installinstalls dependencies.npm run buildcompiles the TypeScript source insrc/todist/. This is the main verification command currently configured in the repo.npm startruns the built MCP server over stdio fromdist/index.js.npm run start:httpruns the built server in Streamable HTTP mode.node dist/index.js --httpis equivalent.npm run devandnpm run dev:httpdo a one-timetscbuild and then start the server; they are not watch-mode commands.npm run checkrunsnpm testplus the release checks:check:release(package, lockfile, andserver.jsonversions agree; workflow policy),check:package(packed file allow-list), andcheck:install(installs the packed tarball and lists tools over stdio). CI runs it on Node 22.21.0 and 24.- Releases follow
RELEASE.md: a pushedv*tag publishes npm, then the MCP Registry, then a GitHub release. Never create or push a release tag without explicit approval of the version and commit. Keep the version inpackage.json,package-lock.json, andserver.jsonin sync, and adddocs/release-notes-vX.Y.Z.mdplus aCHANGELOG.mdentry. npm testbuilds and runs the offline suite intest/*.test.mjswith Node's built-in test runner againstdist/. Tests replaceglobalThis.fetchwith fakes fromtest/helpers.mjs; they never touch the network. Run one file withnpm run build && node --test test/transcript.test.mjs.- There is no
lintscript.
High-level architecture
src/index.tsis the only entrypoint. It builds anMcpServer, registers all tools, and then selects the transport:- stdio by default via
StdioServerTransport - HTTP when
--httpis passed orTRANSPORT=httpis set
- stdio by default via
- In HTTP mode,
src/index.tsbuilds an Express app through the MCP SDK, adds optional bearer-token auth withAPI_TOKEN, rate-limits/mcp, and keeps aMap<string, StreamableHTTPServerTransport>so each MCP session can continue across requests. - Each tool lives in
src/tools/and follows the same pattern:- export a Zod schema
- export an output schema for
structuredContent - export an async handler
- register the tool in
createServer()usinginputSchema: schema.shapeandoutputSchema - wrap the handler with
withLogging(...)
- Shared YouTube access lives in
src/utils/youtube-api.ts. That module owns:- the singleton
youtubei.jsInnertubeclient - TTL caches for video info, comment pages, and search results
- per-call deadlines via
runWithDeadline(src/utils/abort.ts), linked to the MCP request'sextra.signal
- the singleton
src/utils/abort.tskeeps the current call'sAbortSignalinAsyncLocalStorage.contextFetchis passed to youtubei.js as itsfetch, and the transcript library'svideoFetch/playerFetch/transcriptFetchhooks also use it, so cancellation aborts real HTTP requests. It turns HTTP 403/429 intoACCESS_BLOCKEDbefore a library can relabel them.src/utils/config.tsreads theYT_*limits once at startup.- Transcript features are the notable exception to the
youtubei.jspath:get_video_transcriptandget_transcript_languagesuseyoutube-transcript-plus- metadata, comments, and search use the selected provider (
youtubei.jsby default, or the official YouTube Data API v3 withYT_PROVIDER=api)
src/utils/parse-video-id.tsis the normalization layer for every tool that accepts a URL or ID. It supports watch URLs,youtu.be, embed URLs, shorts, live URLs, and raw 11-character IDs.
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.
- 19d ago Changed · +46 tokens per session dc58d5b6f859
- 24d ago Changed · +8 lines · +465 tokens per session e09d889c4cf9
- 2mo ago First seen · 45 lines · 864 tokens per session scan A 234457ac0553
youtube-mcp copilot-instructions.md is an instructions file published in the GitHub repository granitebps/youtube-mcp (0 stars, last pushed 19d ago), licensed ISC. It adds 1,375 tokens to every session, about $0.0055 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.
youtube-mcp copilot-instructions.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| youtube-mcp copilot-instructions.mdgranitebps/youtube-mcp | Instructions file | 0 | 19d ago | ISC | A | 1,375 | GitHub Copilot |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode model-prompts.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 2,022 | GitHub Copilot |