
# Connect Gemini CLI

This guide uses a personal access token. OAuth requires a pre-registered public client and an approved callback address; entering only the server URL may attempt anonymous dynamic registration, which Reconstruct disables. See [client compatibility](../connect-ai-agents.md#client-compatibility).

Copy your MCP access token from your [Reconstruct Platform account settings](https://reconstruct.dev/platform/). See [Before you start](../connect-ai-agents.md#before-you-start) for the connection requirements.

Set `CR_RECONSTRUCT_MCP_TOKEN` in your shell, then add the HTTP server in your user configuration. The command below writes the token into Gemini CLI's local settings, so use a short-lived token and keep that settings file private.

```bash
gemini mcp add --scope user --transport http \
  --header "Authorization: Bearer ${CR_RECONSTRUCT_MCP_TOKEN}" \
  reconstruct https://reconstruct.dev/mcp
gemini mcp list
```

Ask Gemini to call `list_products` after the connection succeeds. See the [official Gemini CLI MCP configuration](https://geminicli.com/docs/tools/mcp-server/).

When configuring JSON directly, use `httpUrl` for Streamable HTTP; `url` selects the older SSE transport.

Next, try the [prompt examples](../prompt-examples.md).
