Commit 4ee89c4
Fix MCP Inspector tools/list validation errors
Resolve "Expected object, received null" errors when listing tools in MCP Inspector:
- Update stdio-wrapper.py JSON fixing logic:
- Add parent_key context to fix_r_json function
- Ensure 'properties' field is never null, always empty object {}
- Preserve arrays for specific MCP keys (tools, resources, content, etc.)
- Keep empty dicts as {} instead of converting to null
- Enhance HTTP transport JSON serialization:
- Add auto_unbox=TRUE to serializer_json() for consistent output
- Ensures proper JSON structure for MCP Inspector compatibility
- Add comprehensive MCP Inspector documentation to README:
- Instructions for both HTTP and stdio transport usage
- Troubleshooting guide for connection issues
- Clear setup steps for testing with MCP Inspector
- Verified native stdio support remains unaffected:
- All tools/list responses have proper inputSchema.properties: {}
- Resources functionality fully preserved
- 129 tests continue to pass
These fixes ensure MCP Inspector can properly validate and display tools
while maintaining full compatibility with native MCP clients.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent d8e5dad commit 4ee89c4
3 files changed
Lines changed: 50 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
| 81 | + | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
374 | 406 | | |
375 | 407 | | |
376 | 408 | | |
377 | 409 | | |
378 | 410 | | |
379 | 411 | | |
380 | 412 | | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
381 | 416 | | |
382 | 417 | | |
383 | 418 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | | - | |
20 | | - | |
21 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | | - | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | | - | |
28 | | - | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
50 | | - | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
61 | | - | |
62 | | - | |
| 64 | + | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
| |||
0 commit comments