Skip to content

Instantly share code, notes, and snippets.

@eversonl
Last active March 27, 2025 21:29
Show Gist options
  • Select an option

  • Save eversonl/01f1ae08cf7a1b425752d2122cf6c6d7 to your computer and use it in GitHub Desktop.

Select an option

Save eversonl/01f1ae08cf7a1b425752d2122cf6c6d7 to your computer and use it in GitHub Desktop.
Claude desktop MCP - windows facts.md

MCP Server Cheat Sheet for Windows

Installation Options

Method Command When to Use Pros Cons
Global NPM npm install -g @modelcontextprotocol/server-filesystem Regular usage, performance needs Works offline, faster startup, consistent version Requires manual updates
NPX npx @modelcontextprotocol/server-filesystem Occasional use, exploration Always latest version, no maintenance Requires internet for each start, slower startup
Docker docker run [repository]/mcp-server Consistent environments, isolation Isolated environment, consistent across systems Higher resource usage, more complex setup
Local Development Point to local files Custom development Full control, immediate testing More setup, not portable
Python-based pip install mcp-server-fetch Specific Python servers Access to Python ecosystem Requires Python installation

Docker Installation (When Available)

# Pull the Docker image
docker pull [repository]/mcp-server:latest

# Run the container with access to your files
docker run -d \
  --name mcp-filesystem \
  -v C:/Users/YourUsername/Documents:/data/documents \
  -v C:/Users/YourUsername/Downloads:/data/downloads \
  -p 3000:3000 \
  [repository]/mcp-server:latest

# Configure in claude_desktop_config.json:
{
  "mcpServers": {
    "filesystem": {
      "command": "docker",
      "args": [
        "run",
        "-v", "C:/Users/YourUsername/Documents:/data/documents",
        "-v", "C:/Users/YourUsername/Downloads:/data/downloads",
        "[repository]/mcp-server:latest"
      ]
    }
  }
}

Config Reference Guide

Global Installation Config

{
  "mcpServers": {
    "filesystem": {
      "command": "node",
      "args": [
        "C:\\Users\\YourUsername\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js"
      ],
      "env": {
        "DEBUG": "*"
      }
    }
  }
}

NPX Config

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:\\Users\\YourUsername\\Downloads",
        "C:\\Users\\YourUsername\\Documents"
      ]
    }
  }
}

Keeping Servers Updated

Installation Type Update Method Notes
Global NPM npm install -g @modelcontextprotocol/server-filesystem@latest Run periodically, requires manual action
NPX No action needed Updates automatically on each run
Docker docker pull [repository]/mcp-server:latest Stop container, pull image, restart container
Local Development git pull and rebuild For custom development only

Command Type Reference

When switching from NPX to global installation, you must change:

  • Change "command": "npx" to "command": "node"
  • Replace args with path to the installed module's dist/index.js file

Choosing Between NPX and Global

Use Global Install When:

  • You use the MCP server frequently
  • You need offline functionality
  • Performance/startup time matters
  • You want consistent behaviour across projects
  • You run multiple MCP servers simultaneously
  • You have limited/metered internet

Use NPX When:

  • You only use the server occasionally
  • You always want the latest version
  • You don't want to manage updates
  • You're trying different MCP servers
  • You want minimal setup effort
  • You always have internet access

Installation Paths

  • Global NPM modules location: npm root -g
    • Typically: C:\Users\YourUsername\AppData\Roaming\npm\node_modules
  • Node.js location: where node
    • Typically: C:\Program Files\nodejs\node.exe

Working Directory

The MCP server uses the current directory as its working directory for relative paths. For consistency:

  • Create a specific directory for MCP file operations
  • Always start the server from that directory
  • Configure allowed paths in your config file

Troubleshooting

Issue Solution
"Could not attach to MCP server" Verify paths, ensure packages are installed, run as administrator
PowerShell security errors Use CMD instead or run Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Server not showing in Claude Ensure Pro subscription, latest version, check config JSON syntax
File access issues Check working directory and configured paths

Claude Desktop Config Location

%AppData%\Claude Desktop\claude_desktop_config.json

Default Configuration Template

{
  "globalShortcut": "Ctrl+Space",
  "mcpServers": {
    "filesystem": {
      "command": "node",
      "args": [
        "C:\\Users\\YourUsername\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js",
        "C:\\Users\\YourUsername\\Downloads",
        "C:\\Users\\YourUsername\\Documents"
      ],
      "env": {
        "DEBUG": "*"
      }
    },
    "memory": {
      "command": "node",
      "args": [
        "C:\\Users\\YourUsername\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-memory\\dist\\index.js"
      ],
      "env": {
        "DEBUG": "*"
      }
    }
  }
}

Remember to replace "YourUsername" with your actual Windows username and adjust paths according to your system configuration.

Beginner's Guide to MCP Maintenance

First-Time Setup Checklist

  • ✅ Install Node.js from nodejs.org (v18.x or later recommended)
  • ✅ Verify with node --version and npm --version
  • ✅ Find your npm global directory with npm root -g (write it down!)
  • ✅ Install desired MCP servers using one of the methods above
  • ✅ Create/edit the Claude Desktop config file
  • ✅ Restart Claude Desktop and verify server connection

Common Beginner Mistakes

  1. Wrong paths in config file: Double-check all paths match your system
  2. Missing backslashes: Windows paths need double backslashes (\\) in JSON
  3. Running without admin rights: Some actions require administrator privileges
  4. Not restarting Claude: Changes don't apply until Claude Desktop is restarted
  5. Forgetting to update: Global installations don't auto-update
  6. Path resolution errors: Errors like C:\Users\username\AppData\Local\AnthropicClaude\app-0.9.0\${APPDATA} indicate environment variable issues

Keeping Node.js and NPM Up to Date

Updating Node.js

  1. Check current version: node --version
  2. Download latest version from nodejs.org
  3. Run the installer (it will update your existing installation)
  4. Verify update: node --version

Updating NPM

# Update npm itself
npm install -g npm@latest

# Verify the update
npm --version

Fixing Path and Environment Variable Issues

If you see errors like C:\Users\username\AppData\Local\AnthropicClaude\app-0.9.0\${APPDATA}:

  1. Use absolute paths in your config file instead of environment variables
  2. Ensure environment variables are properly set in your system
  3. Try adding environment variables directly in the config:
    "env": {
      "APPDATA": "C:\\Users\\YourUsername\\AppData\\Roaming",
      "DEBUG": "*"
    }
  4. Check for stale Node.js installations that might be conflicting

MCP Server Health Check (Monthly)

  1. Check for Node.js updates: node --version (compare with nodejs.org)
  2. Update npm: npm install -g npm@latest
  3. Check for MCP server updates: npm outdated -g
  4. Update global packages: npm update -g
  5. Clear npm cache if needed: npm cache clean --force
  6. Review Claude Desktop logs for errors
  7. Test each configured server's functionality

Backup Your Configuration

Keep a backup copy of your claude_desktop_config.json file to quickly restore your setup if needed.

Resource Usage Notes

  • Running many servers simultaneously increases resource usage
  • Docker containers use more resources than global npm installations
  • Consider your computer's specifications when choosing installation methods
  • Close unused servers to free up resources

Further Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment