Bug Report: MCP Parser Fails on JSON Schema $ref References (Google Stitch)
Description
MiMoCode's MCP client fails to load tools from remote MCP servers that use complex JSON Schema $ref and $defs references in their tool input schemas.
Affected MCP Server
Google Stitch - https://stitch.googleapis.com/mcp
Google Stitch is Google's AI design tool that provides an MCP server for programmatic access.
Error
ERROR service=mcp key=Google Stitch error=can't resolve reference #/$defs/ScreenInstance from id # failed to get tools from client
Steps to Reproduce
- Add Google Stitch MCP to config:
{
"mcp": {
"Google Stitch": {
"type": "remote",
"url": "https://stitch.googleapis.com/mcp"
}
}
}
- Run
mimo mcp list
- Observe the "Failed to get tools" error
Expected Behavior
MiMoCode should parse JSON Schema $ref and $defs references and resolve them correctly, allowing MCP servers with complex schemas to work.
Actual Behavior
The parser fails with can't resolve reference #/$defs/ScreenInstance from id #.
Server Verification
The server responds correctly to raw HTTP requests:
curl -X POST https://stitch.googleapis.com/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","params":{},"id":2}'
Returns 14 tools including create_project, generate_screen_from_text, edit_screens, etc.
Environment
- MiMoCode version: 0.1.5
- OS: Linux
Additional Context
This affects any MCP server that uses JSON Schema $ref for complex type definitions. The Google Stitch schemas are particularly complex with nested references like:
#/$defs/ScreenInstance
#/$defs/DesignSystem
#/$defs/Screen
Bug Report: MCP Parser Fails on JSON Schema
$refReferences (Google Stitch)Description
MiMoCode's MCP client fails to load tools from remote MCP servers that use complex JSON Schema
$refand$defsreferences in their tool input schemas.Affected MCP Server
Google Stitch -
https://stitch.googleapis.com/mcpGoogle Stitch is Google's AI design tool that provides an MCP server for programmatic access.
Error
Steps to Reproduce
{ "mcp": { "Google Stitch": { "type": "remote", "url": "https://stitch.googleapis.com/mcp" } } }mimo mcp listExpected Behavior
MiMoCode should parse JSON Schema
$refand$defsreferences and resolve them correctly, allowing MCP servers with complex schemas to work.Actual Behavior
The parser fails with
can't resolve reference #/$defs/ScreenInstance from id #.Server Verification
The server responds correctly to raw HTTP requests:
Returns 14 tools including
create_project,generate_screen_from_text,edit_screens, etc.Environment
Additional Context
This affects any MCP server that uses JSON Schema
$reffor complex type definitions. The Google Stitch schemas are particularly complex with nested references like:#/$defs/ScreenInstance#/$defs/DesignSystem#/$defs/Screen