fix: default MCP baseUrl to www (apex redirect was dropping auth)#1
Open
Afaqak wants to merge 1 commit into
Open
fix: default MCP baseUrl to www (apex redirect was dropping auth)#1Afaqak wants to merge 1 commit into
Afaqak wants to merge 1 commit into
Conversation
The apex host youtubetranscript.dev 301-redirects to www. On that redirect fetch drops the Authorization header (-> 401 on get_transcript/get_stats/ list_transcripts) and downgrades POST->GET (-> 405 on transcribe_v2), which made every MCP tool call fail with a valid API key. Point the default baseUrl (server-http.ts, mcp.ts, index.ts) and the docker-compose default at https://www.youtubetranscript.dev so requests hit the canonical host directly with no redirect. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With a valid API key, every MCP tool call failed:
get_transcript/get_stats/list_transcriptsreturned 401, andtranscribe_v2returned 405.Root cause
The default
baseUrlis the apexhttps://youtubetranscript.dev, which 301-redirects towww. On that redirectfetch:Authorizationheader (cross-host hop) → upstream sees no auth → 401/api/v2/transcribeis POST-only → 405Verified:
GET https://www.youtubetranscript.dev/api/v1/creditswith Bearer → 200; apex → 301 → www.Fix
Default
baseUrl→https://www.youtubetranscript.devinserver-http.ts,mcp.ts,index.ts, and thedocker-compose.ymldefault. No redirect, auth + method preserved.Verified end-to-end through the built code:
get_statsandtranscribe_v2both return 200.🤖 Generated with Claude Code