How to connect YouTube to Cursor
This guide connects YouTube Data to Cursor. kirbah publishes the server, which runs locally on your machine and is started with npx. The listing marks YOUTUBE_API_KEY and MDB_MCP_CONNECTION_STRING as optional, so neither is needed to begin. Setup details come from the listing's install data and Cursor's documentation, last read on 2026-10-26.
Updated Oct 26, 2026 · Built from catalog data; how we rank and grade
Checked against Cursor's documentation on Oct 26, 2026. Commands and config blocks are generated from the same install data as each listing page.
Before you start
- Cursor installed and able to start.
- Node.js with npx (the server starts with npx).
- YOUTUBE_API_KEY (optional): YouTube Data API v3 key.
- MDB_MCP_CONNECTION_STRING (optional): MongoDB connection string for caching.
1. Check what you need
Cursor starts this server through
npx, so Node.js comes first. The optional values are dealt with in the following step.Check that it is installed node --version- It can take YOUTUBE_API_KEY and MDB_MCP_CONNECTION_STRING (next step).
2. Get YOUTUBE_API_KEY and MDB_MCP_CONNECTION_STRING
Both values are optional, so collect only the ones you intend to use before you edit the config.
- YOUTUBE_API_KEY (optional): YouTube Data API v3 key.
- MDB_MCP_CONNECTION_STRING (optional): MongoDB connection string for caching.
3. Add YouTube Data to Cursor
One JSON entry in the MCP config defines the server, and its env section uses the
${env:NAME}form for each value. The shell block below sets them.Add this to .cursor/mcp.json in the project, or to ~/.cursor/mcp.json for every project .cursor/mcp.json{ "mcpServers": { "mcp-youtube": { "command": "npx", "args": [ "-y", "@kirbah/mcp-youtube@1.1.15" ], "env": { "YOUTUBE_API_KEY": "${env:YOUTUBE_API_KEY}", "MDB_MCP_CONNECTION_STRING": "${env:MDB_MCP_CONNECTION_STRING}" } } } }Set the variable in the shell you start the host from export YOUTUBE_API_KEY="paste-your-value-here" export MDB_MCP_CONNECTION_STRING="paste-your-value-here"- Cursor expands ${env:NAME} from its own environment, so the variable has to be set where Cursor starts.
4. Restart or reload if it does not appear
If YouTube Data is not showing, read this step for the docs' position on restarts and on approving tools.
- The docs do not say whether editing mcp.json needs a restart. They tell you to restart Cursor after updating files of a custom local server.
- Cursor asks for approval before an agent uses an MCP tool unless you allowlist it.
Check that it works
Look for connection errors in the MCP Logs channel. After it connects, Cursor should list the 9 tools the catalog records, including getChannelTopVideos.
- Open the Output panel (Cmd+Shift+U on macOS), choose MCP Logs, and look for connection errors. A working server lists its tools under Available Tools; agent mcp list shows connection state from the terminal.
- Once it is connected, Cursor should list its tools; the catalog records 9 for YouTube Data, including findConsistentOutlierChannels, getChannelStatistics and getChannelTopVideos.
Troubleshooting
- A server fails or an npm-based server misbehaves after an update
- Check the MCP Logs channel in the Output panel. For npm-based servers the docs suggest removing the server, running npm cache clean --force, and adding it again. Source
Security notes
- Publisher: kirbah, not listed as the vendor's own server; license MIT.
- It runs on your machine with your user account's permissions, so it can reach any file or network resource you can. Read its source before you give it access: https://github.com/kirbah/mcp-youtube.
- Keep YOUTUBE_API_KEY and MDB_MCP_CONNECTION_STRING in an environment variable; the config above refers to it by name, so the value is not written to the file.
- This listing has no security grade: Agent Market has not published security grades yet, so the choice is yours to make from the source and the permissions.
Servers and skills in this guide
You can also look at other YouTube servers, compare them, or follow the general Cursor guide.
- 1YouTube Data
kirbah
YouTube MCP server for token-optimized, structured data using the YouTube Data API v3.
★ 32↓ 296/wkLast active Oct 20, 2026Local (stdio)Claude Code, Codex, VS Code, Cursor +2
AFreshness: A–Security: not graded yet
Related
Sources
- MCP Configuration Reference · fetched Oct 26, 2026
- MCP CLI Reference · fetched Oct 26, 2026
Cite this page
How to connect YouTube to Cursor. Agent Mart. https://agentmart.dev/guides/connect-youtube-to-cursor (last updated 2026-10-26)