Skip to content
Gemini CLI

JSON Contracts for Gemini CLI

io.github.json-contracts/json-contracts

JSON contract registry and validator for structured LLM and agent outputs.

client:Gemini CLI transport:stdio runtime:npm

Install JSON Contracts in Gemini CLI

~/.gemini/settings.json · windows: %USERPROFILE%\.gemini\settings.json

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

{
  "mcpServers": {
    "json-contracts": {
      "command": "npx",
      "args": [
        "-y",
        "json-contracts"
      ],
      "env": {
        "JSON_CONTRACTS_DIR": "<JSON_CONTRACTS_DIR>"
      }
    }
  }
}

Gemini expands $VAR and ${VAR} inside env values, so a secret can live in your shell rather than this file. Gemini CLI docs

JSON Contracts in other clients