iT邦幫忙

0

[Windows] Rovo Dev CLI 使用 git MCP server

  • 分享至 

  • xImage
  •  

安裝 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!」。

將 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」。

修改 Rovo Dev CLI 的 mcp.json

  • mcp.json 路徑應該在個人目錄下:C:\Users{帳號}.rovodev\

內容修改為:

{
  "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 的結果。

本文同步發表至我的Blog


圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言