continuedev/continue · error · Error
No MCP authorization code found for ${serverUrl}
Error message
No MCP authorization code found for ${serverUrl} What it means
Non-2xx from the Codestral FIM rawPredict endpoint on Vertex. Unlike the chat paths, only status/statusText are included — no response body — which makes diagnosis harder since Google's detailed error JSON is dropped.
Source
Thrown at core/context/mcp/MCPOauth.ts:306
const contexts = Array.from(authenticatingContexts.entries());
if (contexts.length === 1) {
[serverUrl, context] = contexts[0];
}
}
if (!context || !serverUrl) {
console.error("No matching authenticating context found for state:", state);
return;
}
const { ide, serverId } = context;
try {
if (!serverUrl) {
throw new Error("No MCP server url found for authentication");
}
if (!authorizationCode) {
throw new Error(`No MCP authorization code found for ${serverUrl}`);
}
// Close the server before processing auth
if (serverInstance) {
await new Promise<void>((resolve) => {
serverInstance!.close(() => {
console.debug("Server for MCP Oauth process was closed");
serverInstance = null;
resolve();
});
});
}
const authProvider = new MCPConnectionOauthProvider(serverUrl, ide);
await authProvider.ensureRedirectUrl();
const authStatus = await auth(authProvider, {
serverUrl,
authorizationCode,View on GitHub (pinned to 5522c6f44c)
Solutions
- Reproduce the same body with curl using a fresh token to capture the response body Google returns
- Check quota and model enablement for codestral in the project/region
- Wrap fimStream calls in retry with backoff for 429/5xx
- Consider patching the adapter to include await response.text() in the message for better diagnostics
Defensive patterns
Strategy: retry
Try / catch
try { for await (const c of api.fimStream(body, signal)) {} } catch (e) { const m = (e as Error).message; if (/429|5\d\d/.test(m)) await retryWithBackoff(); else throw e; } Prevention
- Since the error omits the body, log request context (model, project, region) when it fires
- Reproduce failures with curl to capture Google's detailed error
- Throttle FIM request rates (IDE autocomplete is bursty)
When it happens
Trigger: Auth/quota/project issues on the FIM request: expired token, missing aiplatform.user role, model not deployed/enabled, 429 rate limit.
Common situations: FIM works then starts failing after token expiry; Codestral not enabled in Model Garden for the project; sustained IDE autocomplete traffic hitting quota.
Related errors
- No MCP server url found for authentication
- Unsupported transport type: ${this.options.type}
- Error getting prompt: MCP Connection ${serverName} not found
- Failed to fetch messages: ${response.statusText}
- URL is not defined in params
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/3cd9543c65e2dfad.
Report an issue: GitHub.