Skip to content

2026-08-23 · ytapi team

Give Claude and Cursor YouTube access via MCP

One command to add a YouTube transcript tool to your AI coding agents — then just ask in plain language.

Most LLM workflows that touch video content hit the same wall: the model can't read YouTube. MCP (Model Context Protocol) fixes the plumbing — you register a tool server once, and every agent that speaks MCP can call it in plain language.

Add ytapi to Claude Code

shell
claude mcp add ytapi \
  --transport http \
  --header "Authorization: Bearer yta_YOUR_KEY" \
  https://ytapi.dev/api/mcp

That's it. Create a key in the dashboard first (100 free credits on signup). Full reference: MCP docs.

Or Cursor

json
{
  "mcpServers": {
    "ytapi": {
      "url": "https://ytapi.dev/api/mcp",
      "headers": { "Authorization": "Bearer yta_YOUR_KEY" }
    }
  }
}

What you can ask for

Four tools are exposed — transcripts, video metadata, search, and a channel's latest uploads:

  • "Get the transcript of https://youtu.be/VIDEO_ID and summarize the key points"
  • "Find videos about Cloudflare Workers and list their view counts"
  • "What did CHANNEL upload this month? Pull transcripts for anything over 10 minutes"
  • "Summarize this tutorial series into a README"

Tool calls bill exactly like REST calls: 1 credit per successful transcript/metadata/search call, free for channel listings, 0 credits for failures.

Why this beats copy-pasting transcripts

The agent fetches what it needs, when it needs it, with timestamps it can cite. Typical pattern we use ourselves: point Claude at a conference playlist, ask for "a table of every talk with its main takeaway," and let it iterate — each fetch is a cache hit after the first, so the whole run costs a handful of credits.

Beyond chat: programmatic agents

Because the MCP server is plain streamable HTTP JSON-RPC, your own agent code can use it too — no SDK lock-in. initialize, tools/list, tools/call, and you're off.

javascript
const res = await fetch("https://ytapi.dev/api/mcp", {
  method: "POST",
  headers: {
    "content-type": "application/json",
    authorization: "Bearer yta_YOUR_KEY",
  },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "tools/call",
    params: {
      name: "get_transcript",
      arguments: { video: "dQw4w9WgXcQ", lang: "en" },
    },
  }),
});

← All posts