
HasData YouTube
com.hasdata由 hasdata.com 发布官方发布者v1.0.9更新于 Nov 2, 2026
Search YouTube and read video, channel and transcript data as JSON. No Google Cloud project.
发布方自己的服务:HasData Airbnb
概览
HasData 托管的 MCP 服务器,让助手搜索 YouTube 并以 JSON 读取公开的视频、频道和字幕数据,无需 Google Cloud 项目。
- 可以做什么
- 按排序、上传时间、时长、内容类型和特性筛选搜索 YouTube,并支持翻页
- 按视频 ID 读取播放数据、简介、标签、字幕轨和关联视频
- 读取频道信息,并逐个标签页查看视频、短视频、直播、播放列表、简介等
- 获取带时间轴的字幕,并列出可用的语言轨
- 使用两个内置提示词,并以资源形式读取固定取值参数列表
- 适用场景
- 适合需要做 YouTube 调研的场景:查找某主题的视频、依据字幕总结视频内容,或梳理某频道的上传内容,且不想配置 Google 凭据。它只读取未登录可见的公开数据,不适用于上传、评论、频道管理或私有分析数据。
- 运行要求
- 需要一个 HasData API 密钥:远程端点通过 x-api-key 请求头发送,npm 或 PyPI 的 stdio 启动器则通过 HASDATA_API_KEY 环境变量提供。客户端需支持带自定义请求头的 streamable HTTP,或具备 Node.js(npx)或 uvx 以运行启动器。需要能访问 HasData 端点。
安装
在 SourceWeft 中
- 打开 控制台中的 HasData YouTube,将其添加到工作区。
- 连接 x-api-key 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
交给智能体安装
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/com.hasdata%2Fyoutube/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。
{
"mcpServers": {
"hasdata-youtube": {
"type": "http",
"url": "https://mcp.hasdata.com/mcp?apis=youtube",
"headers": {
"x-api-key": "<YOUR_API_KEY>"
}
}
}
}README
YouTube MCP Server
A hosted YouTube MCP server that gives Claude, Cursor, Windsurf and any other MCP client four read-only YouTube tools. Search YouTube, read video and channel data, and pull transcripts, with no Google Cloud project and no YouTube Data API key.
1,000 free credits every month, no card required, which is 100 YouTube calls.
[Glama score] [tool contract] [MCP] [Tools]
Contents
- What you need
- Quick start
- Example prompts
- Tools
- Errors and failure paths
- Pricing, free tier and limits
- Tool selection
- How it compares
- FAQ
- HasData links
- Development
- Contributing
- License
What you need
An MCP client that speaks streamable HTTP with custom headers. A HasData API key from the dashboard, free to create. Nothing else. This is a remote server, so the simplest path is a URL and a header, with no container to run and no Google account anywhere in the flow. A stdio-only client can use the @hasdata/youtube-mcp (npm) or hasdata-youtube-mcp (PyPI) launcher instead.
Quick start
The server URL is the same for every client. We run it hands-on in Claude Code and Claude Desktop. The other blocks follow each client's own documented format for a remote server.
Clients with OAuth support can add the same URL as a connector and sign in without putting a key in a config file.
Claude Code
Claude Desktop
Settings, then Connectors, then Add custom connector, then paste https://mcp.hasdata.com/mcp?apis=youtube and sign in.
For the config-file route, Claude Desktop loads only local (stdio) servers, so it reaches a remote server through a stdio launcher. The @hasdata/youtube-mcp package is that launcher, and it reads the key from the environment. Add this to claude_desktop_config.json:
Python instead of Node? Swap the launcher for the PyPI package, which uvx runs without a manual install:
Cursor
~/.cursor/mcp.json for every project, or .cursor/mcp.json for one:
Windsurf
~/.codeium/windsurf/mcp_config.json. Windsurf calls the field serverUrl, not url:
Cline
VS Code
.vscode/mcp.json in the workspace:
Codex CLI
~/.codex/config.toml:
Gemini CLI
~/.gemini/settings.json:
Example prompts
Prompts, not code. Paste one in and the agent picks the tool itself. Each is annotated with the calls it takes, because in MCP the model decides how many calls to make and every successful call costs 10 credits.
Find the ten most viewed videos about the Model Context Protocol from the last month, then pull the transcript of the top one and give me the three claims it makes about tool calling.
Two calls, 20 credits.
Take the channel @GoogleDevelopers. List the tabs it publishes, then summarize the last five uploads and tell me which topics repeat.
Two calls, 20 credits. Reading a tab you have not seen takes a second call, because the tab list arrives inside the first response.
Take this video id, dQw4w9WgXcQ. Get its stats, then check which of its related videos come from the same channel.
One call, 10 credits. Related videos ride along in the same response.
Search YouTube for "web scraping tutorial", sorted by upload date, videos under four minutes only, and give me the chapter titles of each result that has them.
One call, 10 credits.
Pull the German transcript of this video if one exists, and tell me which languages it is available in.
One call, 10 credits.
Search takes YouTube's own filter tokens, and an agent narrows by duration, upload date and content type without post-processing. Transcripts arrive with the list of available language tracks, which lets the agent pick one without guessing.
Paging costs a call each time. A research prompt that searches, pages twice, then pulls three transcripts is six calls and 60 credits. The free tier goes further on narrow questions than on open-ended crawls.
Tools
Four tools, all read-only. Samples below are trimmed from real calls, and the numbers in them move as YouTube updates. Read them as shapes. Each tool name links to its endpoint reference, which carries the full field list.
The samples are the payload, not the whole response. A tools/call result carries one text block, and that text is itself JSON holding url, status, text and json, with the scraped data under json. From a raw JSON-RPC response the path is result.content[0].text, parsed, then .json. A chat client unwraps that for you and code talking to the endpoint directly does not.
Get YouTube search results
hasdata_youtube_search_getYoutubeSearchResults
Searches YouTube and returns the whole results page, split by result type.
A results page is split across videoResults, shortsResults, inlineShortsResults, playlistResults, channelResults and shelves, with paid placements in adsResults and sponsoredResults. Which blocks appear depends on the query, and a block with nothing to report is absent, not empty. Test for the key before iterating. searchInformation carries the total and pagination.nextPageToken is what you feed back as paginationToken. Ads never mix into the organic arrays, though there are two of them to skip.
Two things there earn a mention. views is a parsed integer next to the 1.6M views display string and needs no suffix parser. And chapters come back inside search results, not only on the video itself, though only some videos carry them.
The search endpoint reference lists every sp and filters__ token the endpoint accepts.
Get YouTube video data
hasdata_youtube_video_getYoutubeVideo
One video by id.
Returns title, thumbnail, channel, publishedDate, lengthSeconds, category, isFamilySafe and isUnlisted, plus the relatedVideos, endScreenVideos, keywords, captions, music and socialLinks arrays. description is an object holding the full text in content and a links array where every link and hashtag carries startIndex, length, text and url. The text field holds the link as the author wrote it and url holds YouTube's redirect wrapper, which matters if you are pulling sponsor or affiliate destinations out of descriptions.
Read the parsed field by name per tool before you copy the sample below. Search and channel results put the parsed number in
viewsand the display string inviewsOriginal. This response inverts it, keeping the string inviewsand the number inextractedViews, and the same inversion applies tolikesandsubscribers. Get it wrong anditem.views > 100000compares a string here without ever throwing.
Get YouTube channel data
hasdata_youtube_channel_getYoutubeChannel
A channel by id or handle, one tab at a time.
Returns channelInfo, featuredVideo and sections on the default tab. Other tabs return their own shape. channelInfo carries the handle, avatar, banner, description, channel keywords and the channel's rssUrl, enough to keep watching a channel without polling it.
The
availableTabsarray in the sample below holds display labels, and they are not the valuestabaccepts.Home,Live,CoursesandSearchmap to no parameter value at all, and the rest need lowercasing. An agent that reads the list and walks each entry fails on the first one.
Get YouTube video transcript
hasdata_youtube_transcript_getYoutubeTranscript
The timed transcript of a video.
Check
selectedin the response before you trust the language. Asking for alanguageCodethe video does not carry neither fails nor returns empty, it quietly falls back to the default track. Every entry in the list carrieslanguageNameandlanguageCode, and one language can appear twice, once human-authored and once withtypeset toasr.
Prompts and resources
The server ships 2 prompts, ready-made workflows a client can offer instead of making the user compose a tool call.
Alongside them the server exposes 10 resources, one per parameter whose accepted values are a fixed list. Reading one is cheaper than learning the vocabulary from a rejected call, and it costs no credits. Each URI is hasdata://youtube/<parameter>.
Both lists are served without an API key, so a client can read them before a user has signed up.
Errors and failure paths
Your client almost never sees an HTTP error code from a tool call. The MCP layer answers 200 and puts the failure inside the result, with isError set to true and the reason as text. The agent reads a message where you might expect a status line.
A wrong key surfaces as tool output, not as a failed connection. tools/list accepts any non-empty key and returns all four tools, so the client completes its handshake and shows green. The first tool call then comes back with isError: true and the text HasData API error: 401 Unauthorized. Watch for that string, because nothing earlier in the flow reports the problem.
A missing key is the one real HTTP error. Authorization runs before any tool, and the connection itself fails with 401. CORS headers are present, and a browser client reads the status and not an opaque network failure.
An argument that breaks a tool's schema is rejected before it becomes a scrape. The server answers with isError: true and the text MCP error -32602: Input validation error, naming the offending field. Nothing is fetched and nothing is charged. The message names the field but not the accepted values, so the parameter tables above are the reference.
A call that succeeds and finds nothing is the case that trips people up. It arrives as an ordinary result with requestMetadata.status set to ok and the data key simply missing. Nothing in the body says the result was empty. Test for the field you need, not for an error.
An identifier the platform rejects returns 400 with requestMetadata.status set to error. A channel handle that does not exist is the usual way to see this.
Results that carry data also carry a requestMetadata.id worth quoting in support.
Pricing, free tier and limits
Every YouTube tool costs 10 credits per successful call. Response size does not change the price. A full page of search results costs the same as a page with one video.
The free tier is 1,000 credits every month with no card, which is 100 YouTube calls. It renews with the billing cycle, so a low-volume agent runs on the free tier indefinitely.
Paid plans start at $59 a month for 200,000 credits, which is 20,000 calls. The unit price falls with volume, from $2.95 per 1,000 calls on the entry plan to $1.19 on Basic and $0.83 across the Growth tiers. Current figures live on the pricing page.
Your plan also sets concurrency. The free tier allows 5 requests at a time, Startup 5, Basic 15, and the Growth tiers run from 50 to 500. Handle the overflow case defensively in anything unattended, because an agent that fans out will reach the ceiling before you do.
A request that comes back non-200 is not billed. A successful call that finds nothing is still a call.
Tool selection
The apis query parameter decides which tools your agent sees. Fewer tools means less context spent on tool definitions, and fewer chances for the model to reach for the wrong one.
The parameter takes provider names like youtube and individual API names like google_maps_search. Misspelled names are ignored. If every name is wrong the request fails with 400, and the body lists both what it did not recognise and every valid value. Drop the parameter and the same endpoint exposes all 57 HasData tools.
How it compares
Against the official YouTube Data API v3:
The last two rows matter. If the daily quota covers your volume and you own the channel you are querying, the official API is the cheaper answer and you should take it.
Most other YouTube MCP servers do transcripts only. This one also searches, reads videos with their engagement numbers, and walks channel tabs, so an agent runs a whole research pass without a second server.
What this server does not do. No comments, no channel management, no uploads, no analytics, no private data. It reads what a signed-out visitor can see.
FAQ
Is there an official YouTube MCP server?
Google does not publish one. YouTube has no first-party MCP server. Every option is built by somebody else, either around the YouTube Data API v3 or around the public pages. This one is maintained by HasData and reads public pages, which is why it needs no Google credentials.
What is a YouTube MCP server?
A server that exposes YouTube data as tools an AI client can call. The client sends a tool call over the Model Context Protocol, the server fetches the data and returns structured JSON, and the model works with the result and never sees a page of HTML. This one exposes four tools and runs remotely. The client connects to a URL and starts no local process.
Do I need a YouTube API key or a Google Cloud project?
No. The only credential is your HasData key. There is no Google Cloud project to create, no quota form to fill in and no OAuth consent screen, because the tools read public YouTube pages and not the YouTube Data API.
Do I need to host or run anything?
No. This is a remote MCP server on streamable HTTP. Nothing to install, no container to keep warm, no process to restart.
Is the data live or cached?
Live. Each call fetches the page at request time and carries its own requestMetadata.id. Two identical calls are two separate fetches and not a replay of a stored copy. Counters like views and likes track the page, so they move as the page moves.
What happens when YouTube changes its layout?
Nothing on your side. We track the changes and keep the response schema stable, so field names and types stay put. A field with no value is absent from the item, not present and null. Read optional fields with a default.
Can I use this together with other HasData APIs?
Yes. The apis parameter takes a list, and ?apis=youtube,google_serp gives your agent the four YouTube tools plus Google search. Drop the parameter and you get everything.
Can I get a transcript for any video?
Only where the video has one, and availableTranscripts tells you what exists before you ask.
Can I sign in with OAuth instead of pasting a key?
Yes, in clients that support it. Claude Desktop and Cursor can add the endpoint as a connector and sign in. Unattended agents and scripts use the x-api-key header.
Compliance and personal data
HasData accesses publicly available data only. A platform's terms may restrict automated access, and you are responsible for your own compliance. Where the data you collect includes personal information, make sure you have a lawful basis for it under GDPR, CCPA or the equivalent rules in your jurisdiction.
HasData links
Development
This repository is configuration and documentation for a remote server. There is no build step and nothing to containerize.
The tests in test/ assert the tool contract, the part that can break without a commit here. They check that ?apis=youtube returns exactly four tools, that every tool still declares its required parameter, that no name changed, and that the key in use is actually accepted. That last check calls a tool for real and costs 10 credits, which is the price of a canary that can fail for the right reason.
The same suite runs in CI on every push and once a week on a schedule, because the upstream tool list can change without anyone touching this repository. A failure means the tool list moved, the key stopped working, or the endpoint was unreachable, and the assertion message says which.
Contributing
Corrections to the tool tables and the response samples are the most useful contribution, because those are the parts that drift. Include the call you made and the response you got. Pull requests from forks run the suite without a key, and the live checks skip instead of going red.
License
MIT. See LICENSE.
来源:README.md,提交 636ce79
工具
0版本历史
3- v1.0.9最新Sep 24, 2026
- v1.0.8Sep 22, 2026
- v1.0.7Sep 16, 2026
评分
已满足适用检查项的 85%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具必需15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Hasdata 集成

HasData Airbnb
com.hasdata官方发布者
HasData 托管的 Airbnb MCP 服务器,提供两个只读工具,让助手按地点或地图区域搜索房源,并以 JSON 读取房源详情。

HasData Google Flights Deals
com.hasdata官方发布者
HasData 托管服务器,提供一个 Google Flights Deals 工具,把自然语言描述的旅行想法变成带日期的票价、航司、经停和预订链接。

HasData ChatGPT
com.hasdata官方发布者
HasData 托管服务器,让助手匿名向 ChatGPT 提问,并返回 Markdown 答案及其参考的网页来源。

HasData Google Hotels
com.hasdata官方发布者
HasData 托管服务器,提供一个 Google Hotels 工具,让助手搜索酒店和度假短租,并查看某房源在各预订网站的价格。

HasData Zillow
com.hasdata官方发布者
HasData 提供的托管服务,让助手以结构化 JSON 搜索 Zillow 在售、出租和已售房源,并读取完整房产详情。