Claude Code MCP Config: npm vs uvx and Pitfalls

Claude Code MCP Config: npm vs uvx and Pitfalls

Introduction

When you first try to configure an MCP server for Claude Code or Claude Desktop, you'll likely hit this wall:

mcp-server-filesystem was not found in the package registry

This error happens because you're using uvx to look for an npm package. The MCP ecosystem mixes npm-based and uvx-based servers, and you need to know which is which.


npm-Based vs uvx-Based

npm-based uvx-based
Origin Official Anthropic / Node.js Python-based third-party
Installation npm install -g Run directly with uvx
Examples filesystem, fetch android-mcp
Stability High (officially maintained) Varies by implementation
Documentation Well-documented Relatively sparse

General rule:

Official MCP servers   → npm
Android-specific ones  → uvx

Why uvx mcp-server-filesystem Fails

A common mistake:

{
  "mcpServers": {
    "filesystem": {
      "command": "uvx",
      "args": ["mcp-server-filesystem"]
    }
  }
}

This configuration tells uvx to look for mcp-server-filesystem on PyPI — but that package doesn't exist on PyPI.

@modelcontextprotocol/server-filesystem is a Node.js npm package. uvx is a Python package manager and won't find it.


The Correct Way to Configure filesystem MCP

Step 1: Install via npm

npm install -g @modelcontextprotocol/server-filesystem

Step 2: Find the installed path (Windows)

where mcp-server-filesystem

It's typically installed at:

C:\Users\<username>\AppData\Roaming\npm\mcp-server-filesystem.cmd

Step 3: Add to settings.json

{
  "mcpServers": {
    "filesystem": {
      "command": "mcp-server-filesystem",
      "args": [
        "C:\\Users\\nobuy\\Code"
      ]
    }
  }
}

If the command isn't on your PATH, use the full path:

{
  "mcpServers": {
    "filesystem": {
      "command": "C:\\Users\\nobuy\\AppData\\Roaming\\npm\\mcp-server-filesystem.cmd",
      "args": [
        "C:\\Users\\nobuy\\Code"
      ]
    }
  }
}

Windows-Specific Caveats

Path separators — use double backslashes:

"C:\\Users\\nobuy\\Code"   // ✓ Correct
"C:/Users/nobuy/Code"       // ✓ This also works
"/Users/Code"                // ✗ Doesn't exist on Windows

The .cmd extension may be required:

npm global installs on Windows create .cmd files. If the command name alone doesn't work, specify the full .cmd path.


Why You Can Skip fetch MCP for Now

@modelcontextprotocol/server-fetch doesn't exist as an official npm package.

# This will fail
npm install -g @modelcontextprotocol/server-fetch
# npm error 404 Not Found

Fetch-style MCPs come from individual implementations, GitHub clones, or tools like Smithery — installation methods vary widely.

More importantly, Claude Code itself already has web search and URL fetching built in, so fetch MCP is low priority for Android/Compose development.


Configuring Android MCP (uvx-based)

Android device automation MCPs are uvx-based:

{
  "mcpServers": {
    "android": {
      "command": "C:\\Users\\nobuy\\.local\\bin\\uvx.exe",
      "args": [
        "--python", "3.13",
        "android-mcp"
      ]
    }
  }
}

uvx manages the Python environment automatically, so no manual venv setup is required — which is convenient.


Recommended Final Configuration

For Android development with Claude Code:

{
  "mcpServers": {
    "filesystem": {
      "command": "C:\\Users\\nobuy\\AppData\\Roaming\\npm\\mcp-server-filesystem.cmd",
      "args": [
        "C:\\Users\\nobuy\\Code"
      ]
    },
    "android": {
      "command": "C:\\Users\\nobuy\\.local\\bin\\uvx.exe",
      "args": [
        "--python", "3.13",
        "android-mcp"
      ]
    }
  }
}

Priority Guide

Priority MCP Reason
Top filesystem Lets Claude read your entire project
Second Android MCP Screenshot automation, adb operations
Later fetch Claude's built-in web features cover this

Getting filesystem configured first is the highest ROI step — it lets Claude Code work with full awareness of your codebase.


Summary

Concept Detail
Two ecosystems exist npm-based and uvx-based MCPs are mixed
Official servers use npm filesystem etc. aren't on PyPI
Python-based use uvx android-mcp etc. run with uvx
Watch out for .cmd on Windows Use full path if it's not on PATH
Skip fetch for now Claude's built-in features cover it

Starting with just filesystem and Android MCP gives you a surprisingly powerful setup right away.