HasData YouTube — Claude Code MCP server: what it does, install
A read-only MCP server for YouTube search, video and channel details, and transcripts. Use it when an agent needs structured YouTube data.
claude mcp add youtube -e HASDATA_API_KEY=<HASDATA_API_KEY> -- npx -y @hasdata/youtube-mcpWhat HasData YouTube does
HasData YouTube exposes four read-only tools to an MCP client. They cover YouTube search, video details, channel data, and transcript retrieval, with results returned as JSON. The agent selects the relevant tool from the request.
You can connect over streamable HTTP or run the @hasdata/youtube-mcp stdio launcher. A HasData API key must be supplied through HASDATA_API_KEY; a Google Cloud project and a YouTube Data API key are not part of the setup. Without the HasData key, requests are not authorized.
Successful calls cost 10 credits each, and the free allowance is 1,000 credits per month. Multi-step research prompts can therefore use several calls when a search is followed by transcript retrieval.
What it helps with
- search YouTube with topic filters
- read statistics for a video
- inspect a channel and its uploads
- retrieve a video's transcript
- compare related videos using YouTube data
Example prompts for the agent
- Search YouTube for videos about the Model Context Protocol and compare their recurring themes.
- Inspect @GoogleDevelopers and summarize the topics repeated across its recent uploads.
- Read the transcript for video ID
dQw4w9WgXcQand list its main claims.
How to install HasData YouTube
1Platform CLI
claude mcp add youtube -e HASDATA_API_KEY=<HASDATA_API_KEY> -- npx -y @hasdata/youtube-mcpReplace <…> with your own values
2Platform CLI: remote server
claude mcp add --transport http hasdata-youtube 'https://mcp.hasdata.com/mcp?apis=youtube'1Platform CLI: remote server
codex mcp add hasdata-youtube --url 'https://mcp.hasdata.com/mcp?apis=youtube'2Platform CLI
codex mcp add hasdata-youtube --env HASDATA_API_KEY=<HASDATA_API_KEY> -- npx -y @hasdata/youtube-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"hasdata-youtube": {
"url": "https://mcp.hasdata.com/mcp?apis=youtube"
}
}
}{
"mcpServers": {
"hasdata-youtube": {
"command": "npx",
"args": [
"-y",
"@hasdata/youtube-mcp"
],
"env": {
"HASDATA_API_KEY": "<HASDATA_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"hasdata-youtube": {
"type": "http",
"url": "https://mcp.hasdata.com/mcp?apis=youtube"
}
}
}{
"servers": {
"hasdata-youtube": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@hasdata/youtube-mcp"
],
"env": {
"HASDATA_API_KEY": "<HASDATA_API_KEY>"
}
}
}
}Replace <…> with your own values
1Platform CLI: remote server
gemini mcp add -t http hasdata-youtube 'https://mcp.hasdata.com/mcp?apis=youtube'2Platform CLI
gemini mcp add -e HASDATA_API_KEY=<HASDATA_API_KEY> hasdata-youtube npx -y @hasdata/youtube-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about HasData YouTube
How do I install HasData YouTube in Claude Code?
Run claude mcp add youtube -e HASDATA_API_KEY=<HASDATA_API_KEY> -- npx -y @hasdata/youtube-mcp. The command passes the key through an environment variable.
What does HasData YouTube do?
It gives an MCP client read-only access to YouTube search, video and channel information, and transcripts. Results are provided as JSON.
What does HasData YouTube require?
Use an MCP client that supports streamable HTTP with custom headers, or run @hasdata/youtube-mcp through stdio. A HasData API key is required; Google Cloud and YouTube Data API keys are not.