Claude Code - Pydantic Model Serialization Breaks MCP Server Request Validation

Resolved 💬 3 comments Opened Aug 21, 2025 by hjain-perforce Closed Aug 25, 2025

Bug Description
When interacting with the MCP server, Claude Code serializes Pydantic model objects into JSON strings instead of passing them as proper Python dictionary objects. This behavior leads to validation errors on the server side because the expected input type is not being respected.

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 1.0.86
  • Feedback ID: 4e49e95b-7c27-4470-bda7-2d796af699ec

Errors

[Error: Input validation error: '{\n  "action": 
     "info"\n}' is not of type 'object']

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗