> ## Documentation Index
> Fetch the complete documentation index at: https://www.klavis.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini CLI

> Connect Strata with Gemini CLI in minutes and supercharge your AI coding experience

<img className="block dark:hidden" src="https://mintcdn.com/klavisai/lYsC1qAWcUJtoFi_/images/knowledge-base/gemini_cli/Gemini_CLI.png?fit=max&auto=format&n=lYsC1qAWcUJtoFi_&q=85&s=9b0d1f87064e7a46d0a459b1d190f5a6" alt="Gemini CLI" width="1300" height="731" data-path="images/knowledge-base/gemini_cli/Gemini_CLI.png" />

<img className="hidden dark:block" src="https://mintcdn.com/klavisai/lYsC1qAWcUJtoFi_/images/knowledge-base/gemini_cli/Gemini_CLI.png?fit=max&auto=format&n=lYsC1qAWcUJtoFi_&q=85&s=9b0d1f87064e7a46d0a459b1d190f5a6" alt="Gemini CLI" width="1300" height="731" data-path="images/knowledge-base/gemini_cli/Gemini_CLI.png" />

## Quick Setup Guide

<Steps>
  <Step title="Authorize MCP Servers to Use with Strata">
    Navigate to the [Klavis home page](https://www.klavis.ai/home) and click **"MCP Server"** in the left sidebar. You will see a list of MCP servers available in Klavis.

    <img src="https://mintcdn.com/klavisai/wCyW46nTT1afeF2W/images/knowledge-base/gemini_cli/step1.png?fit=max&auto=format&n=wCyW46nTT1afeF2W&q=85&s=c75b9485cccf2adda8fae302eca5952b" alt="Klavis home page" width="1905" height="1072" data-path="images/knowledge-base/gemini_cli/step1.png" />

    Click the **"Authorize"** button next to your chosen server. Once server is authorized, you will see **Green Checkmark** status.

    <img src="https://mintcdn.com/klavisai/wCyW46nTT1afeF2W/images/knowledge-base/gemini_cli/step2.png?fit=max&auto=format&n=wCyW46nTT1afeF2W&q=85&s=1b791ddcfa52a08568a6efd80614c6a6" alt="Authorize MCP Servers" width="1900" height="1069" data-path="images/knowledge-base/gemini_cli/step2.png" />

    <Tip>
      You can authorize one or more servers to use with Strata
    </Tip>
  </Step>

  <Step title="Get Strata Server URL">
    From Klavis Dashboard, click **"Add to Other Clients"** button to get your Strata Server URL.

    <img src="https://mintcdn.com/klavisai/wCyW46nTT1afeF2W/images/knowledge-base/gemini_cli/step3.png?fit=max&auto=format&n=wCyW46nTT1afeF2W&q=85&s=bcd4638183f9eeed0b5351b8d5732073" alt="Copy Strata Server URL" width="1902" height="1070" data-path="images/knowledge-base/gemini_cli/step3.png" />

    **Copy** the strata URL to clipboard - you'll need this in the next step.

    <Accordion title="🔐 OAuth Services (Most Common)">
      * Automatically redirected to OAuth authorization
      * Sign in to your account (GitHub, Google, Slack, etc.)
      * Grant necessary permissions
      * Redirected back to Klavis automatically
    </Accordion>

    <Accordion title="🔑 API Key Services">
      * Prompted to enter an API key
      * Follow service-specific instructions to generate key
      * Paste key in the provided field
      * Click **"Save"** to continue
    </Accordion>
  </Step>

  <Step title="Configure Gemini CLI">
    Copy Your Server URL and navigate to `~/.gemini/settings.json` on your computer

    Paste Your Server URL to **settings.json** file like the screenshot below

    <img src="https://mintcdn.com/klavisai/wCyW46nTT1afeF2W/images/knowledge-base/gemini_cli/step4.png?fit=max&auto=format&n=wCyW46nTT1afeF2W&q=85&s=497867dde846a892f00e9e49abd73352" alt="Paste Strata Server URL in settings.json" width="1920" height="1080" data-path="images/knowledge-base/gemini_cli/step4.png" />

    <Tip>
      You can add **Single** MCP Server URL directly here as well:

      1. Navigate to **Target Server** and click **Three Dots** next to your server
      2. Tap **Show Individual Server URL** and copy the URL
      3. Paste this URL in Gemini CLI settings as described above
    </Tip>
  </Step>

  <Step title="Verify Tools Loading">
    To verify that Strata is properly configured in Gemini CLI, run **`/mcp`** command in Gemini CLI Chat.

    <img src="https://mintcdn.com/klavisai/wCyW46nTT1afeF2W/images/knowledge-base/gemini_cli/step5.png?fit=max&auto=format&n=wCyW46nTT1afeF2W&q=85&s=1eee8b3bbac8c667926f821c62d82d64" alt="Strata Tools Loading in Gemini CLI" width="902" height="507" data-path="images/knowledge-base/gemini_cli/step5.png" />

    <Note>
      📋 **Restart** Gemini CLI to apply the new configuration
    </Note>
  </Step>

  <Step title="Start Using in Gemini CLI Chat">
    <img src="https://mintcdn.com/klavisai/wCyW46nTT1afeF2W/images/knowledge-base/gemini_cli/step6.jpg?fit=max&auto=format&n=wCyW46nTT1afeF2W&q=85&s=4912f291e5eae66a4175522a01680e63" alt="Using Strata in Gemini CLI Chat" width="1920" height="1332" data-path="images/knowledge-base/gemini_cli/step6.jpg" />

    Open Gemini CLI Chat and start using natural language:

    <CodeGroup>
      ```text GitHub theme={null}
      "Create a new issue titled 'Add dark mode' with priority label"
      ```

      ```text Slack theme={null}
      "Send a message to #general: 'Standup meeting in 5 minutes!'"
      ```

      ```text Gmail theme={null}
      "Send email to john@company.com about project update"
      ```

      ```text Notion theme={null}
      "Create a new page called 'Meeting Notes' with today's date"
      ```
    </CodeGroup>

    <Tip>
      🎯 Gemini CLI Chat automatically detects when to use **Strata** based on context - no need to specify explicitly!
    </Tip>
  </Step>

  <Step title="Happy Building! 🎉">
    You're all set! Your **Strata** is now integrated with Gemini CLI.
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="🔧 Tools Not Appearing">
    * Double-check your Server URL for typos
    * Ensure stable internet connection
    * Verify authentication in Klavis dashboard
    * Check Gemini CLI logs for error messages
    * Try completely restarting Gemini CLI
  </Accordion>

  <Accordion title="🔐 Authentication Issues">
    * Re-authenticate in the Klavis dashboard
    * Check if your OAuth tokens have expired
    * Verify API key permissions (for API key services)
    * Ensure you've granted all necessary permissions
  </Accordion>

  <Accordion title="⚡ Performance Issues">
    * Limit the number of active MCP servers
    * Check your internet connection speed
    * Restart Gemini CLI periodically
    * Contact support if issues persist
  </Accordion>
</AccordionGroup>

## Need Help?

<CardGroup cols={2}>
  <Card title="Community" icon="discord">
    Join our Discord for community support and discussions
  </Card>

  <Card title="Support" icon="headphones">
    Contact our technical support team for assistance
  </Card>
</CardGroup>

***
