Connect Red Hat Lightspeed (Insights) MCP with Gemini CLI

Updated

Red Hat Lightspeed (formerly Red Hat Insights) delivers proactive analytics, helping teams improve reliability, streamline operations, and reduce manual analysis. At the heart of this capability is the Model Context Protocol (MCP) server now in Developer Preview, which acts as a bridge to connect Red Hat Lightspeed functionality to your favorite AI/LLM client.

If you're using Gemini CLI as your AI-powered development environment, connecting it to the Red Hat Lightspeed MCP server unlocks the ability to interact with services like Advisor, Inventory, Vulnerability, and Image Builder using natural language.

To view our guidance for tooling other than Gemini CLI, please visit Integrate Red Hat Lightspeed with Model Context Protocol

Prerequisites

Important Before getting started, it is assumed that you have already completed the necessary foundational setup detailed in the This content is not included.prerequisite document.

Specifically, you should have already:

  • Set up your Service Account on console.redhat.com and secure your Client ID (INSIGHTS_CLIENT_ID) and Client Secret (INSIGHTS_CLIENT_SECRET).
  • Assigned the required Roles and Permissions to your service account (e.g., RHEL Advisor viewer).
  • Ensured you have a container runtime like Podman installed and running.

Connecting Red Hat Lightspeed MCP to Gemini CLI

The Gemini CLI supports two primary methods for integrating with the Content from github.com is not included.Red Hat Lightspeed MCP: a Manual STDIO configuration or a more advanced Streamable HTTP setup.

The Standard Input/Output (STDIO) method configures the Gemini CLI to launch and communicate with the Insights MCP container directly via the command line.

  1. Locate the Configuration File:

    • The Gemini CLI stores its configuration in a settings file. Create or edit the file located at: ~/.gemini/settings.json.
  2. Add the MCP Server Configuration:

    • Add the following JSON snippet to your settings.json file under the "mcpServers" object.
    • Crucially, you must replace <YOUR_CLIENT_ID> and <YOUR_CLIENT_SECRET> with the credentials you generated during the prerequisite steps.
{
  // ... other settings ...
  "mcpServers": {
    "insights-mcp": {
      "type": "stdio",
      "command": "podman",
      "args": [
        "run",
        "--env", "INSIGHTS_CLIENT_ID=<YOUR_CLIENT_ID>",
        "--env", "INSIGHTS_CLIENT_SECRET=<YOUR_CLIENT_SECRET>",
        "--interactive",
        "--rm",
        "ghcr.io/redhatinsights/insights-mcp:latest"
      ]
    }
  }
}
  1. Restart the Gemini CLI (if it was running) for the new configuration to take effect.

Option 2: Manual Streamable HTTP Installation (Advanced)

This method is useful if you want to run the Red Hat Lightspeed MCP server as a persistent background service, separate from the Gemini CLI process.

Step 1: Start the MCP Server

You need to manually start the container and expose its HTTP endpoint.

  1. Start the server using Podman. The --net host argument exposes the container's port to your local machine (typically port 8000).
podman run --net host --rm ghcr.io/redhatinsights/insights-mcp:latest http
  1. Note for Podman on Mac: If you are using a Podman machine on macOS, you may need to explicitly expose the port and set the host:
podman run -p 8000:8000 --rm ghcr.io/redhatinsights/insights-mcp:latest http --host 0.0.0.0

Step 2: Configure the Gemini CLI

  1. Edit your ~/.gemini/settings.json file.
  2. Add the following HTTP configuration under the "mcpServers" object. This configuration instructs the Gemini CLI to connect to the running local server.
{
  // ... other settings ...
  "mcpServers": {
    "insights-mcp": {
      "httpUrl": "http://localhost:8000/mcp",
      "headers": {
        "insights-client-id": "<YOUR_CLIENT_ID>",
        "insights-client-secret": "<YOUR_CLIENT_SECRET>"
      }
    }
  }
}

What's Next?

This release offers early access to powerful, MCP-driven workflows within Red Hat Lightspeed. We strongly encourage your feedback, including bug reports, requests for additional toolsets, and enhancement ideas, through the This content is not included.Red Hat Issue Router - select "MCP" and by contributing to our Content from github.com is not included.GitHub repository. Your input will directly refine and shape the future of Red Hat Lightspeed MCP.

SBR
Article Type