1. Home
  2. Documentation
  3. Errors

Errors

MCPTube error codes on MCP and the REST API: invalid key, quota exhausted, plan limit, unavailable video, YouTube blocks and the service being temporarily down.

On MCP, tool errors come back as a result with isError: true and the message in the text; transport errors use HTTP status codes and JSON-RPC codes. On the REST API, the body is always {"error": {"code", "message"}}, with stable codes you can handle in your code.

SituationRESTCounts toward quota
Invalid, revoked or expired key or token401 unauthorizedNo
Invalid parameter400 invalid_requestNo
Invalid URL or playlist400 invalid_urlNo
Missing, private or unavailable video404 video_unavailableNo
Plan refusal: length, AI transcription outside Pro or monthly cap403 plan_limitYes
IP blocked for abuse403 bannedNo
Daily quota used up429 quota_exceededNo
Too many failed attempts in a short time429 failures_exceededNo
YouTube refused the server503 youtube_blockedNo
Service unavailable (database)503 service_unavailableNo
Internal error500 internalNo

On MCP, calls without credentials work on the anonymous plan. The 401 with the WWW-Authenticate header, which starts the OAuth login, comes with invalid credentials, with ?login=1 or when a request goes beyond the anonymous plan.

429 Too Many Requests (REST)
{
  "error": {
    "code": "quota_exceeded",
    "message": "Daily limit of 20 calls reached. The quota resets at 0h UTC. Your plan: Free. The Pro plan has higher limits and AI transcription: https://mcptube.com/en"
  }
}
Result with isError (MCP)
{
  "isError": true,
  "content": [{
    "type": "text",
    "text": "Error: Daily limit of 20 calls reached. The quota resets at 0h UTC. Your plan: Free. The Pro plan has higher limits and AI transcription: https://mcptube.com/en"
  }]
}
On 503, wait a few seconds and repeat the call. If a Retry-After header comes back, wait that long.