YouTube MCP Server
Connect your AI agents to HasData's YouTube MCP server. Scrape channel stats, video metadata, timed transcripts and comments in structured JSON over streamable HTTP.
https://mcp.hasdata.com/mcp?apis=youtube - Transport
- Streamable HTTP
- Auth
- OAuth or API key
- Tools
- 5 YouTube tools
- Price
- 10 credits / call


See the YouTube MCP server in action
Select a sample prompt to inspect the tool it chooses and the JSON payload your agent receives.
Find videos about the model context protocol sorted by views
Give me the stats on the video "MCP Was Wrong From The Start"
Summarise what "MCP Was Wrong From The Start" actually says
What else has the Better Stack channel posted?
Show three audience reactions to Tim Urban’s TED talk about procrastination.
The YouTube tools your agent can call
5 toolsSearch videos, read channel and video metadata, retrieve available subtitle tracks, and collect comments with typed inputs and structured JSON.
+ hasdata_youtube_search_getYoutubeSearchResults Search with the real filter set 5 params 10 credits
Try| Parameter | Type | Required | Example |
|---|---|---|---|
| q | string | required | "model context protocol" |
| sortBy | enum | optional | "views" |
| date | enum | optional | "month" |
| length | enum | optional | "plus20" |
| videoType | enum | optional | "video" |
- searchInformation
- videoResults
- videoId
- title
- views
- length
- publishedDate
- pagination
+ hasdata_youtube_video_getYoutubeVideo One video's metadata by id 3 params 10 credits
Try| Parameter | Type | Required | Example |
|---|---|---|---|
| v | string | required | "dQw4w9WgXcQ" |
| gl | string | optional | "US" |
| hl | string | optional | "en" |
- title
- extractedViews
- extractedLikes
- lengthSeconds
- publishedDate
- category
- keywords
- channel
- captions
- aiSummary
+ hasdata_youtube_transcript_getYoutubeTranscript The timed transcript of a video 3 params 10 credits
Try| Parameter | Type | Required | Example |
|---|---|---|---|
| v | string | required | "dQw4w9WgXcQ" |
| languageCode | string | optional | "en" |
| type | enum | optional | "asr" |
- transcript
- startMs
- endMs
- startTimeText
- snippet
- chapters
- availableTranscripts
+ hasdata_youtube_channel_getYoutubeChannel Channel identity and one tab 3 params 10 credits
Try| Parameter | Type | Required | Example |
|---|---|---|---|
| channelId | string | required | "UCLA_DiR1FfKNvjuUpBHmylQ" |
| tab | enum | optional | "videos" |
| paginationToken | string | optional | "4qmFsgJ…" |
- channelInfo
- name
- handle
- description
- rssUrl
- availableTabs
- videos
- pagination
+ hasdata_youtube_comments_getYoutubeComments Video or Short comments; use v for the first page, nextPageToken to continue 5 params 10 credits
Try| Parameter | Type | Required | Example |
|---|---|---|---|
| v | string | optional | "arj7oStGLkU" |
| gl | string | optional | "us" |
| hl | string | optional | "en" |
| deviceType | string | optional | "desktop" |
| nextPageToken | string | optional | "pagination.nextPageToken from the previous response" |
- video.commentsCount
- comments
- comments[].commentId
- comments[].text
- comments[].publishedTime
- comments[].likes
- comments[].extractedLikes
- comments[].replyCount
- comments[].extractedReplyCount
- comments[].author
- pagination.nextPageToken
- pagination.hasdataLink
Base calls cost 10 credits. Failed calls are not billed.
One endpoint, any MCP client
A config block for every major MCP client, in its native format. Authenticate with browser OAuth or an x-api-key header.
Claude Code
hasdata-youtube · connected · 5 toolsCursor
hasdata-youtube · 5 tools enabledClaude Desktop
hasdata-youtube · connected · 5 toolsVS Code / Copilot
hasdata-youtube · running · 5 toolsWindsurf
hasdata-youtube · 5 toolsCline
hasdata-youtube · 5 toolsChatGPT
Sign in with your HasData account. No API key is needed for the OAuth connection.
Check that hasdata_youtube_search_getYoutubeSearchResults appears in the tool activity.OpenAI Agents SDK
Install openai-agents with python -m pip install openai-agents. Set OPENAI_API_KEY and HASDATA_API_KEY in your environment. Running this script uses OpenAI API billing and HasData credits.
The script prints the agent reply from result.final_output.Codex CLI
Confirm hasdata-youtube, its URL and enabled status.Gemini CLI
hasdata-youtube · 5 toolsRaw HTTP / curl
{ "tools": [ … 5 items ] }YouTube plus whatever else you need
Name the services in the query string and the server exposes only their tools. Every one draws from the same key and the same balance.
Free on GitHub, paid in hours
Anyone can clone a free MCP to scrape YouTube. Whether that stays free depends on the shape of your project.
Self-hosted costs and hours are illustrative budgets for one custom scraper. Engineering time is separate from infrastructure spend.
A script I run once
A weekly report
A pipeline in production
A feature in my product
One balance, every interface
A flat monthly price against a known credit ceiling. Move up a plan when you outgrow it.
Free
Startup
Basic
RecommendedGrowth
Monthly tool call volume
Custom price based on required volume
Past 20M credits a month, or terms the self-serve plans do not cover. We shape the contract around your workload.
Before you wire it in
Do I need a Google account or an API key from YouTube?
No. The only credential is your HasData key. Every tool reads the public pages a signed-out visitor sees.
How is this different from the YouTube Data API?
You do not need to manage a YouTube Data API key or its daily quota. HasData usage is billed in credits per successful tool call, and your plan sets concurrency. Timed transcripts are available through a separate tool when the video has a subtitle track.
Which videos have a transcript?
A video needs an available subtitle track. languageCode selects a matching track, and type=asr requests an auto-generated speech-recognition track when available. The response lists other tracks in availableTranscripts.
Is the transcript one block of text?
No. Each segment carries startMs, endMs, startTimeText and snippet, so summaries and search results can point to the relevant moment in the video.
Can I use the real search filters?
Yes. Upload date, duration, sort order and video type are enums, and filters__ covers the rest, including HD, subtitles and live. An agent picks documented values rather than assembling a search URL.
Can I collect comments from a video or Short?
Yes. Pass its eleven-character ID in v for the first page. To continue, copy pagination.nextPageToken into nextPageToken; continuation requests do not need v. The tool returns top-level comment text, authors and engagement counts. Reply counts do not include the text of those replies.
How many calls can run in parallel?
5 on the free tier, 5 on Startup, 15 on Basic, and 50 on Growth. The larger Growth volumes raise it to 200, 300 and 500.
What happens when I run out of credits?
Nothing is charged on top of the plan. Calls stop until the billing cycle renews.
Does it work with Claude Desktop, Cursor, VS Code and Claude Code?
Yes, all four, plus anything else that speaks MCP over streamable HTTP. Claude Desktop connects through OAuth, and the rest take the URL and an API key header.
Is HasData affiliated with YouTube?
No. HasData is an independent service and is not affiliated with, endorsed by, or sponsored by Google LLC. YouTube is a trademark of its respective owner.