vercel/ai · error · MCPClientError
Modern MCP result is missing resultType
Error message
Modern MCP result is missing resultType
What it means
MCPClientError thrown inside DefaultMCPClient.request when the negotiated protocol era is 'modern' but the server's response result lacks a `resultType` field. The modern MCP protocol requires results to be tagged with resultType so the client can distinguish normal results from input-required (elicitation) results. A missing resultType means the server is not conforming to the modern protocol shape the client negotiated.
Source
Thrown at packages/mcp/src/tool/mcp-client.ts:862
rejectAndCleanup(error);
};
this.responseHandlers.set(messageId, response => {
if (signal?.aborted) {
cleanup();
return rejectWithAbortError();
}
if (response instanceof Error) {
return rejectAndCleanup(response);
}
try {
if (
this.protocolEra === 'modern' &&
response.result.resultType == null
) {
throw new MCPClientError({
message: 'Modern MCP result is missing resultType',
});
}
if (response.result.resultType === 'input_required') {
throw new MCPClientError({
message:
'Server requested additional input, but multi round-trip requests are not supported yet',
});
}
const result = resultSchema.parse(response.result);
cleanup();
resolve(result);
} catch (error) {
const parseError = MCPClientError.isInstance(error)
? error
: new MCPClientError({
message: 'Failed to parse server response',View on GitHub (pinned to 69428b1f8b)
Solutions
- Upgrade or fix the MCP server so its responses include `resultType` as required by the negotiated modern protocol
- Pin the client and server to compatible MCP protocol versions (verify the version negotiated in initialize)
- Remove any proxy/middleware that alters response bodies, or fix it to pass results through unchanged
- If the server is actually legacy, configure the client to negotiate the legacy protocol era instead
Example fix
// before: mismatched versions
new DefaultMCPClient({ url: mcpUrl, protocolVersion: '2026-xx-modern' });
// after: match server's actual protocol support
new DefaultMCPClient({ url: mcpUrl, protocolVersion: serverSupportedProtocolVersion }); Defensive patterns
Strategy: validation
Validate before calling
const negotiated = initResult.protocolVersion; // from initialize
if (!isModernEra(negotiated) && serverAdvertisesModern) {
throw new Error('Server/client protocol era mismatch; align protocol versions');
} Try / catch
try {
const result = await client.callTool({ name, arguments });
} catch (error) {
if (MCPClientError.isInstance(error) && error.message.includes('missing resultType')) {
// server is not conforming to the negotiated modern protocol:
// pin compatible versions or downgrade negotiation
} else {
throw error;
}
} Prevention
- Keep client and server MCP protocol versions aligned; test after any server upgrade
- Avoid proxies that rewrite response bodies
- Verify server conformance to the negotiated protocol in integration tests
When it happens
Trigger: Sending any request (tools/call, resources/read, prompts/get, etc.) to a server that negotiated the modern protocol but returns legacy-shaped results without `resultType` — typically a server that claims modern protocol support in initialize but implements an older result format.
Common situations: Server version drift: server upgraded or downgraded so its advertised protocol no longer matches its actual response shape; a proxy or middleware rewriting/stripping result envelopes; mixing a modern-era client with a partially compliant server implementation.
Related errors
- Server does not support the requested protocol version: ${th
- Server's protocol version is not supported: ${result.protoco
- ACP MCP server name "ai-sdk-harness-tools" is reserved for H
- ACP MCP server name "ai-sdk-harness-tools" is reserved for H
- The host tool MCP relay is unavailable.
AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30).
Data as JSON: /api/errors/01a52b3fef5ef1b2.
Report an issue: GitHub.