protect-context for Gemini CLI
io.github.xjtlumedia/protect-context
Agent guardrails: contract, evidence ledger, loop brake, diff-scope warnings, durable journal.
client:Gemini CLI
transport:stdio
runtime:pypi
Install protect-context in Gemini CLI
~/.gemini/settings.json · windows: %USERPROFILE%\.gemini\settings.json
{
"mcpServers": {
"protect-context": {
"command": "uvx",
"args": [
"protect-context"
],
"env": {
"PC_SESSION_ID": "<PC_SESSION_ID>"
}
}
}
}
Gemini expands $VAR and ${VAR} inside env values, so a secret can live in your shell rather than this file. Gemini CLI docs