-
Notifications
You must be signed in to change notification settings - Fork 149
Description
Bug Description
Claude Desktop (Windows) v1.0.1768 fails to compile MCP tool schemas that contain complex outputSchema definitions with nested $defs and $ref references. This prevents MCP tools from being usable despite successful server startup and tool registration.
Environment
- OS: Windows Server 2022 Enterprise (VMware VM)
- Claude Desktop Version: 1.0.1768
- Architecture: x64
- Node Version: 22.21.1 (bundled)
Affected MCP Servers
@modelcontextprotocol/server-postgres(v1.22.0)@modelcontextprotocol/server-filesystem(Extension v0.2.0)mcp-server-jetbrains
All servers use complex outputSchema with $defs sections.
Symptoms
- MCP servers start successfully ✅
- MCP protocol handshake completes ✅
- Tools are registered successfully ✅
- BUT: Frontend shows 50+ schema compilation errors ❌
- Tool calls timeout after ~5 minutes ❌
- No
tools/callrequests ever reach MCP servers ❌
Error Logs
From claude_ai-web.log:
[error] Error compiling schema, function code: var refVal1 = refVal[1]; var validate = function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; var vErrors = null; var errors = 0; if (rootData === undefined) rootData = data; var errs_1 = errors; var errs_2 = errors; if ((typeof data !== "number" || (data % 1) || data !== data)) { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + "" , schemaPath: '#/definitions/nonNegativeInteger/type' , params: { type: 'integer' } , message: 'should be integer' } ]; return false; }...
Repeated 50+ times for different schema definitions
MCP Communication Flow
✅ 1. Server starts: postgres-mcp v1.22.0
✅ 2. Handshake: {"method":"initialize",...}
✅ 3. Server responds: {"result":{"protocolVersion":"2025-06-18",...}}
✅ 4. tools/list request sent
✅ 5. Server returns tools with complex outputSchema containing $defs
❌ 6. Frontend attempts schema compilation → FAILS
❌ 7. User initiates tool call → Frontend sends COMPLETION request to claude.ai
❌ 8. Request times out after ~5 minutes: "TypeError: Failed to fetch"
❌ 9. No tools/call request ever sent to MCP server
Example Problematic Schema
From PostgreSQL MCP server tools/list response:
{
"name": "list_schemas",
"outputSchema": {
"$defs": {
"Annotations": {
"properties": {
"priority": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{"type": "null"}
]
}
}
},
"TextContent": {...},
"EmbeddedResource": {
"properties": {
"resource": {
"anyOf": [
{"$ref": "#/$defs/TextResourceContents"},
{"$ref": "#/$defs/BlobResourceContents"}
]
}
}
}
},
"properties": {
"result": {
"items": {
"anyOf": [
{"$ref": "#/$defs/TextContent"},
{"$ref": "#/$defs/ImageContent"}
]
}
}
}
}
}Reproduction Steps
- Install Claude Desktop v1.0.1768 on Windows
- Configure
claude_desktop_config.json:
{
"mcpServers": {
"postgres": {
"command": "uvx",
"args": ["mcp-server-postgres", "postgresql://user:pass@host:5432/db"]
}
}
}- Start Claude Desktop
- Observe in logs:
main.log: Servers start successfullymcp.log: tools/list returns schemas with $defsclaude_ai-web.log: 50+ "Error compiling schema" errors
- Attempt to use any tool → Timeout after 5 minutes
Expected Behavior
- Schema validator should handle JSON Schema Draft-07 with
$defs - Tool calls should be sent to MCP servers
- Tools should execute successfully
Actual Behavior
- Schema compilation fails silently
- Frontend never sends
tools/callrequests to MCP servers - User sees "Claude is not available" after 5-minute timeout
Workaround
None found. MCP tools are completely unusable in Claude Desktop v1.0.1768 on Windows when servers use complex outputSchemas.
Additional Context
- Problem occurs with all MCP servers that use
$defsin outputSchema - Problem persists even without Filesystem Extension
- Network connectivity confirmed working (corporate proxy configured correctly)
- MCP servers themselves work correctly (verified by examining stdio communication)
- Schema validator appears to choke specifically on
nonNegativeIntegertype definitions and nested$refstructures
Logs Available
Can provide full logs if needed:
main.log- Startup sequencemcp.log- MCP protocol communicationclaude_ai-web.log- Frontend errorsmcp-server-*.log- Individual server logs
Request
Please investigate the JSON Schema validator used in Claude Desktop Windows build. The validator appears incompatible with the schema format used by official MCP servers from @modelcontextprotocol.