Skip to content

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.

← All posts
ProductCLIMCP
Hussein Hakizimana··4 min read

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:

Terminal
1curl -fsSL https://stophy.dev/install.sh | bash
2npm install -g @stophy/cli
3brew install stophydotdev/tap/stophy

Windows? 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.

Terminal
1stophy search --q "typescript tutorial" --type video --json
2stophy video transcript --url "https://www.youtube.com/watch?v=YkOSUVzOAA4" --json
3stophy channel --url "https://www.youtube.com/@t3dotgg" --tab video --sortBy popular

That 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):

text
1https://api.stophy.dev/v1/mcp
2Authorization: Bearer st_YOUR_API_KEY

No local process. No npx on every launch. Claude Code example:

Terminal
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):

Terminal
1STOPHY_API_KEY=st_xxx npx -y @stophy/mcp

Drop 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:

Terminal
1curl -fsSL https://stophy.dev/install.sh | bash && stophy login --browser

Or 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.