> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://suporte.jusratio.com.br/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Como conectar no Gemini CLI

Pré-requisitos:

* **Gemini CLI** instalado. Veja https://google-gemini.github.io/gemini-cli/
* **Conta Jusratio** — criada em https://jusratio.com.br/login

### Passo a passo

**1. Crie chave em&#32;https://jusratio.com.br/app/chaves**

Copie o token jusmcp_....

**2. Exporte como variável de ambiente**

Linux/Mac:

```
export JUSRATIO_MCP_TOKEN="jusmcp_chave_completa_aqui"
```

Adicione ao ~/.zshrc ou ~/.bashrc pra persistir.

Windows PowerShell:

```
setx JUSRATIO_MCP_TOKEN "jusmcp_chave_completa_aqui"
```

Feche e abra terminal novo.

**3. Edite ~/.gemini/settings.json**

Adicione dentro de mcpServers:

```

 {
  "mcpServers": {
    "jusratio": {
      "httpUrl": "https://mcp.jusratio.com.br/mcp",
      "headers": {
        "Authorization": "Bearer ${JUSRATIO_MCP_TOKEN}"
      }
    }
  }
}
```

A sintaxe ${JUSRATIO_MCP_TOKEN} faz o Gemini CLI ler da variável de ambiente em runtime.

Se já tem outros MCP servers, adicione "jusratio": {...} como mais uma entrada.

**4. Teste**

Rode gemini no terminal. Numa nova sessão:

> "Use o Jusratio e responda sobre dano moral em atraso de voo segundo o STJ."

Se chamar a tool pesquisar_documentos, está conectado.

### Não funcionou?

* **Variável não foi lida:** echo $JUSRATIO_MCP_TOKEN no Linux/Mac, ou $env:JUSRATIO_MCP_TOKEN no PowerShell. Se vazio: refaça + terminal novo.
* **settings.json rejeitado:** confira sintaxe JSON em https://jsonlint.com
* **401/Unauthorized:** chave revogada ou copiada incompleta. Crie outra em https://jusratio.com.br/app/chaves