Skip to main content

Connect Gemini CLI

This guide uses a personal access token. For OAuth, clients supporting discovery, automatic registration and PKCE S256 can connect with only the server URL and their own callback. Clients without automatic registration need the pre-registered client settings. See client compatibility.

Copy your MCP access token from your Reconstruct Platform account settings. See 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.

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.

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

Next, try the prompt examples.