youtube-mcp-server
youtube-mcp-server
Streamable HTTP를 통해 YouTube Data API v3를 도구로 노출하는 원격 MCP 서버로, claude.ai에 사용자 지정 커넥터로 추가할 수 있습니다.
의존성이 없습니다. 빌드 단계가 없습니다. node src/server.js가 전부입니다.
도구
도구 | 기능 | 할당량 비용 |
| 한 국가에서 가장 인기 있는 동영상. 선택적으로 하나의 카테고리로 필터링 | 1 유닛 |
| 동영상, 채널 또는 재생목록에 대한 키워드 검색, 통계 포함 | 검색 호출 1회 + 1 유닛 |
| 채널의 최근 업로드와 총 구독자/조회수 | 3 유닛 |
| 최대 50개 동영상의 전체 통계를 한 번의 호출로 | 1 유닛 |
| 좋아요 및 답글 수가 포함된 최상위 댓글 | 1 유닛 |
자막은 의도적으로 포함하지 않았습니다. captions.download는 OAuth 및 동영상에 대한 편집 권한이 필요하므로, API 키로는 본인이 소유한 동영상의 자막만 가져올 수 있습니다. 비공식 스크래핑 라이브러리는 클라우드 IP 대역에서 차단된다는 보고가 널리 있으며, 바로 이 서버가 실행되는 환경입니다.
Related MCP server: mcp-server-youtube
할당량
프로젝트는 일반 버킷에서 하루 10,000유닛을 받으며, search.list는 하루 100회로 제한된 별도의 버킷에 있습니다. 이것이 도구 설계를 결정했습니다. youtube_channel_videos는 search.list?channelId= 대신 channels.list → playlistItems.list → videos.list 순서로 호출하므로, 채널을 탐색하는 데 하루 100회뿐인 검색 중 하나가 아니라 일반 유닛 3개만 사용합니다.
로컬에서 실행
cp .env.example .env # add your YOUTUBE_API_KEY
export $(grep -v '^#' .env | xargs)
npm startcurl localhost:3000/health
curl -s localhost:3000/mcp \
-H 'content-type: application/json' \
-H 'accept: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | head -c 400테스트
npm test스텁(stub) YouTube API를 대상으로 전체 MCP 핸드셰이크, 두 전송 모드, 다섯 가지 도구와 오류 경로를 모두 실행합니다. API 키와 네트워크가 필요 없습니다.
Railway에 배포
이 저장소를 GitHub에 푸시하세요.
Railway → New Project → Deploy from GitHub repo → 해당 저장소를 선택하세요.
Variables →
YOUTUBE_API_KEY를 추가하세요.Settings → Networking → Generate Domain.
https://<your-domain>/health가"apiKeyConfigured": true를 반환하는지 확인하세요.
Railway가 PORT를 직접 설정합니다. 서버는 0.0.0.0에 바인딩하고 이를 읽습니다.
claude.ai에 추가
Customize → Connectors → Add custom connector → https://<your-domain>/mcp
OAuth 필드는 필요 없습니다. 서버는 기본적으로 인증 없이 동작합니다. 잠그려면 MCP_AUTH_TOKEN을 설정하고 커넥터의 Request 헤더에서 authorization 아래에 Bearer <token>을 넣으세요.
환경 변수
변수 | 필수 | 기본값 | 참고 |
| 예 | — | Google Cloud Console, YouTube Data API v3 활성화됨 |
| 아니요 | 3000 | Railway가 설정 |
| 아니요 |
| MCP 엔드포인트가 수신 대기하는 경로 |
| 아니요 | — | 설정하면 모든 요청에 |
| 아니요 | Google의 것 | 테스트 스위트가 스텁을 가리키는 데만 사용 |
설계 노트
무상태(Stateless)입니다. 각 POST는 독립적이며, Mcp-Session-Id도 세션 맵도 없습니다. 따라서 재시작이나 두 번째 복제본이 생겨도 "No valid session ID provided"가 발생하지 않습니다.
콘텐츠 협상은 참조 SDK와 일치합니다. 클라이언트가 Accept: text/event-stream을 보내면 SSE 프레임을, 그 외에는 일반 JSON 본문을 반환합니다.
/mcp에 대한 GET과 DELETE는 405를 반환합니다. 이는 서버 시작 스트림도 닫을 세션도 없는 서버에 대해 Streamable HTTP 스펙이 기대하는 동작입니다.
Origin 헤더 검증도 DNS 리바인딩 보호도 없습니다. 이러한 방어 기능은 localhost에 바인딩된 MCP 서버를 위한 것입니다. 공개 배포에서 이를 켜 두면 Anthropic의 자체 요청도 거부하며, 이는 initialize 시간 초과의 흔한 원인입니다.
도구 실패는 JSON-RPC 오류 대신 isError: true 콘텐츠로 반환됩니다. 따라서 호출이 전송 계층에서 중단되는 대신 Claude가 무엇이 잘못되었는지 읽고 조정할 수 있습니다.
결과는 120k 문자로 잘리며, 이는 claude.ai의 약 150k 도구 결과 상한보다 낮습니다.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents. No signup.
Provide token-optimized, structured YouTube data to enhance your LLM applications. Access efficien…
YouTube transcripts, search, channels, playlists and bulk transcript jobs for AI agents. 14 tools.
Personal YouTube AI knowledge base powered by RAG. Query your subscribed YouTube channels.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interaction with YouTube through the YouTube Data API, allowing users to search for videos, playlists, and channels, generate video titles using AI, and manage YouTube content through natural language commands.22
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to search videos, read channels, browse playlists, fetch comments, and get transcripts from YouTube using the YouTube Data API v3 and InnerTube API for captions.2GPL 3.0
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to search videos, channels, and playlists, retrieve video metadata, transcripts, and comments via the YouTube Data API v3.71
- FlicenseNot gradedqualityBmaintenanceEnables searching and retrieving video transcripts, metadata, channel info, playlists, comments, trending videos, and engagement analytics from YouTube through natural language.57
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BismaNwaz/-youtube-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server