# Gemini CLI + Pear MCP guide

Add Pear to Gemini CLI as a Streamable HTTP MCP server for hosted calendar, task,
contact, and mail workflows.

Server URL:

```text
https://pearmcp.com/api/mcp
```

## Setup

Gemini CLI accepts `httpUrl`, custom headers, and OAuth discovery for remote servers.
A static local configuration can use:

```json
{
  "mcpServers": {
    "pear": {
      "httpUrl": "https://pearmcp.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${PEAR_API_KEY}"
      }
    }
  }
}
```

Gemini CLI expands environment variables in settings strings. Set `PEAR_API_KEY` in an
environment source Gemini CLI loads, keep the interpolation above, and never commit a
substituted key to a shared project file.
If Gemini CLI returns an OAuth authentication requirement, use its MCP authentication
flow and complete Pear sign-in. Inspect the server registry, then test a read-only request.
