Skip to content

Google Gemini CLI

The Google Gemini CLI supports MCP servers. AgentZero can provide policy-enforced tools to Gemini CLI sessions.

Terminal window
cargo build --release --features mcp

Add AgentZero to your Gemini CLI MCP configuration:

{
"mcpServers": {
"agentzero": {
"command": "az",
"args": ["mcp"]
}
}
}

Or use the automated setup:

Terminal window
az connect gemini --dry-run # preview the config
az connect gemini # write config

Start Gemini CLI in your project directory. AgentZero tools will be available.

ToolDescription
read_fileRead file contents (policy-checked)
list_directoryList directory contents
search_filesSearch for patterns in files
write_fileWrite content to a file (requires approval)
run_commandExecute a shell command (requires approval)
  • Policy engine enforces deny-by-default rules
  • Path validation and sensitive file blocking
  • Full audit trail in .agentzero/audit/
  • Tools not visible — ensure az is in your PATH and built with --features mcp
  • Policy denials — check az policy status