+ Integration Guide

YouTube MCP Server for AI Agents

Connect FetchLayer's YouTube MCP server to Claude Desktop, Cursor, or Claude Code to pull comments and transcripts from any AI agent. Setup, tools, and pricing.

Written by Alex P.

  • MCP
  • YouTube
  • Model Context Protocol
  • AI agent
  • comments
  • transcript

FetchLayer runs a single Model Context Protocol (MCP) server at https://mcp.fetchlayer.dev that gives any MCP-compatible AI agent direct access to public YouTube comments and transcripts — no scraper code, no YouTube Data API quota to manage, no OAuth. The same server also exposes tools for FetchLayer’s other live platforms (Reddit, X/Twitter, App Store, Google Maps, Google Play Store), so if your agent already talks to FetchLayer for one platform, YouTube is already available on the same connection.

This page covers what the YouTube tools do, how to connect them in the clients developers use most, and a couple of realistic things to ask your agent once it’s wired up.

What the server can do

ToolDescription
scrape_youtube_commentsExtract comments from a YouTube video
scrape_youtube_comments/repliesExtract the replies to a single comment
scrape_youtube_transcriptExtract the transcript from a YouTube video

That’s enough for an agent to pull the full comment section of a video (including reply threads), or grab a transcript to summarize, search, or quote from — all as structured JSON, without your agent touching the official YouTube Data API or its quota limits.

Get an API key

Every client needs a FetchLayer API key. Get one free — no credit card required.

Connect it to your client

Every client below uses the same server URL (https://mcp.fetchlayer.dev) and the same Authorization: Bearer ss-your-api-key header. Only the config file location changes.

Claude Desktop

Edit (or create) claude_desktop_config.json:

{
  "mcpServers": {
    "fetchlayer": {
      "url": "https://mcp.fetchlayer.dev",
      "headers": {
        "Authorization": "Bearer ss-your-api-key"
      }
    }
  }
}

Fully restart Claude Desktop (not just close the window) so it picks up the new server.

Cursor

Cursor reads MCP configs from mcp.json, either globally (~/.cursor/mcp.json) or per-project (.cursor/mcp.json). Add:

{
  "mcpServers": {
    "fetchlayer": {
      "url": "https://mcp.fetchlayer.dev",
      "headers": {
        "Authorization": "Bearer ss-your-api-key"
      }
    }
  }
}

Reload the window afterward. If you already have other MCP servers configured, add the "fetchlayer" block alongside them rather than replacing the file.

Claude Code

Fastest path — add it via the CLI:

claude mcp add fetchlayer \
  --transport streamable-http \
  https://mcp.fetchlayer.dev \
  -- --header "Authorization: Bearer ss-your-api-key"

This saves to ~/.claude/settings.json globally. Add --scope project before the URL to scope it to .mcp.json in the current project instead. You can also edit either file by hand with the same mcpServers block shown above for Claude Desktop.

Other MCP clients (Windsurf, VS Code, etc.)

Any client that supports the MCP Streamable HTTP transport works the same way: point it at https://mcp.fetchlayer.dev with the same Bearer header. The config file location is the only thing that differs — check your client’s MCP documentation for where it lives.

What to ask your agent

A few things worth trying once it’s connected:

  • “Pull the top comments on this video and tell me what people are asking for that isn’t in the video.” The agent calls scrape_youtube_comments, reads the returned JSON, and can group requests/complaints without you touching a spreadsheet.
  • “Get the transcript for this video and summarize the three main points.” scrape_youtube_transcript returns the full text; your agent handles the summarization itself.
  • “Check the replies on the top comment and tell me if people agree with it.” scrape_youtube_comments/replies pulls just that thread instead of re-fetching everything.

Because the tools return structured JSON rather than raw HTML, the agent doesn’t need to parse anything — it can go straight from “fetch this video’s comments” to reasoning about the content.

Pricing

MCP usage is billed the same as the REST API: a free tier with no credit card required (50 requests/month via MCP), then pay-as-you-go at $1.99 per 1,000 requests, or a monthly subscription starting at $25/mo if your usage is predictable. See the full pricing page for subscription tiers.

Common issues

  • Tools not showing up in your client? Double-check the config file path for your OS/tool, validate the JSON (watch for trailing commas), and fully restart the app rather than just reloading a window.
  • “Invalid API key” errors? Confirm the key starts with ss- and was copied in full from the FetchLayer dashboard.
  • Need REST instead of MCP? See the YouTube Comments API reference for direct HTTP access to the same data.

What’s Next