安裝 mcp-server-git
- 依建議安裝 UV:
- 開啟 Powershell 執行
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
。(安裝成功後提示安裝路徑及加入環境變數的 powershell 語法) - 安裝後執行
uvx mcp-server-git
。如果 powershell 游標持續閃爍且沒有任何輸出,再按Ctrl + C
離開程式,畫面出現「Aborted!」。
- 開啟 Powershell 執行
Installing mcp-server-git
- Install UV as recommended:
- Open PowerShell and run
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
. After installation, runuvx mcp-server-git
. If the PowerShell cursor keeps blinking without output, pressCtrl + C
to exit the program, and the screen will show “Aborted!”.
- Open PowerShell and run
將 uv 及 mcp-server-git 執行檔路徑加入環境變數
- uv 安裝後會提示安裝路徑及加入環境變數的 powershell 語法。它的路徑應該在個人目錄下:C:\Users{帳號}.local\bin
- mcp-server-git 應該在個人目錄下:C:\Users\{帳號}\AppData\Local\uv\cache\archive-v0\8erP_JFZHfAj7NWwxmkUB\Scripts。
- 如果找不到,在 C:\Users\{帳號}\AppData\Local\uv\cache\archive-v0\ 下搜尋「mcp-server-git.exe」。
Adding uv and mcp-server-git executable paths to environment variables
- UV installation will provide the installation path and PowerShell commands to add it to environment variables. The path should be in your user directory: C:\Users{username}.local\bin
- mcp-server-git should be located in: C:\Users\{username}\AppData\Local\uv\cache\archive-v0\8erP_JFZHfAj7NWwxmkUB\Scripts.
- If you can’t find it, search for “mcp-server-git.exe” under C:\Users\{username}\AppData\Local\uv\cache\archive-v0.
修改 Rovo Dev CLI 的 mcp.json
- mcp.json 路徑應該在個人目錄下:C:\Users\{帳號}\.rovodev\
Modifying mcp.json for Rovo Dev CLI
- The mcp.json file should be located in your user directory: C:\Users\{username}\.rovodev\
內容修改為 Update its contents to:
{
"mcpServers": {
"git": {
"command": "uv",
"args": [
"run",
"mcp-server-git"
]
}
}
}
重新啟動 Rovo Dev CLI
- 在 CLI 裡輸入
git status
,Rovo Dev CLI 會請求允許執行「Calling git_status: {“repo_path”: “.”}」,允許後可以在 CLI 裡看到 git status 的結果。
Restarting Rovo Dev CLI
- In the CLI, enter
git status
. Rovo Dev CLI will request permission to execute “Calling git_status: {“repo_path”: “.”}”. After granting permission, you can view the git status results in the CLI.
最後更新日期:2025-07-24
Views: 3
Views: 2
發佈留言