continuedev/continue · error · Error
No MCP server url found for authentication
Error message
No MCP server url found for authentication
What it means
FIM (fill-in-the-middle / code completion) on Vertex is only available through Codestral's rawPredict endpoint, so the adapter hard-rejects any model whose name doesn't contain 'codestral' before making the request.
Source
Thrown at core/context/mcp/MCPOauth.ts:303
}
} else {
// Fallback: if no state or single context, use the first one
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();View on GitHub (pinned to 5522c6f44c)
Solutions
- Use a Codestral model id, e.g. 'codestral-2405' / 'mistral-codestral-*' as deployed in your Vertex endpoint
- Route FIM requests for other model families to a provider that supports them (e.g. Mistral direct API)
- Guard at the call site: check model.includes('codestral') before calling fimStream
Example fix
// before
api.fimStream({ model: 'gemini-1.5-pro', prompt, suffix }, signal);
// after
api.fimStream({ model: 'codestral-2405', prompt, suffix }, signal); Defensive patterns
Strategy: validation
Validate before calling
if (!body.model.includes('codestral')) throw new Error('FIM requires a codestral model'); Type guard
const isFimCapable = (m: string): boolean => m.includes('codestral'); Try / catch
try { for await (const c of api.fimStream(body, signal)) {} } catch (e) { if ((e as Error).message.includes('Codestral')) { /* switch model or provider */ } throw e; } Prevention
- Guard autocomplete/FIM call sites with a codestral check
- Route non-codestral FIM to Mistral's direct API
When it happens
Trigger: Calling fimStream with any non-Codestral model: gemini, claude, or a plain mistral model id.
Common situations: Generic completion code pointed at the Vertex adapter with the default chat model; migrating FIM workflows from Mistral's direct API where other models were accepted.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
Related errors
- No MCP authorization code found for ${serverUrl}
- URL is not defined in params
- Response body is null
- Profile ${profileId} not found
- No workspace directories found. Make sure you've opened a fo
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/75112a158b912779.
Report an issue: GitHub.