Gemini CLI Setup
Google's Gemini CLI uses a settings.json file. For HTTP-based MCP servers, use
the url key with "type": "http".
Step 1: Set environment variables (recommended)
Add these to your ~/.bashrc, ~/.zshrc, or equivalent so they persist across
sessions:
export CLOUDSEK_BEARER_TOKEN=your_bearer_token_here
export CLOUDSEK_ORG_ID=your_org_id_here
Step 2: Open or create the config file
| Scope | Path |
|---|---|
| Global (all sessions) | ~/.gemini/settings.json |
| Project-specific | .gemini/settings.json in your project root |
Step 3: Add the CloudSEK entry
{
"mcpServers": {
"cloudsek": {
"url": "https://api.cloudsek.com/mcp",
"type": "http",
"headers": {
"Authorization": "Bearer $CLOUDSEK_BEARER_TOKEN",
"X-CloudSEK-Org-Id": "$CLOUDSEK_ORG_ID"
},
"timeout": 30000
}
}
}
Gemini CLI expands shell environment variables in header values automatically.
If you prefer to hardcode values for testing, replace the $ references with
literal strings, but don't commit that file to version control.
Gemini CLI previously used an httpUrl key for HTTP servers. This key is
deprecated. Use url + "type": "http" as shown above.
Step 4: Verify
Exit any running Gemini CLI session, start a new one, and ask: "What CloudSEK tools do you have available?"
You should see tools like get_alerts, ioc_lookup, and
get_threat_actor_by_name. If nothing appears, see
Troubleshooting.