Stophy blog
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.
Cursor's Agent will happily write code against a library it's never seen, but it can't watch the talk that explains it, read the transcript, or scan the comments where people report what actually breaks. The Stophy MCP server gives Cursor that reach. Add one JSON block and the Agent can search YouTube, pull transcripts, read comments, and browse channels and playlists without leaving the editor.
Prerequisites
- Cursor installed and up to date
- A Stophy API key (see below)
- Node.js on your PATH, since Cursor spawns the server locally
Get an API key
Sign up at stophy.dev/dashboard. Keys start with st_ and work right away. Copy one for the config.
Each data tool costs one credit, stophy_get_credits is free, and credits don't expire. There's no YouTube Data API quota to request and no scraper to maintain.
Add the server config
Cursor reads MCP servers from a JSON config, either ~/.cursor/mcp.json for a global server or .cursor/mcp.json inside a project for a project-scoped one. You can edit the file directly, or paste the same JSON through Settings → MCP → Add new MCP server.
1{2 "mcpServers": {3 "stophy": {4 "command": "npx",5 "args": ["-y", "@stophy/mcp"],6 "env": {7 "STOPHY_API_KEY": "st_YOUR_API_KEY"8 }9 }10 }11}Replace st_YOUR_API_KEY, save, and refresh the MCP list. Cursor connects over the local stdio transport, so npx -y @stophy/mcp runs as a subprocess and Node has to be installed and on your PATH. A connected server shows a green dot in the MCP list. Red means it failed to start, so check Troubleshooting.
Run your first query
Open the Agent (MCP tools are available in Agent mode) and ask for something that needs YouTube.
Search YouTube for "react server components" and return the top 5 by view count.
The Agent calls stophy_search_videos and gets an array at data.items[], each entry carrying videoUrl, viewCount, durationText, and publishedAt.
1{2 "success": true,3 "creditsRemaining": 991,4 "data": {5 "query": { "q": "react server components", "type": "video", "sortBy": "relevance" },6 "items": [7 {8 "type": "video",9 "videoUrl": "https://www.youtube.com/watch?v=T8TZQ6k4SLE",10 "title": "React Server Components, Explained",11 "author": "Web Dev Simplified",12 "viewCount": 234000,13 "viewCountText": "234K views",14 "durationText": "16:45",15 "publishedAt": "2025-02-08T00:00:00Z"16 }17 ]18 }19}Paste a URL and ask for the transcript next. stophy_get_video accepts a full URL or a bare video ID.
Get the transcript for https://youtube.com/watch?v=T8TZQ6k4SLE and turn the API examples into a starter component.
That's stophy_get_video with type="transcript", which returns timestamped segments. Values above are illustrative, and live results depend on the query.
The tools you just added
| Tool | What it does |
|---|---|
stophy_search_videos | Search YouTube by keyword, with filters for type, upload date, duration, and sort order |
stophy_get_video | Fetch details, transcript, comments, replies, or live chat for a video URL |
stophy_get_channel | Browse a channel's videos, Shorts, playlists, or about page |
stophy_get_playlist | List a playlist's videos with metadata |
stophy_get_suggestions | Get autocomplete suggestions for a partial query |
stophy_get_credits | Check your remaining balance (free) |
What that unlocks in Cursor
- Tutorial-to-code. Search for a walkthrough of a library you're adding, pull the transcript, and have the Agent scaffold against what the video actually demonstrates, with your codebase as context.
- Comment-driven requirements. Fetch comments on a popular video about a tool and pull out the common pain points before you design around it.
- Channel benchmarking. Compare a competitor's recent uploads and view counts without leaving the editor.
- Playlist-to-docs. Extract a course playlist, pull each transcript, and generate study notes or internal docs.
Troubleshooting
Server showing red? Make sure Node is installed and npx resolves on your PATH. Run npx -y @stophy/mcp in a terminal to see the real error. If the package won't download, check your npm registry and network.
Key not working? Confirm it at stophy.dev/dashboard, and validate the JSON. A trailing comma or missing brace makes Cursor fail parsing silently.
Tools not in the Agent? Restart Cursor after editing the config. A server added while Cursor is running needs a restart to register.
FAQ
Does this use the official YouTube Data API? No. Stophy reads YouTube without Google quota or approval forms, so there's nothing to apply for and no daily cap to hit.
What does each call cost?
One credit per data tool. stophy_get_credits is free and credits don't expire. New accounts start with a free balance.
Why is my server red in the MCP list?
Almost always Node or npx missing from your PATH, or invalid JSON. Run npx -y @stophy/mcp in a terminal to see the real error.
Does Cursor support the hosted HTTP transport?
Cursor connects over local stdio, so the JSON block spawns @stophy/mcp with your key in env. Keep Node on your PATH and it starts on launch.
Related guides
- Add the YouTube MCP server to Claude Code
- Add the YouTube MCP server to Codex
- Add the YouTube MCP server to Hermes Agent
- The Stophy CLI and MCP server, side by side
Get your API key at stophy.dev/dashboard →
Full reference for every client and tool lives at docs.stophy.dev/mcp.
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 Hermes Agent
Add the Stophy YouTube MCP server to Nous Research's Hermes Agent with one YAML block. Search videos, pull transcripts, read comments, and monitor live chat.