Claude Desktop MCP tool parameter serialization bug - objects stringified instead of preserved

Resolved 💬 3 comments Opened Oct 25, 2025 by geosp Closed Oct 28, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Bug Report Summary:

  • Title: Claude Desktop MCP tool parameter serialization bug - objects stringified instead of preserved
  • Component: Claude Desktop, MCP tool calling parameter serialization
  • Severity: High (breaks MCP tools that require object parameters)

Description:
Claude Desktop is incorrectly serializing complex object parameters when calling MCP tools. Object parameters are being converted to JSON strings instead of being preserved as objects in the JSON payload sent to the MCP bridge.

Example:

  • Expected: "arguments":{"filter":{"lastName":"Fajardo"}}
  • Actual: "arguments":{"filter":"{\"lastName\":\"Fajardo\"}"}

Impact:

  • MCP servers reject these calls with "Input validation error"
  • Any MCP tool with object-type parameters fails (like the Spark API's list_users filter)
  • Workaround requires MCP bridges to manually deserialize stringified parameters

Affected Version:

  • Claude Desktop (version: [specify your version])

What Should Happen?

Suggested Fix:
Ensure the tool parameter serialization layer preserves complex object types through the JSON encoding/decoding pipeline instead of stringifying them.

Error Messages/Logs

2025-10-25T06:23:41.852Z [info] [spark-mcp] Message from client: {"method":"tools/call","params":{"name":"list_users","arguments":{"limit":100,"filter":"{\"lastName\": \"Fajardo\"}"}},"jsonrpc":"2.0","id":7}
2025-10-25T06:23:41.866Z [info] [spark-mcp] Message from server: {"jsonrpc":"2.0","id":7,"result":{"content":[{"type":"text","text":"Input validation error: '{\"lastName\": \"Fajardo\"}' is not valid under any of the given schemas"}],"isError":true}}
2025-10-25T06:59:25.551Z [info] [spark-mcp] Message from client: {"method":"tools/call","params":{"name":"list_users","arguments":{"limit":100,"filter":"{\"lastName\":\"Fajardo\"}"}},"jsonrpc":"2.0","id":8}
2025-10-25T06:59:25.571Z [info] [spark-mcp] Message from server: {"jsonrpc":"2.0","id":8,"error":{"code":-32603,"message":"Client error '400 Bad Request' for url 'http://fedora:3000/mcp'\nFor more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400"}}

Steps to Reproduce

Steps to Reproduce:

  1. Call an MCP tool with an object parameter (e.g., filter: {key: value})
  2. Observe the MCP server receives the parameter as a stringified JSON instead of an object
  3. Server validation fails due to incorrect parameter type

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Claude 0.13.106 (5d3acd) 2025-10-16T23:49:41.000Z

Platform

Other

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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