Back to MCP directory
publicPublicdnsLocal runtime

Windows-MCP-Server-Installation-Verification-Guide

Windows系统MCP服务器安装验证指南,提供从环境检查到服务运行的完整流程说明,重点解决Windows与MacOS的路径差异问题。

article

README

🚀 Windows MCP 服务器安装验证指南

本指南旨在帮助您完成 Windows MCP 服务器的安装验证工作,不过前提是您已经在 Windows 10 上完成了 MCP 的基本安装。此指南由 Claude 桌面应用程序创建,可用于运行 MCP 服务器。

🚀 快速开始

✨ 主要特性

本指南详细介绍了 Windows MCP 服务器的安装验证步骤,还对比了 Windows 和 MacOS 在 MCP 服务器设置中的差异,同时给出了转换注意事项,助您在不同系统下顺利配置 MCP 服务器。

📦 安装指南

1. 验证 Node.js 和 npm 是否安装

要确保已经正确安装了 Node.js 和 npm(Node Package Manager),您可以在命令提示符中输入以下命令进行验证:

node -v
npm -v

2. 安装 MCP 服务器依赖项

运行以下命令来安装所需的依赖项:

npm install -g @modelcontextprotocol/server-sequential-thinking

3. 配置 MCP 服务器

创建或编辑 mcp-config.json 文件,并添加以下内容:

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

4. 启动 MCP 服务器

运行以下命令启动 MCP 服务器:

npm start

5. 验证服务器状态

打开浏览器,访问 http://localhost:3000 检查服务器是否正常运行。

📚 详细文档

🔧 技术细节

Windows 和 MacOS 在 MCP 服务器设置中的差异对比

1. 路径处理
  • Windows:使用绝对路径和显式的 node.exe 引用。
  • MacOS:使用 PATH 分析和相对路径。
2. 包管理
  • Windows:需要直接使用 node.exe 执行脚本。
  • MacOS:使用 npx 命令执行脚本。
3. 权限设置
  • Windows:使用管理员权限运行命令提示符。
  • MacOS:使用 sudochmod 设置权限。
4. 环境变量
  • Windows:使用 %USERPROFILE% 和分号(;)分隔的 PATH 变量。
  • MacOS:使用 $HOME 和冒号(:)分隔的 PATH 变量。
5. 配置文件格式
  • Windows 示例
{
  "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"
      ]
    }
  }
}
  • MacOS 示例
{
  "mcpServers": {
    "sequential-thinking": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sequential-thinking"
      ]
    }
  }
}
6. 常见问题及解决方案
  • Windows 特定问题
    • 路径长度限制:确保路径不超过 Windows 的最大允许长度。
    • 权限问题:使用管理员身份运行命令提示符。
    • 反斜杠转义:在 JSON 中使用双反斜杠(\\)。

转换注意事项

1. 路径转换

  • / 替换为 \\
  • 添加驱动器号(例如 C:)。

2. 命令转换

  • npx 命令替换为直接的 node.exe 执行方式。

通过以上步骤和注意事项,您可以顺利完成 Windows 和 MacOS 环境下 MCP 服务器的设置和验证。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client