Stophy blog
Two ways to give your agent YouTube: the Stophy CLI and MCP server
Stophy now ships a CLI and an MCP server so you can search YouTube, pull transcripts, and read comments from the terminal or inside Claude, Cursor, and Windsurf.
The API was always the core. One key, structured JSON, every YouTube surface we care about.
But agents do not live inside curl. They live in terminals, in Claude Desktop, in Cursor Composer, in whatever tool you already have open. Wiring YouTube data into those workflows should not mean maintaining your own scraper or writing HTTP glue on every project.
So we shipped two surfaces on top of the same API: a CLI for the terminal, and an MCP server for agent clients.
The CLI: YouTube data you can pipe
The Stophy CLI is @stophy/cli. Install it however you already install tools:
1curl -fsSL https://stophy.dev/install.sh | bash2npm install -g @stophy/cli3brew install stophydotdev/tap/stophyWindows? winget install stophydotdev.stophy or irm https://stophy.dev/install.ps1 | iex.
Log in once with stophy login --browser, or set STOPHY_API_KEY in your environment. Then every command prints JSON on stdout. Status messages go to stderr, so piping stays clean.
1stophy search --q "typescript tutorial" --type video --json2stophy video transcript --url "https://www.youtube.com/watch?v=YkOSUVzOAA4" --json3stophy channel --url "https://www.youtube.com/@t3dotgg" --tab video --sortBy popularThat is the whole model. Search, transcripts, comments, channels, playlists, suggestions. Same endpoints as the REST API. Same credit cost. Same response shapes.
Use it when you want to script something, inspect data quickly, or hand results to another tool with jq. If you are setting up Claude Code or Cursor with agent skills, npx -y @stophy/cli init --all --browser installs the CLI, pulls in the skills, and opens browser auth in one shot.
Full install options and examples: stophy.dev/explore/stophy-cli
The MCP server: YouTube tools inside your agent
MCP is how modern agent clients expose tools. Stophy exposes six of them: search, video details, transcripts, comments, channels, playlists, suggestions, plus a free credits check.
You can connect two ways.
Hosted HTTP (recommended when your client supports it):
1https://api.stophy.dev/v1/mcp2Authorization: Bearer st_YOUR_API_KEYNo local process. No npx on every launch. Claude Code example:
1claude mcp add --transport http stophy https://api.stophy.dev/v1/mcp \2 --header "Authorization: Bearer $STOPHY_API_KEY"Local npm server (when your client expects stdio MCP):
1STOPHY_API_KEY=st_xxx npx -y @stophy/mcpDrop that into Claude Desktop, Cursor, VS Code, or Windsurf as an MCP server config. The tools show up in the agent session. Your model calls stophy_search_videos or stophy_get_video the same way it would call any other tool.
Every MCP call uses the same validation, credit metering, and response normalization as the REST API. One credit per data call. stophy_get_credits is free.
Full setup for each client: docs.stophy.dev/mcp. Explore page: stophy.dev/explore/stophy-mcp
Which one should you use?
Use the CLI when you are in a terminal, writing scripts, or piping JSON into another process. You own the command. You own the output.
Use MCP when you want YouTube inside an agent session without writing integration code. The client handles tool calls. You handle the prompt.
Use the REST API when you are building an app or backend that needs YouTube data on its own schedule.
All three hit the same infrastructure. Pick the surface that matches where your code (or your agent) actually runs.
Try it
Get an API key from the dashboard, then:
1curl -fsSL https://stophy.dev/install.sh | bash && stophy login --browserOr add Stophy to Cursor in under a minute with the MCP config on docs.stophy.dev/mcp.
Your agent should be able to read YouTube. Now it can.
Related posts
How to Add a YouTube MCP Server to Claude Code
Wire the Stophy YouTube MCP server into Claude Code with one command. Search videos, pull transcripts, read comments, and browse channels without leaving the terminal.
How to Add a YouTube MCP Server to Codex
Add the Stophy YouTube MCP server to OpenAI's Codex CLI with one TOML block. Search videos, pull transcripts, read comments, and browse channels from your terminal.
How to Add a YouTube MCP Server to Cursor
Add the Stophy YouTube MCP server to Cursor with one JSON block. Search videos, pull transcripts, read comments, and browse channels from Cursor's Agent.