How to give Claude or Cursor access to YouTube (MCP server)
Checked on 2026-11-18.
An AI assistant cannot open a YouTube video by itself. With an MCP server it gets tools for it: it can read a video's transcript, look up a channel or run a search while it answers you. Here is how to add one.
What the assistant can do afterwards
The Pipefetch MCP server adds seven tools. The assistant picks the right one from what you ask.
| Tool | What it returns |
|---|---|
youtube_transcript | The transcript of a video as text, with title, channel, length and chapters |
youtube_video | Exact views, likes and comment count, description, publish date, tags |
youtube_channel | Subscribers, video count and description of a channel |
youtube_channel_videos | The latest uploads of a channel, up to 30 |
youtube_channel_shorts | The latest Shorts of a channel, up to 40 |
youtube_search | Search results, up to 40, with sorting and date filters |
youtube_comments | Top or newest comments of a video, up to 100 |
Setup
1. Create an API key. A new account has 100 free credits and needs no card.
2. Connect your tool to the hosted server at https://pipefetch.com/mcp. There is nothing to install; the key goes in a header.
Claude Code, one command:
claude mcp add --transport http pipefetch https://pipefetch.com/mcp --header "x-api-key: pf_your_key"Cursor, in .cursor/mcp.json in your project, or ~/.cursor/mcp.json for every project:
{
"mcpServers": {
"pipefetch": {
"url": "https://pipefetch.com/mcp",
"headers": {
"x-api-key": "pf_your_key"
}
}
}
}Any other tool that accepts a remote MCP server over HTTP: give it the same address and the same x-api-key header. Authorization: Bearer pf_your_key works too.
3. Restart the tool. The seven tools appear in its tool list.
What to ask
- "Summarize this video and list the three main claims: https://www.youtube.com/watch?v=jNQXAC9IVRw"
- "What did the last five videos of @mkbhd cover, and which one got the most views?"
- "Find this week's most viewed videos about web scraping."
- "What are people saying in the comments of this video?"
What it costs
Each tool call is one Pipefetch request and usually uses 1 credit. A call that finds nothing, such as a video without captions, costs nothing. Keep in mind that an assistant can make several calls for one question: listing a channel's latest videos is one call, and reading ten of their transcripts is ten more.
The free alternatives
There are open-source MCP servers that fetch transcripts directly from YouTube on your own computer, without a key and without paying. For transcripts on a personal machine they are a fair choice. They tend to stop at transcripts, they depend on an interface YouTube does not document, and they do not work from servers, where YouTube refuses most requests. The Pipefetch server is for when you also want search, channels and comments, or when the assistant runs somewhere other than your laptop.
Where your key lives
The key sits in your tool's configuration on your computer and is sent only to Pipefetch, in a header. Anyone who has it can spend its credits, so do not paste it into a chat or commit the configuration file to a public repository.
Try it with 100 free credits. No card, no Google Cloud project, no OAuth. Get an API key or read the docs.
APIs used in this guide
-
1 credit
YouTube Transcript API
The transcript of any public video with captions, as plain text, timestamped segments, SRT or WebVTT.
GET /v1/youtube/transcript -
1 credit
YouTube Search API
YouTube search results for a query, with the same sorting and filters the site offers.
GET /v1/youtube/search
More guides
- How to get a YouTube transcript in Python
- How to get a YouTube transcript in Node.js
- YouTube API quota exceeded: what the error means and how to fix it
- How to find a YouTube channel ID from a handle or URL
- How to download YouTube subtitles as SRT or VTT
- youtube-transcript-api RequestBlocked or IpBlocked: why it happens and how to fix it
- How to get YouTube comments in Python
- How to search YouTube from Python
- How to list a YouTube channel's videos in Python
- How to summarize a YouTube video with an LLM in Python
- How to get YouTube transcripts and video stats in Google Sheets
- How to get YouTube video views and likes in Python
- How to get YouTube transcripts in n8n, Make and Zapier
- LangChain YoutubeLoader fails on a server: why, and a loader that works
- How to get a YouTube channel's subscriber count in Python