[BUG] Claude Desktop MCP fails on all parameterized calls for filesystem tool — "Cannot convert undefined or null to object"
Environment
- Platform (select one):
- Claude Desktop with MCP [Claude CLI Code works fine — this bug occurs only in the Desktop app]
Bug Description
Claude Desktop fails consistently on all parameter-based MCP operations for the @modelcontextprotocol/server-filesystem tool, including:
- read\_file
- get\_file\_info
- directory\_tree
- search\_files
Only list_directory (which requires no parameters) succeeds.
The error returned is:
Error executing code: Cannot convert undefined or null to object
This issue does not occur in Claude CLI, suggesting the problem is specific to Claude Desktop’s parameter serialization or transmission layer.
---
Expected Behavior
- File and directory operations with valid parameters should execute normally.
- MCP tools should receive properly serialized arguments.
- Behavior should be consistent between Claude CLI and Claude Desktop.
---
Actual Behavior
list_directoryworks correctly (no parameters).- All parameter-based operations fail with serialization errors.
- Works flawlessly on Claude CLI with the same configuration and tool.
---
🛠️ Troubleshooting Attempted
- ✅ Verified MCP server output
- ✅ Confirmed correct
~/.claude/mcp.config.json - ✅ Used absolute file paths
- ✅ Restarted Claude Desktop and MCP multiple times
- ✅ Confirmed functionality in Claude CLI
- ❌ No workaround found — issue persists in all Desktop sessions
---
🧾 Configuration Used
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/{MyName}"
]
}
}
}
---
Technical Analysis
The error message:
TypeError: Cannot convert undefined or null to object
suggests that the parameter object passed from Claude Desktop is either missing or not properly constructed. This usually happens in JavaScript when:
- Object.keys(), Object.entries() or Object.assign() are called on undefined
- Destructuring is attempted on null/undefined
Since list_directory (no params) works, but read_file (needs path) fails, this is likely due to MCP parameter serialization logic breaking down inside Claude Desktop.
---
Affected Operations
- ✅ list\_directory: success
- ❌ read\_file: fails
- ❌ get\_file\_info: fails
- ❌ directory\_tree: fails
- ❌ search\_files: fails
---
System Info
- Claude Desktop Version: Claude 0.12.28 (5f9bc7) — 2025-07-18T21:14:50.000Z
- Claude CLI: All MCP operations work as expected
- Operating System: macOS 15.4.1 (Sequoia) Build 24E263
- Node.js Version: v22.17.1
- npm Version: 10.9.2
- Terminal: macOS Terminal & iTerm2
---
Related Issues
- This appears related to https://github.com/anthropics/claude-code/issues/4195
---
Priority
🔴 High — prevents any meaningful use of MCP in Claude Desktop for parameter-based tools.
Workflows relying on file reading, writing, or searching are completely blocked.
11 Comments
See https://github.com/anthropics/claude-code/issues/4188 and https://github.com/anthropics/claude-code/issues/4192
This error first appeared more than 12 hours ago as far as I can tell.
There is no sign of any effort on the part of anthropic to deal with this problem.
Apparently it is not happening with claude code.
There is a suggested relationship there - spend more money on claude code or get incomptent service from claude desktop ai
Sequential Thinking isn't working neither.
Claude Desktop has become unusable, when will the problem be fixed?
Everything was working fine just yesterday. Today, I keep getting errors all day — MCP servers are down! I'm on the Max plan — what exactly am I paying for?Everything was working fine just yesterday. Today, I keep getting errors all day — MCP servers are down! I'm on the Max plan — what exactly am I paying for?
Fix the mcp pls!
Same problem... Yesterday, everything was working and this morning, this strange message of "Failed tool..." appeared til now. I tried all the possibilities to fiw this issue but none worked
Sorry, we can't help with Claude Desktop issues.
it was working until yesterday
I have the same problem, yesterday everything worked, today nothing, is there any fix for this?
<img width="654" height="466" alt="Image" src="https://github.com/user-attachments/assets/3afee7d1-e9d2-471e-9f35-0391a4f2c21b" />
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.