windows gemini-cli

介绍

https://google-gemini.github.io/gemini-cli/

下载

  1. 安装node
  2. npm install -g @google/gemini-cli

Run

$env:GEMINI_API_KEY="YOUR_KEY" //也可以使用google账号登录
$env:http_proxy="http://127.0.0.1:21882" //你的代理
gemini -m gemini-2.5-flash  //指定模型

集成本地MCP

Ref: https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html

修改:C:\Users\USER\.gemini.settings.json

{
    "selectedAuthType": "gemini-api-key",
    "mcpServers": {
        "LocalMCPServer": {
            "command": "dotnet",
            "args": [
                "run",
                "--project",
                "C:\\Workspace\\MyFirstMCP\\MyFirstMCP.csproj"
            ],
            "timeout": 30000,
            "trust": true
        }
    }
}

效果

image

image

posted @ 2025-08-28 13:23  talentzemin  阅读(25)  评论(0)    收藏  举报