vercel/ai · error · MCPClientError
Server does not support tools
Error message
Server does not support tools
What it means
MCPClientError thrown by DefaultMCPClient.assertCapability when a request method ('tools/list' or 'tools/call') is invoked but the MCP server did not advertise the `tools` capability during the initialize handshake. The client checks `this.serverCapabilities.tools` (captured from the initialize result at mcp-client.ts:660) before sending the request. It fails fast locally instead of sending a request the server will reject.
Source
Thrown at packages/mcp/src/tool/mcp-client.ts:724
: this.transport.send(message, options);
}
private assertCapability(method: string): void {
switch (method) {
case 'initialize':
case 'server/discover':
break;
case 'completion/complete':
if (!this.serverCapabilities.completions) {
throw new MCPClientError({
message: `Server does not support completions`,
});
}
break;
case 'tools/list':
case 'tools/call':
if (!this.serverCapabilities.tools) {
throw new MCPClientError({
message: `Server does not support tools`,
});
}
break;
case 'resources/list':
case 'resources/read':
case 'resources/templates/list':
if (!this.serverCapabilities.resources) {
throw new MCPClientError({
message: `Server does not support resources`,
});
}
break;
case 'prompts/list':
case 'prompts/get':
if (!this.serverCapabilities.prompts) {
throw new MCPClientError({
message: `Server does not support prompts`,View on GitHub (pinned to 69428b1f8b)
Solutions
- Verify the MCP server actually supports tools by inspecting the capabilities object in its initialize response
- Ensure client.init() is awaited before calling tools/list or tools/call so serverCapabilities is populated
- Switch to a server implementation that advertises tool support, or remove the tool calls if the server only offers resources/prompts
- If behind a proxy, check that it forwards the full initialize result unchanged
Example fix
// before: assumes tools exist
const client = new DefaultMCPClient({ url: mcpUrl });
const tools = await client.tools();
// after: initialize first and handle unsupported capability
const client = new DefaultMCPClient({ url: mcpUrl });
await client.init();
try {
const tools = await client.tools();
} catch (error) {
if (MCPClientError.isInstance(error) && error.message.includes('does not support tools')) {
// fall back to a non-tool integration
}
} Defensive patterns
Strategy: try-catch
Validate before calling
await client.init();
// inspect negotiated capabilities if exposed, or track them from the initialize result
const toolsSupported = !!initResult.capabilities?.tools;
if (!toolsSupported) throw new Error('Server does not support tools'); Type guard
function supportsTools(error: unknown): error is MCPClientError {
return MCPClientError.isInstance(error) && error.message.includes('does not support tools');
} Try / catch
try {
const tools = await client.tools();
} catch (error) {
if (MCPClientError.isInstance(error) && error.message.includes('does not support tools')) {
// fallback: use resources/prompts or surface a capability error
} else {
throw error;
}
} Prevention
- Always await init() before any capability-scoped call
- Verify server capabilities in the initialize response during onboarding of a new MCP server
- Keep a capability matrix for the MCP servers you connect to
When it happens
Trigger: Calling client.listTools(), client.tools(), or a tool call ('tools/call') against a server whose initialize result omits `capabilities.tools`. Also occurs when the client was never initialized properly so serverCapabilities remains the empty object {} (mcp-client.ts:424).
Common situations: Connecting to an MCP server that only exposes resources or prompts (e.g. a documentation server); pointing at an older/limited MCP server implementation that predates tool support; forgetting to call init() before using tools so capabilities were never negotiated; proxies/gateways that strip the capabilities object from the initialize response.
Related errors
- Server does not support resources
- Server does not support prompts
- The ACP implementation did not load the active harness-owned
- Unsupported method: ${method}
- Tool "${toolName}" returned structuredContent that does not
AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30).
Data as JSON: /api/errors/e3bfb3dc5f513869.
Report an issue: GitHub.