[CRITICAL] MCP Parameter Serialization Bug in Both Claude Code and Claude Desktop

Resolved 💬 50 comments Opened Jul 23, 2025 by hyongok2 Closed Jul 23, 2025
💡 Likely answer: A maintainer (ollie-anthropic, collaborator) responded on this thread — see the highlighted reply below.

Critical MCP Parameter Serialization Bug

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

  1. Make any successful MCP call with parameters (e.g., mcp-db-server:command with SQL)
  2. Attempt a second MCP call with parameters (e.g., mcp-db-server:query with SQL)
  3. Result: Second call fails with "Cannot convert undefined or null to object"
  4. Make a call without parameters (e.g., mcp-db-server:get_database_info)
  5. Result: Call without parameters succeeds

Tested MCP Functions

Database Server (mcp-db-server):

  • get_database_info (no params): ✅ Always works
  • command (sql param): ✅ First call works, ❌ subsequent calls fail
  • query (sql param): ✅ First call works, ❌ subsequent calls fail

Filesystem:

  • list_allowed_directories (no params): ✅ Always works
  • list_directory (path param): ❌ Fails immediately after any previous param call
  • get_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.

View original on GitHub ↗

50 Comments

hyongok2 · 11 months ago

Update: Admin Privileges Test Results

Testing Environment: Claude Desktop running with Administrator privileges

Test Results

Ran comprehensive tests with admin privileges to rule out permission-related issues:

Session Start (Fresh)

  1. mcp-db-server:get_database_info (no params) → SUCCESS
  2. mcp-db-server:query with SQL parameter → FAILED ("Cannot convert undefined or null to object")
  3. filesystem:list_directory with path parameter → FAILED
  4. filesystem:list_allowed_directories (no params) → FAILED

Critical Discovery

Even more severe pattern observed:

  • First parameter-less call: Works
  • First parameter call attempt: Fails and corrupts entire MCP session
  • ALL subsequent calls: Fail, even those without parameters

Conclusion

  • Not a permission issue: Admin privileges do not resolve the problem
  • Complete MCP system failure: First parameter call attempt breaks the entire MCP subsystem
  • Session corruption: Once a parameter call fails, even parameter-less calls start failing
  • Confirms fundamental architectural bug: This is a core MCP implementation defect

This makes the issue even more critical as it shows complete MCP system instability rather than just parameter serialization issues.

Impact Assessment

Severity: CRITICAL++

  • Makes MCP completely unusable in production
  • Single failed parameter call corrupts entire session
  • Affects both Claude Code and Claude Desktop
  • No viable workarounds beyond constant session restarts
umairkamilcodes · 11 months ago

Bump: can confirm, experiencing exactly the same. Tried multiple MCP servers, my own, filesystem, vs code, etc. Consistently get "Cannot convert undefined or null to object" when multiple calls are made in succession or when a call contains multiple parameters/arguments.

<img width="788" height="458" alt="Image" src="https://github.com/user-attachments/assets/e13891f9-cf8a-40ed-af75-0d52af624e3b" />

hildebrandt · 11 months ago
TC23345 · 11 months ago

"Cannot convert undefined or null to object" when multiple calls are made in succession or when a call contains multiple parameters/arguments.

Same issue here, first tool call works then all other tools from other MCPs returns the same error

Mauz013 · 11 months ago

Dost work even if the session is restarted. On Claude desktop

aixa-ai · 11 months ago

Same problem...

Kvintus · 11 months ago

same here

dandacompany · 11 months ago

Remote connectors and dtx also have that problems.. please fix it quickly.

aicayzer · 11 months ago

Confirming this exact bug pattern.

I can reproduce the identical behaviour:

  • First MCP call with parameters: SUCCESS
  • Second MCP call with parameters: FAIL with "Cannot convert undefined or null to object"
  • Calls without parameters: Always work

Additionally found that any first MCP call that returns an error (e.g., check a non-existent resource) immediately corrupts the client state, causing all subsequent parameterised calls to fail with the same JavaScript error.

Platform: Claude Desktop
Impact: Critical - makes MCP unusable for any multi-step workflows

cris82mi · 11 months ago

I get this error: "Failed to call tool execute_sql: TypeError: Cannot convert undefined or null to object" when I try to use mysql_mcp_server. I’ve tried both Sonnet and Opus, and the issue is the same. Is this the same problem you’re experiencing?

aicayzer · 11 months ago

Exactly the same @cris82mi. Not an issue with your MCP.

Aborsen · 11 months ago

Same issue here.

Kvyii · 11 months ago

@cris82mi Widespread issue. Suffering the same here.

SwonDev · 11 months ago

Same here

srdi · 11 months ago

Same issue with Jira MCP.

DavidDurlach · 11 months ago

Exactly the same issue... Windows 11.

anchoret2009 · 11 months ago

same issue

grublets · 11 months ago

Can confirm on macOS Sequoia 15.5

Game breaker for me. I have several long running complex projects and Claude has free rein to read-write persistent memories to a directory I've given it.

phodat · 11 months ago

Confirmed here to. Huge issue for me, killing several critical processes

rrrnhpl · 11 months ago

same issue

I'll help you check the PostgreSQL database. Let me start by exploring the database structure to see what's available.Now let me check what tables and other objects are in the main user schema:Let me try a different approach and run a SQL query to check the database:Let me try checking the database health to see if there are any connectivity issues:I'm encountering connectivity issues with the PostgreSQL database - all the functions are returning "Cannot convert undefined or null to object" errors. This suggests the database connection might not be properly configured or the database might not be accessible.

Let me check if there are any database files or alternative data sources available:Let me try checking if there's a DuckDB database available:I'm unable to access the PostgreSQL database due to connectivity issues. All the database functions are returning "Cannot convert undefined or null to object" errors, which suggests:

  1. Database Connection Issues: The PostgreSQL server might not be running or accessible
  2. Configuration Problems: The database connection parameters might not be properly configured
  3. MCP Server Issues: The Model Context Protocol servers that provide database access might not be properly connected

Troubleshooting steps you could try:

  1. Check PostgreSQL Status: Verify that the PostgreSQL service is running
  2. Verify Connection Settings: Ensure the database host, port, username, password, and database name are correctly configured
  3. Network Connectivity: Check if there are any firewall or network issues preventing database access
  4. MCP Configuration: Verify that the PostgreSQL MCP server is properly configured and connected

Would you like me to help you with any specific aspects once the database connectivity is restored? I can assist with:

  • Database schema analysis
  • Performance monitoring
  • Query optimization
  • Health checks
  • Index recommendations

If you have any database dump files or SQL scripts available, I could also help analyze those while the connectivity issues are being resolved.

ahmadashfq · 11 months ago

Same issue here and stuck since yesterday.

swapnil-gomarble · 11 months ago

We're experiencing a similar problem. Several clients are considering switching from Claude to OpenAI or Gemini due to concerns about platform reliability.

jaimewyant · 11 months ago

I started experiencing this issue sometime yesterday. And am still experiencing it, even though the AI support agent assured me this had been fixed 🤣

syedhamza2381 · 11 months ago

When will it be fixed? Any updates please

BinqAdams · 11 months ago

Also experiencing this issue.

yoshkinkod · 11 months ago

+1

mornewiggins-dev · 11 months ago

Same for me.

samsoro · 11 months ago

A status update on any fixes would be appreciated...this issue breaks workflows and there is no work-around other than to wait for the fix to be implemented.

teku45 · 11 months ago

Would love any update from anthropic on this. Encountering this on both Claude Desktop and Claude Code, and is a production blocker. As a Max Subscriber, I am disappointed about how long this has lasted without being addressed.

AraneaDev · 11 months ago

LOL, i spend a whole day trying to debug my MCP services ><

XuanboJia · 11 months ago

Same issue here and stuck since yesterday.

rhs2207 · 11 months ago

Same for mee

kevinhagel · 11 months ago

Error executing code: Cannot convert undefined or null to object

Since I came in this morning. I spent $200/month for the pro max plan. I have lost a full day's work on this, for the current contract that is over $800 lost. How many people around the world, particularly people who bill for work by the day, have lost their income for the day?

What is Anthropic doing about this? There is no acknowledgement of the problem.
Go to their status page https://status.anthropic.com all you get is "Eleveated Errors on Sonnet 4"

Well, anthropic? You're losing my company as a customer.

AwesomeMusicStudio · 11 months ago

agreed.. spent so much time trying to debug .. finally realized it is this. Lost a complete day of work too. Also have the pro plan.

boragurel · 11 months ago

Confirming this issue with ClaudeR on Windows
I can confirm this exact same pattern with the ClaudeR R package on Windows 11:
Setup:

ClaudeR 0.2.0 (R package for executing R code via MCP)
Windows 11 x64
Claude Desktop (latest version)

Exact same behavior:

First execute_r call: Always succeeds (simple or complex R commands)
Second execute_r call: Always fails with "Cannot convert undefined or null to object"
All subsequent calls: Continue failing until Claude Desktop restart

This started happening today - was working perfectly this morning, began failing this afternoon without any changes to my setup.
The ClaudeR MCP server appears to be running correctly (shows as connected), suggesting this is indeed a Claude Desktop client-side parameter serialization issue affecting all MCP servers requiring parameters.

davemoore- · 11 months ago

Also happening on Claude Desktop for MacOS

wayum999 · 11 months ago
agreed.. spent so much time trying to debug .. finally realized it is this. Lost a complete day of work too. Also have the pro plan.

....yes just spent hours thinking it was my error : (

Timwj2005 · 11 months ago

I'm having the same issues on Claude Desktop for MacOS. Was working perfectly last night, this morning everything fails.

rishabhgupta592 · 11 months ago

Facing same issue on Mac Claude desktop. Has anyone found any workaround?

buraktokman · 11 months ago

+1

MattGeiger · 11 months ago

I just tried re-installing the desktop app — I had an older .dmg image from May 2025. Still no joy. My best guess is that this is a fault at the Anthropic server level, and not due to a botched app update.

Harakty · 11 months ago

Issue still open. It's impacting 99% of the open projects. An official ETA for resolution should be the normal support expected for a 200$/ mo service.

It's more than 12 hours that everything is unusable.

syedhamza2381 · 11 months ago

Atleast they have started to investigate the issue now:

https://status.anthropic.com/

MosheAshkenazi · 11 months ago

+1

samsoro · 11 months ago

https://status.anthropic.com/ showing a fix - hard close of Claude Desktop resolves it

ollie-anthropic collaborator · 11 months ago

Hey all, appreciate the feedback here. It looks like this was due to an upstream API failure affecting all MCP tool calls. This should be resolved now (perhaps with a Claude Desktop restart). Please see https://status.anthropic.com/.

Reading this thread, it's clear there are a number of things we should follow up on. In particular, we can aim to provide better error messages, which can hopefully indicate if the error is server- or client-side. We also should have detected the issue sooner.

Apologies for the inconvenience - we do aim to make this better.

anchoret2009 · 11 months ago

This bug is fixed, upgraded to v0.12.49!

TC23345 · 11 months ago

Thank you for the quick fix! All good to go over here on Claude Desktop App for Windows

cakebake · 11 months ago
Reading this thread, it's clear there are a number of things we should follow up on. In particular, we can aim to provide better error messages, which can hopefully indicate if the error is server- or client-side.

@ollie-anthropic An often overlooked detail in try/catch hell. Every developer will relate. Thanks for the work.

github-actions[bot] · 11 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.