Skip to content

Windows 安装 UVX

MCP Server 大多由 Python、TypeScript 编写,运行时就需要 UVX、NPX 来启动,记录一下 Windows 10 安装 UVX 过程。


常见 MCP Server

json
{
  "mcpServers": {
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    },
    "time": {
      "command": "uvx",
      "args": ["mcp-server-time", "--local-timezone=Asia/Shanghai"]
    },
    "git": {
      "command": "uvx",
      "args": ["mcp-server-git"]
    },
    "amap-maps": {
      "command": "npx",
      "args": ["-y", "@amap/amap-maps-mcp-server"],
      "env": {
        "AMAP_MAPS_API_KEY": "api_key"
      }
    }
  }
}

UVX 安装

运行下方命令安装。

bash
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

# 输出示例
Downloading uv 0.8.15 (x86_64-pc-windows-msvc)                                                                          
Installing to C:\Users\charl\.local\bin
  uv.exe
  uvx.exe
  uvw.exe
everything's installed!

To add C:\Users\charl\.local\bin to your PATH, either restart your shell or run:

    set Path=C:\Users\charl\.local\bin;%Path%   (cmd)
    $env:Path = "C:\Users\charl\.local\bin;$env:Path"   (powershell)

添加到 PATH 环境变量,下方地址换成你自己的路径。

shell
$env:Path = "C:\Users\charl\.local\bin;$env:Path"

验证安装结果。

shell
uv --version
uvx pycowsay 'hello world!'

# 输出示例
uv 0.8.15 (8473ecba1 2025-09-03)

Installed 1 package in 12ms
C:\Users\charl\AppData\Local\uv\cache\archive-v0\tXhuYp1eH3UPg2PPPFBDJ\Lib\site-packages\pycowsay\main.py:27: SyntaxWarning: invalid escape sequence '\ '
  \   ^__^

  ------------
< hello world! >
  ------------
   \   ^__^
    \  (oo)\_______
       (__)\       )\/\
           ||----w |
           ||     ||

NPX 安装

安装好了 Node.js 后,NPX 就自动安装好了,本文略。

shell
npx --version

参考资料

  1. 官方文档 - 安装 UV:https://hellowac.github.io/uv-zh-cn/getting-started/installation/
  2. MCP:UVX的安装:https://blog.csdn.net/jiemashizhen/article/details/149585610