Skip to content

fix: default MCP baseUrl to www (apex redirect was dropping auth)#1

Open
Afaqak wants to merge 1 commit into
mainfrom
fix/mcp-base-url-www-redirect
Open

fix: default MCP baseUrl to www (apex redirect was dropping auth)#1
Afaqak wants to merge 1 commit into
mainfrom
fix/mcp-base-url-www-redirect

Conversation

@Afaqak

@Afaqak Afaqak commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Problem

With a valid API key, every MCP tool call failed: get_transcript / get_stats / list_transcripts returned 401, and transcribe_v2 returned 405.

Root cause

The default baseUrl is the apex https://youtubetranscript.dev, which 301-redirects to www. On that redirect fetch:

  • drops the Authorization header (cross-host hop) → upstream sees no auth → 401
  • downgrades POST→GET/api/v2/transcribe is POST-only → 405

Verified: GET https://www.youtubetranscript.dev/api/v1/credits with Bearer → 200; apex → 301 → www.

Fix

Default baseUrlhttps://www.youtubetranscript.dev in server-http.ts, mcp.ts, index.ts, and the docker-compose.yml default. No redirect, auth + method preserved.

Verified end-to-end through the built code: get_stats and transcribe_v2 both return 200.

Deployments should also set YTSM_BASE_URL=https://www.youtubetranscript.dev (or redeploy from this branch).

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant