MCP HubMCP Hub
trevorwilkerson

Windows-MCP-Server-Installation-Verification-Guide

by: trevorwilkerson

Windows MCP server setup differs from Mac by requiring absolute file paths and explicit node.exe references instead of npx commands. The installation requires verifying npm and installing packages globally to the AppData\Roaming\npm\node_modules directory. Running servers needs complete paths for both node.exe and the server's index.js file.

17created 19/12/2024
Visit
Windows
npm

📌Overview

Purpose: This guide aims to provide a comprehensive verification process for setting up the MCP server on Windows 10, ensuring all configurations and installations are correctly implemented.

Overview: The guide focuses on the specific installation requirements and structural differences when setting up an MCP server on the Windows platform compared to MacOS. It includes detailed steps for verifying npm installations, checking directory structures, executing servers, and troubleshooting common issues related to Windows MCP server setup.

Key Features:

  • Prerequisites Check: Ensures that npm is installed and properly configured, helping users set a solid foundation for the server installation.

  • Installation Status Check: Guides users to verify whether the required MCP packages are installed or need to be installed globally, ensuring completeness.

  • Directory Structure Verification: Details how to navigate and verify the expected folder structure for successful MCP server operations, helping ensure that all components are in the right place.

  • Execution Test: Provides explicit instructions on how to run the MCP server using absolute file paths, which is crucial for correct operation on Windows.

  • Troubleshooting Guide: Offers solutions for common issues encountered during setup, such as misconfigurations or missing files, enhancing user support.


Windows MCP Server Installation Verification Guide

This guide provides a thorough verification process for installing the MCP sequential-thinking server on Windows 10. It highlights key differences from MacOS installation and details troubleshooting tips.


Prerequisites Check

  1. Open Command Prompt as administrator.
  2. Verify npm installation:
    npm --version
    
  3. Check npm's global installation directory:
    npm config get prefix
    
    Expected output:
    C:\Users\<YourUsername>\AppData\Roaming\npm

Installation Status Check

  1. Check if the package is installed globally:
    npm list -g @modelcontextprotocol/server-sequential-thinking
    
  2. Locate Node.js executable:
    where node
    
    Usually found at:
    C:\Program Files\nodejs\node.exe

Package Installation

  1. If the package is not installed, install it globally:
    npm install -g @modelcontextprotocol/server-sequential-thinking
    
  2. Verify successful installation:
    npm list -g @modelcontextprotocol/server-sequential-thinking
    

Directory Structure Verification

  1. Navigate to the npm global modules directory:
    cd %APPDATA%\npm\node_modules\@modelcontextprotocol
    
  2. Verify folder structure:
    dir
    cd server-sequential-thinking
    dir
    cd dist
    dir
    
    Expected structure:
    @modelcontextprotocol\
      server-sequential-thinking\
        dist\
          index.js
    

Execution Test

Run the server using the absolute path to node.exe and the index.js file:

node "%APPDATA%\npm\node_modules\@modelcontextprotocol\server-sequential-thinking\dist\index.js"

Look for success message:
Sequential Thinking MCP Server running on stdio


Troubleshooting Guide

  • If npm config get prefix shows an unexpected location:
    Reset npm prefix to the default location:

    npm config set prefix "%APPDATA%\npm"
    
  • If you encounter MODULE_NOT_FOUND error:

    • Verify installation:
      npm install -g @modelcontextprotocol/server-sequential-thinking
      
    • Ensure file paths match exactly.
  • If node.exe is not found:

    • Verify Node.js installation.
    • Add Node.js directory to your system PATH if needed.
  • If directory structure is incomplete:

    • Uninstall package:
      npm uninstall -g @modelcontextprotocol/server-sequential-thinking
      
    • Clear npm cache:
      npm cache clean --force
      
    • Reinstall package.

Important Windows-Specific Notes

  • Use double backslashes (\\) in config files and JSON paths.
  • Always specify absolute paths rather than relative paths.
  • Be aware of Windows path length limitations.
  • Use the exact path to node.exe as returned by where node.
  • Check permissions if you get access denied errors.

MacOS vs Windows 10: MCP Server Setup Differences

File System Structure

AspectMacOSWindows 10
Global packages/usr/local/lib/node_modulesC:\Users\<Username>\AppData\Roaming\npm
Node executable/usr/local/bin/nodeC:\Program Files\nodejs\node.exe
Config location~/Library/Application Support/Claude/%APPDATA%\Claude\
Path separatorForward slash (/)Backslash (\\)
Case sensitivityCase-sensitive by defaultCase-insensitive

Command Execution

MacOS

# Package execution
npx @modelcontextprotocol/server-sequential-thinking

# Global installation
sudo npm install -g @package-name

# Permission setting
chmod +x ./script.sh

Windows 10

# Package execution
node "C:\Users\Username\AppData\Roaming\npm\node_modules\@package-name\dist\index.js"

# Global installation (run CMD as Administrator)
npm install -g @package-name

Configuration File Format

MacOS

{
  "mcpServers": {
    "sequential-thinking": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sequential-thinking"
      ]
    }
  }
}

Windows 10

{
  "mcpServers": {
    "sequential-thinking": {
      "command": "C:\\Program Files\\nodejs\\node.exe",
      "args": [
        "C:\\Users\\Username\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-sequential-thinking\\dist\\index.js"
      ]
    }
  }
}

Key Differences Summary

  1. Path Handling
    MacOS uses PATH resolution and relative paths; Windows requires absolute paths and explicit node.exe references.

  2. Package Management
    MacOS utilizes npx for execution; Windows needs direct node execution.

  3. Permissions
    MacOS typically uses sudo and chmod; Windows relies on Administrator privileges.

  4. Environment Variables
    MacOS uses $HOME, $PATH with colon (:) separators; Windows uses %USERPROFILE%, %PATH% with semicolon (;) separators.

  5. Configuration Requirements
    MacOS config is simpler and uses npm/npx commands; Windows config is more verbose and demands full paths.

Converting Between Platforms

  • Replace forward slashes (/) with double backslashes (\\).
  • Add Windows drive letter prefix (e.g., C:) to paths.
  • Replace npx commands with direct node.exe execution commands.
  • Convert environment variables to Windows format ($HOME → %USERPROFILE%).
  • Remove Unix-specific permission commands (chmod, sudo).
  • Use double backslashes in JSON paths to escape backslash characters.
  • Remove -y flag from arguments when converting to Windows.

Common Issues and Solutions

  • Path length limitations on Windows.
  • Permissions issues with files in AppData.
  • Backslash escaping in JSON files may cause syntax errors.
  • Differences in syntax and command behavior between CMD and PowerShell.
  • Missing or incorrect node.exe path reference.
  • Incomplete or incorrect path conversions.
  • Permission model mismatches when moving between systems.

This guide provides an organized workflow to verify and troubleshoot MCP server installation on Windows while outlining the fundamental differences from MacOS installations. Follow each step to ensure proper operation of your MCP server.