npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

youtube-captions-mcp

v1.0.0

Published

MCP server that lets Claude read YouTube video transcripts, metadata, and search inside captions. No API key required.

Readme

youtube-captions-mcp

An MCP server that lets Claude read YouTube video transcripts, metadata, and search inside captions. Works with Claude Code, Claude Desktop, Claude.ai custom connectors, Cursor, and any other MCP-aware client.

No YouTube Data API key required. Metadata comes from the public oEmbed endpoint; captions come from YouTube's internal player API.

Tools

| Tool | Description | Arguments | | --- | --- | --- | | get_transcript | Full transcript as plain text with [H:MM:SS] timestamps | url (YouTube URL or 11-char ID), language? (BCP-47 code) | | get_video_info | Title, channel, description, duration, thumbnail, available caption languages | url | | search_transcript | Substring search across transcript segments, returns matches with timestamps | url, query, language?, limit? |

All tools accept either a full URL (https://www.youtube.com/watch?v=..., https://youtu.be/..., /shorts/..., /embed/..., /live/...) or a bare 11-character video ID. Errors for private videos, missing captions, and invalid URLs are surfaced with stable [CODE] prefixes so callers can branch on them.

Quick start — Claude Code

One command:

claude mcp add youtube-captions -- npx -y youtube-captions-mcp

Restart Claude Code and you can now ask things like:

Summarise https://www.youtube.com/watch?v=qp0HIF3SfI4 in 5 bullet points.

Find the part where Simon Sinek talks about "Martin Luther King" in that video and quote it.

Quick start — Claude Desktop

Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json) and add:

{
  "mcpServers": {
    "youtube-captions": {
      "command": "npx",
      "args": ["-y", "youtube-captions-mcp"]
    }
  }
}

Restart Claude Desktop. The three tools will appear in the tools drawer.

Manual install (from source)

git clone <this repo>
cd server
npm install
npm run build

Then point your MCP client at the absolute path of dist/index.js:

{
  "mcpServers": {
    "youtube-captions": {
      "command": "node",
      "args": ["/absolute/path/to/server/dist/index.js"]
    }
  }
}

Connect to Claude.ai (custom connector, SSE)

Claude.ai's remote MCP connectors speak HTTP + SSE. Run the SSE entry:

npm run start:sse             # listens on http://localhost:3333/sse
PORT=8080 npm run start:sse   # override the port

Expose it on a public URL (e.g. with ngrok http 3333 or a reverse proxy), then add it as a custom connector in Claude.ai:

  • Name: yt-transcript
  • URL: https://<your-public-host>/sse

The server keeps one MCP session per SSE connection; POST /messages?sessionId=... is used internally by the SDK for client→server messages. A GET /healthz endpoint reports status and active session count for basic monitoring.

Security note: the SSE entry has no authentication. Only expose it on trusted networks, or front it with a proxy that enforces auth if you are putting it on the public internet.

Development

npm run dev      # tsc --watch
npm run start    # runs dist/index.js (stdio)
npm run clean    # rm -rf dist

Error codes

All tool errors are prefixed with a stable code in square brackets:

  • INVALID_URL — not a recognisable YouTube URL or ID
  • VIDEO_UNAVAILABLE — removed, age-gated, region-blocked, etc.
  • VIDEO_PRIVATE — video exists but is marked private
  • NO_CAPTIONS — the video has no captions at all
  • LANGUAGE_UNAVAILABLE — the requested language track does not exist
  • METADATA_FETCH_FAILED — both oEmbed and the watch page failed to load
  • TRANSCRIPT_FETCH_FAILED — underlying transcript fetch threw an unknown error