# How I Resolved a Critical Claude Desktop MCP Server Configuration Issue with a Simple Solution

Have you ever encountered a technical issue that seemed completely baffling, only to discover the solution was surprisingly simple? Recently, I faced this exact situation while setting up the MCP filesystem server for Claude Desktop on my Mac.

## **The Challenge: Mysterious Configuration Failures**

While the `mcp-server-sqlite` with `uvx` worked flawlessly, I hit a roadblock when trying to configure the filesystem server using `claude_desktop_config.json`. My attempts to use both `npx` and `node` directly resulted in unexpected errors that left me puzzled.

### **First Attempt: The NPX Approach**

My first configuration looked straightforward enough:

```json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/xxx/Desktop"
      ]
    }
  }
}
```

However, the logs revealed a peculiar error:

```bash
==> /Users/xxx/Library/Logs/Claude/mcp-server-filesystem.log <==
command not found: /Users/xxx/Desktop
```

Strangely, running the identical command directly in the terminal worked perfectly:

```bash
npx @modelcontextprotocol/server-filesystem '/Users/xxx/Desktop'
# Output: Secure MCP Filesystem Server running on stdio... Allowed directories: [...]
```

### **Second Attempt: The Node Direct Approach**

For my next approach, I tried using Node.js directly:

```json
{
  "mcpServers": {
    "filesystem": {
      "command": "node",
      "args": [
        "/usr/local/lib/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js",
        "/Users/xxx/Desktop"
      ]
    }
  }
}
```

Yet this produced a syntax error:

```bash
==> /Users/xxx/Library/Logs/Claude/mcp-server-filesystem.log <==
/usr/local/lib/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js:2
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
       ^

SyntaxError: Unexpected token {
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    ...
```

Again, running the exact same command in the terminal worked without issues.

At this point, I was stumped. Was it a path issue? I even tried specifying the full path to `node` (for example, `/usr/local/bin/node`) in the configuration file, which seemed to work temporarily—but it was only a fragile workaround, not a real solution.

## **The Unexpected Solution: Version Conflicts**

After considerable troubleshooting, I discovered the root cause: **outdated Node.js versions lurking in my system**.

While my default terminal Node was up-to-date, older versions (likely managed by `nvm`) were somehow interfering when Claude attempted to launch the server through the configuration file.

## **The Simple Fix That Saved the Day**

The solution was remarkably straightforward: I removed the old Node.js installations, ensuring only a modern version remained on my system.

The result? Both the `npx` and `node` configurations in `claude_desktop_config.json` began working perfectly, with no errors or confusion—just seamless filesystem access through MCP.

## **What You Can Learn From This Experience**

If you encounter situations where commands work flawlessly in your terminal but fail when launched from another application, consider checking for version conflicts in your runtime environments.

Sometimes the most powerful fix is the simplest one: cleaning up outdated versions of your development tools.

Have you experienced similar phantom issues with conflicting software versions? I'd love to hear about your troubleshooting wins in the comments below.
