目录

安装

# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

更新

uv self update

依赖包

安装

uv add "mcp[cli]"

移除

uv remove "mcp[cli]"

Python 项目

创建

uv init echo
cd echo

创建的文件:

.
├── .python-version
├── README.md
├── main.py
└── pyproject.toml

运行

uv run main.py
Hello from echo!

参考资料