{"_id":"@fakasys/youtube-transcript-mcp","_rev":"2-9b7a41a10b8a23893d4a2fe2bc64702e","name":"@fakasys/youtube-transcript-mcp","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0-stage":{"name":"@fakasys/youtube-transcript-mcp","version":"0.0.0-stage","_id":"@fakasys/youtube-transcript-mcp@0.0.0-stage","stub":true,"maintainers":[{"name":"fakasys","email":"coolc4228@gmail.com"}],"dist":{"shasum":"34329c4b0ef0a2379cb71b87b08ec5fbb3b061e7","tarball":"https://registry.npmjs.org/@fakasys/youtube-transcript-mcp/-/youtube-transcript-mcp-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-w041h+IlgynZzgato0RkK3TpccJCWVC2jNkTvEZgv93y+J8XGXN2IqRrc7czi0+Q5cwTElYxQm9naWugEPMyyg==","signatures":[{"sig":"MEQCID/ART5pxW7E2GpTdZSlRe7haHYgMPQOIKqU+GsjLB4vAiAee2E4NlQxyssyaWguldghW7ix82JZLNK7RjNxfjlKwA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":353},"_npmUser":{"name":"fakasys","email":"coolc4228@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{}},"1.0.0":{"_id":"@fakasys/youtube-transcript-mcp@1.0.0","bin":{"youtube-transcript-mcp":"dist/index.js"},"bugs":{"url":"https://github.com/windows10fan648/youtube-transcript-mcp/issues"},"dist":{"shasum":"6f9ca484eb5478903bea7a7721dbd237bea75373","tarball":"https://registry.npmjs.org/@fakasys/youtube-transcript-mcp/-/youtube-transcript-mcp-1.0.0.tgz","fileCount":23,"integrity":"sha512-QH7cyrXHFRhFfnwHOxAuXUMswNbslei5h40i/Sc9rcn7HVbfH4Kg4tg1z9DFq74QMAJxJEkPvzX+jbylwjLSkg==","signatures":[{"sig":"MEQCIDHsciIObMahkzDg/LOZo7VnFqyaJXE8MrRb9Jy13LsTAiBdSilIWDOwNvEgzIplgUs6lM8VNO9PYRK02zXUokVvFA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDyLl4ZmBHs2N3f38jIvhOj0SesggUE1Et+KZjqYM2DaQIgI6+4Z8xUUTX60+IyVsAxXkA+PyTz54ZSiGzu8rxdF84="}],"unpackedSize":83722},"main":"dist/index.js","name":"@fakasys/youtube-transcript-mcp","type":"module","types":"./dist/index.d.ts","author":{"name":"Windows10Fan"},"gitHead":"ba9c9ca7dcd10a1c14617c8ed5d6433d6d0a56e5","license":"MIT","mcpName":"io.github.windows10fan648/youtube-transcript-mcp","scripts":{"dev":"tsx src/index.ts","test":"tsx test/index.test.ts","build":"tsc","serve":"tsx src/serve.ts","start":"node dist/index.js","prepublishOnly":"npm run build"},"version":"1.0.0","_npmUser":{"name":"fakasys","email":"coolc4228@gmail.com"},"homepage":"https://github.com/windows10fan648/youtube-transcript-mcp#readme","keywords":["mcp","mcp-server","modelcontextprotocol","youtube","transcript","subtitles","claude","chatgpt","cursor"],"repository":{"url":"git+https://github.com/windows10fan648/youtube-transcript-mcp.git","type":"git"},"_npmVersion":"11.20.0","description":"Self-hosted MCP server for fetching public YouTube captions with timestamps.","directories":{},"maintainers":[{"name":"fakasys","email":"coolc4228@gmail.com"}],"_nodeVersion":"26.13.0","allowScripts":{"esbuild@0.28.2":true},"dependencies":{"zod":"^4.6.7","typescript":"^7.0.2","youtube-transcript":"^1.3.1","@modelcontextprotocol/server":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.15"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/youtube-transcript-mcp_1.0.0_1794321577744_0.8433508201965292"}}},"time":{"created":"2026-11-10T14:37:29.171Z","modified":"2026-11-10T14:39:38.069Z","0.0.0-stage":"2026-11-10T14:37:29.171Z","1.0.0":"2026-11-10T14:39:37.833Z"},"description":"Self-hosted MCP server for fetching public YouTube captions with timestamps.","maintainers":[{"name":"fakasys","email":"coolc4228@gmail.com"}],"readme":"# YouTube Transcript MCP Server\r\n\r\nA self-hosted [Model Context Protocol](https://modelcontextprotocol.io/) server that lets MCP clients fetch publicly available YouTube caption tracks with timestamps. It does not transcribe audio. It supports Claude Desktop and other local stdio clients, plus ChatGPT and Claude web/API through a public HTTPS MCP endpoint.\r\n\r\n## How the integrations work\r\n\r\nThere are two connection modes:\r\n\r\n- **Local Claude Desktop, Cursor, VS Code, and similar clients:** the client starts `dist/index.js` over MCP stdio. YouTube requests are made from your computer.\r\n- **ChatGPT custom MCP servers and Claude remote custom connectors:** these clients need an MCP server reachable at a public `https://` URL. Run this server locally and expose port 3000 with a tunnel. The server still fetches YouTube from your computer, so YouTube sees your residential IP rather than a cloud deployment IP.\r\n\r\nThe HTTP endpoint uses the official MCP SDK's **Streamable HTTP** transport. It also keeps a direct REST endpoint for scripts and health checks.\r\n\r\n## Security Notice: Official Hosting\r\n\r\nThis project is self-hosted. The author does not provide an official publicly hosted MCP server.\r\n\r\nFor security and privacy, clone this repository and run the server yourself, or deploy your own instance on infrastructure you control.\r\n\r\n**Be cautious of third-party websites claiming to host this project.** They are not necessarily affiliated with the original project and may run modified code or collect information sent to their servers.\r\n\r\nOfficial source code:\r\nhttps://github.com/windows10fan648/youtube-transcript-mcp\r\n\r\nThe author is not responsible for the security, privacy, or behavior of unofficial third-party deployments.\r\n\r\n## Quick start\r\n\r\n```bash\r\ngit clone https://github.com/windows10fan648/youtube-transcript-mcp.git\r\ncd youtube-transcript-mcp\r\nnpm install\r\nnpm run build\r\nnpm test\r\n```\r\n\r\n## Publish to the MCP Registry\r\n\r\nThis repository includes a `server.json` manifest for the official [MCP Registry](https://registry.modelcontextprotocol.io/). It describes the local **stdio** package; this project does not provide an officially hosted remote endpoint.\r\n\r\nBefore the first registry publication:\r\n\r\n1. Confirm that the npm package name `youtube-transcript-mcp` is available and that you can publish it. If it is unavailable, choose an available package name and update both `package.json` and the `packages[0].identifier` field in `server.json`.\r\n2. Authenticate with npm, then build and inspect the package:\r\n   ```bash\r\n   npm install\r\n   npm run build\r\n   npm pack --dry-run\r\n   npm publish --access public\r\n   ```\r\n3. Install the official `mcp-publisher` CLI from the [MCP Registry releases](https://github.com/modelcontextprotocol/registry/releases).\r\n4. Validate the manifest, authenticate with GitHub, and publish:\r\n   ```bash\r\n   mcp-publisher validate\r\n   mcp-publisher login github\r\n   mcp-publisher publish\r\n   ```\r\n\r\nThe `mcpName` value in `package.json` must match the `name` in `server.json`. Keep the package version in `package.json` and `server.json` synchronized for every release. Publish the npm package before publishing its registry metadata.\r\n\r\n## Claude Desktop over stdio\r\n\r\nAdd the following to Claude Desktop's configuration file:\r\n\r\n- Windows: `%APPDATA%\\Claude\\claude_desktop_config.json`\r\n- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"youtube-transcript\": {\r\n      \"command\": \"node\",\r\n      \"args\": [\"C:/path/to/youtube-transcript-mcp/dist/index.js\"]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nUse an absolute path, restart Claude Desktop, then ask Claude to transcribe a YouTube URL. This mode is local-only and does not make the server available to Claude web.\r\n\r\n## ChatGPT and Claude web/API over HTTPS\r\n\r\nStart the MCP HTTP server:\r\n\r\n```bash\r\nnpm run serve\r\n```\r\n\r\nIn a second terminal, create a public HTTPS tunnel. Specifically use Tailscale Funnel\r\n\r\n```bash\r\ntailscale funnel --bg 3000\r\n```\r\n\r\nUse the resulting URL with `/mcp`, for example:\r\n\r\n```text\r\nhttps://<YOUR_DOMAIN.ts.net/mcp\r\n```\r\n\r\n**Security warning**: Set `MCP_AUTH_TOKEN` before exposing the HTTP endpoint. When set, every HTTP endpoint except CORS preflight requires `Authorization: Bearer <token>`. Anyone who obtains an unprotected tunnel URL may be able to access its tools and consume your server's resources.\r\n\r\nThe server reads an optional YouTube session cookie only from the server-side `YOUTUBE_COOKIE` environment variable (with legacy `COOKIE`/`YT_COOKIE` environment fallbacks). Callers cannot provide or override cookies through query parameters, request bodies, or headers. Never commit or expose these cookies.\r\n\r\n### ChatGPT\r\n\r\nIn ChatGPT, open the custom connector/MCP server area, add the HTTPS `/mcp` URL, and enable the read-only tools. Depending on the ChatGPT surface or workspace, the UI may label this as adding a custom MCP server or creating a plugin. Then ask: `List the available transcript languages for https://www.youtube.com/watch?v=... and summarize it in Spanish.` ChatGPT can call the language-listing tool first, select the exact code, and then fetch that transcript.\r\n\r\nThe server does not run an LLM and does not need an API key. The summary tool fetches the transcript and returns it to ChatGPT with a summarization instruction; ChatGPT itself reads the tool result and writes the summary using the model already powering your conversation.\r\n\r\nFor the OpenAI API, configure a remote MCP tool with the same URL. The server supports Streamable HTTP and returns the transcript as MCP text content.\r\n\r\n### Claude web, Claude Desktop remote connectors, and Claude API\r\n\r\nIn Claude, open **Customize → Connectors → Add custom connector** and enter the public `/mcp` URL. Choose **No sign in** when `MCP_AUTH_TOKEN` is not set; if authentication is enabled, configure the connector to send the bearer token. Claude's remote connector connects from Anthropic's infrastructure, so the tunnel must remain running and publicly reachable.\r\n\r\nFor the Claude API, use the MCP connector with the public HTTPS URL and enable the `list_youtube_transcript_languages`, `get_youtube_transcript`, and `summarize_youtube_transcript` tools. Local stdio servers cannot be connected directly through the Claude API or Claude web's remote connector.\r\n\r\n## Direct REST API\r\n\r\nThe same server exposes optional REST requests:\r\n\r\n```bash\r\nMCP_AUTH_TOKEN='replace-with-a-long-random-token' npm run serve\r\n\r\ncurl -H 'Authorization: Bearer replace-with-a-long-random-token' \\\r\n  'http://localhost:3000/mcp?videoIdOrUrl=dQw4w9WgXcQ'\r\n\r\ncurl -X POST http://localhost:3000/mcp \\\r\n  -H 'Authorization: Bearer replace-with-a-long-random-token' \\\r\n  -H 'Content-Type: application/json' \\\r\n  -d '{\"videoIdOrUrl\":\"dQw4w9WgXcQ\",\"format\":\"text\"}'\r\n```\r\n\r\n## Tool reference\r\n\r\n### `get_youtube_transcript`\r\n\r\n- `videoIdOrUrl` — required YouTube URL or 11-character video ID. Supports watch URLs, `youtu.be`, shorts, embeds, live URLs, and mobile URLs.\r\n- `lang` — optional ISO 639-1/BCP-47 language code, including regional and script codes such as `en`, `pt-BR`, `es-419`, or `zh-Hans`. The server selects the exact exposed caption track and returns an error if it is unavailable; it never silently substitutes another language.\r\n\r\nThe tool returns timestamped plain text, for example:\r\n\r\n```text\r\n[1s] [♪♪♪]\r\n[18s] We're no strangers to love\r\n[22s] You know the rules and so do I\r\n```\r\n\r\n### `summarize_youtube_transcript`\r\n\r\n- `videoIdOrUrl` — required YouTube URL or 11-character video ID.\r\n- `lang` — optional transcript language code, including regional or script codes such as `pt-BR` or `zh-Hans`. This is still caption retrieval; the connected AI performs the summary.\r\n- `style` — optional `brief`, `detailed`, or `bullets` instruction for the connected AI client.\r\n\r\nThis is a client-assisted tool. It retrieves captions but does not transcribe audio or call OpenAI, llama.cpp, Ollama, or any other model itself.\r\n\r\n### `list_youtube_transcript_languages`\r\n\r\n- `videoIdOrUrl` — required YouTube URL or 11-character video ID.\r\n\r\nReturns the caption tracks YouTube exposes, for example `{ \"code\": \"zh-Hans\", \"name\": \"Chinese (Simplified)\", \"kind\": \"standard\", \"isAutoGenerated\": false }`. Pass the returned exact `code` as `lang` to `get_youtube_transcript` or `summarize_youtube_transcript`. If the requested language code is unavailable, the server returns an error listing the available language codes. Use this tool to check available languages before requesting a specific caption track.\r\n\r\n## YouTube access and limitations\r\n\r\nThis project reads publicly available caption tracks, including automatic captions when YouTube exposes them. It does not transcribe audio or bypass private videos, disabled captions, age restrictions, or YouTube authentication. YouTube's official Data API requires authorization for caption-track operations; this server uses YouTube's player caption data and an unofficial Node transcript library instead.\r\n\r\nIf YouTube challenges a cloud-hosted deployment, prefer local stdio or a local tunnel. If you must run in a cloud environment, set `YOUTUBE_COOKIE` in the server environment only; cookies in URLs, request bodies, or caller-controlled headers are intentionally ignored.\r\n\r\nHTTP requests have a 1 MB JSON body limit and server-side request/header timeouts. `PORT` must be an integer from 1 through 65535.\r\n\r\n## Testing\r\n\r\n```bash\r\nnpm run build\r\nnpm test\r\nnpm run serve\r\n```\r\n\r\n## License\r\n\r\nISC\r\n","readmeFilename":"README.md","homepage":"https://github.com/windows10fan648/youtube-transcript-mcp#readme","keywords":["mcp","mcp-server","modelcontextprotocol","youtube","transcript","subtitles","claude","chatgpt","cursor"],"repository":{"url":"git+https://github.com/windows10fan648/youtube-transcript-mcp.git","type":"git"},"author":{"name":"Windows10Fan"},"bugs":{"url":"https://github.com/windows10fan648/youtube-transcript-mcp/issues"},"license":"MIT"}