Skip to main content

Users: Connect Gemini CLI to the AI Gateway

To securely access your company's enterprise applications directly from the Gemini CLI, you must connect it to the JumpCloud AI Gateway. Connecting through JumpCloud ensures your enterprise data remains secure and your access is verified.

Configuring Gemini CLI

Important

Use the AI Gateway MCP server URL for your JumpCloud datacenter region. See JumpCloud Data Centers: Login URLs and Service Endpoints.

You can add the AI Gateway to your Gemini CLI using a simple terminal command or by manually editing your configuration file. Choose one of the following methods:

Method 1: Using the Command Line (Recommended):

  1. Open your terminal.

  2. Run the following command to add the AI Gateway as an MCP server. Use the URL for your datacenter region:

    • US: https://ai.jumpcloud.com/mcp
    • EU: https://ai.eu.jumpcloud.com/mcp
    • IN: https://ai.in.jumpcloud.com/mcp

    gemini mcp add --transport http jumpcloud-ai-gateway https://ai.jumpcloud.com/mcp

The example uses the US URL.

  1. You might need to restart your Gemini CLI session to ensure the new server configuration loads.

Method 2: Manually Editing the Configuration File
Alternatively, you can manually add the AI Gateway endpoint to your Gemini CLI configuration file using the HTTP streaming format.

  1. Open your Gemini CLI settings.json file.
  2. Add the JumpCloud AI Gateway to your mcpServers object using the JSON snippet below. Use the URL for your datacenter region:
    • US: https://ai.jumpcloud.com/mcp
    • EU: https://ai.eu.jumpcloud.com/mcp
    • IN: https://ai.in.jumpcloud.com/mcp
{
"mcpServers": {
"jumpcloud-ai-gateway": {
"httpUrl": "https://ai.jumpcloud.com/mcp"
}
}
}

The example uses the US URL.

  1. Save the file and restart your Gemini CLI session.

Authenticating Your Tools

After adding the MCP server in Gemini CLI, you must authorize and authenticate to the specific enterprise tools (such as Atlassian) before the AI can access them.

  1. You'll be redirected to the JumpCloud AI Gateway authorization page.
  2. Review the list of available enterprise tools and select the checkbox next to each tool you want your AI client to access.
  3. Authenticate to the selected tools based on their required connection method:
    • OAuth: Click Connect via OAuth. You'll be redirected to the application to securely sign in, and then returned to this page.
    • API Key: Enter your API key for the application in the text field and click Save. Click the documentation link provided in the UI if you need help finding your API token.
  4. Once all required tools display a green Connected status, click Authorize tools at the bottom of the page.
  5. Return to your terminal. Your AI client can now use the tools authorized through the gateway.

Was this information helpful?