Summary
MCP parameter serialization fails consistently on consecutive function calls in both Claude Code and Claude Desktop, making MCP tools effectively unusable for any workflow requiring multiple parameter-based calls.
Environment
- Platform: Claude Desktop (not Claude Code CLI)
- Operating System: Windows
- MCP Servers Tested: mcp-db-server, filesystem
- Issue Scope: Affects ALL MCP servers requiring parameters
Bug Description
Pattern of Failure:
- ✅ First call with parameters: SUCCESS
- ❌ Subsequent calls with parameters: FAIL with "Cannot convert undefined or null to object"
- ✅ Calls without parameters: SUCCESS (always work)
Reproduction Steps
- Make any successful MCP call with parameters (e.g.,
mcp-db-server:commandwith SQL) - Attempt a second MCP call with parameters (e.g.,
mcp-db-server:querywith SQL) - Result: Second call fails with "Cannot convert undefined or null to object"
- Make a call without parameters (e.g.,
mcp-db-server:get_database_info) - Result: Call without parameters succeeds
Tested MCP Functions
Database Server (mcp-db-server):
get_database_info(no params): ✅ Always workscommand(sql param): ✅ First call works, ❌ subsequent calls failquery(sql param): ✅ First call works, ❌ subsequent calls fail
Filesystem:
list_allowed_directories(no params): ✅ Always workslist_directory(path param): ❌ Fails immediately after any previous param callget_file_info(path param): ❌ Fails immediately after any previous param call
Critical Impact
- Makes MCP unusable: Any workflow requiring >1 parameter call fails
- Affects both major Claude interfaces: Claude Code AND Claude Desktop
- Production blocker: Cannot build reliable automations with MCP
- Cross-platform issue: Not limited to specific OS or setup
Related Issues
This appears related to #3966 and #2089, but is more severe as it affects Claude Desktop users as well, indicating a fundamental problem with Claude's MCP parameter serialization architecture.
Expected Behavior
All MCP calls with proper parameters should succeed regardless of call order or previous calls.
Actual Behavior
Only the first parameter-based MCP call in a session succeeds; all subsequent parameter calls fail with serialization errors.
Workaround
Currently requires restarting the entire Claude session after each parameter-based MCP operation, making MCP impractical for real workflows.
Priority: Critical - This affects the core functionality of MCP across all Claude interfaces.