windows gemini-cli
介绍
https://google-gemini.github.io/gemini-cli/
下载
- 安装node
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
}
}
}
效果



浙公网安备 33010602011771号