Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • See all Red Hat products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Red Hat OpenShift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • See all technologies
    • Programming languages & frameworks

      • Java
      • Python
      • JavaScript
    • System design & architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer experience

      • Productivity
      • Tools
      • GitOps
    • Automated data processing

      • AI/ML
      • Data science
      • Apache Kafka on Kubernetes
    • Platform engineering

      • DevOps
      • DevSecOps
      • Red Hat Ansible Automation Platform for applications and services
    • Secure development & architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & cloud native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • See all learning resources

    E-books

    • GitOps cookbook
    • Podman in action
    • Kubernetes operators
    • The path to GitOps
    • See all e-books

    Cheat sheets

    • Linux commands
    • Bash commands
    • Git
    • systemd commands
    • See all cheat sheets

    Documentation

    • Product documentation
    • API catalog
    • Legacy documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore the Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Leverage AI for root-cause analysis with MCP servers in VS Code and Cursor

February 10, 2026
Louis Imershein
Related topics:
Artificial intelligence
Related products:
Red Hat Enterprise LinuxRed Hat Lightspeed

    Troubleshooting only gets more complicated with complexity and scale. We've all been there: Sifting through fragmented logs across multiple nodes or jumping between dashboards in hope of finding the root cause of a service failure. Red Hat addresses this issue with new model context protocol (MCP) servers (in Developer Previews at the time of writing) for Red Hat Enterprise Linux (RHEL) and Red Hat Lightspeed. By integrating these into you integrated development environment (IDE), you can turn raw system telemetry into actionable intelligence using natural language, without leaving your code.

    Why use MCP for RHEL and Red Hat Lightspeed?

    MCP is an open standard that allows an large language models (LLM) to interact directly with a system through a standardized interface. Integrating an MCP server into a tool like the open source Visual Studio Code editor, or the Cursor editor, allows an AI agent to act as a bridge between your local environment and your infrastructure.

    • The MCP server for RHEL provides a read-only interface to system information such as journalctl logs, process information, systemctl service statuses, and more.
    • The MCP server for Red Hat Lightspeed (formerly Red Hat Insights) connects to Red Hat's proactive analytics API. It allows you to query for common vulnerabilities and exposures (CVE) or specific recommendations directly from a prompt.

    For example, instead of manually trying to correlate a high-CPU alert with a recent deployment, you could ask an agent to "analyze recent system logs and service status to find why the application is experiencing latency."

    Configuration and deployment

    The most reliable way to run an MCP server is within a container using Podman. This ensures a consistent environment and prevents dependency drift on your workstation.

    • MCP server for RHEL: Read MCP server for RHEL documentation for detailed instructions.
       
    • MCP server for Red Hat Lightspeed: Read How to set up Red Hat Lightspeed model context protocol for detailed instructions. In addition, the containers or images you develop must have the Red Hat Lightspeed client and be registered with the Red Hat Lightspeed service as described in the Client configuration guide for Red Hat Lightspeed.

    Below are examples of how to integrate them into VS Code and Cursor but integration into other IDEs is possible as well.

    Integrate an MCP server with VS Code

    To connect VS Code to your MCP servers, update your .vscode/mcp.json configuration. This setup allows the LLM to call these servers over standard input/output (stdio).

    {  
      "mcpServers": {  
        "rhel-troubleshooter": {  
          "type": "stdio",  
          "command": "podman",  
          "args": [  
            "run", "-i", "--rm",  
            "-v", "${env:HOME}/.ssh/id_rsa:/var/lib/mcp/.ssh/id_rsa:ro",  
    "quay.io/redhat-services-prod/rhel-lightspeed-tenant/linux-mcp-server:latest"  
          ]  
        },  
        "lightspeed-mcp": {  
          "type": "stdio",  
          "command": "podman",  
          "args": [  
            "run", "-i", "--rm",  
            "--env", "LIGHTSPEED_CLIENT_ID",  
            "--env", "LIGHTSPEED_CLIENT_SECRET",  "quay.io/redhat-services-prod/insights-management-tenant/insights-mcp/red-hat-lightspeed-mcp:latest" 
          ],  
          "env": {  
            "LIGHTSPEED_CLIENT_ID": "YOUR_ID",  
            "LIGHTSPEED_CLIENT_SECRET": "YOUR_SECRET"  
          }  
        }  
      }  
    }

    Integrate MCP servers with Cursor

    Cursor provides a UI for managing MCP servers, making it easy to toggle them on or off.

    To add an MCP server, launch Cursor and navigate to Settings > Tools & MCP. Select Add New MCP Server.

    In the Add New MCP Server section, for each MCP server you must specify a name and command to run.

    For RHEL, set Name to RHEL-MCP and Command to:

    podman run -i --rm -v ~/.ssh/id_rsa:/var/lib/mcp/.ssh/id_rsa:ro quay.io/redhat-services-prod/rhel-lightspeed-tenant/linux-mcp-server:latest

    For Red Hat Lightspeed, set Name to Lightspeed-MCP and Command to:

    podman run -i --rm --env LIGHTSPEED_CLIENT_ID=YOUR_ID --env LIGHTSPEED_CLIENT_SECRET=YOUR_SECRET quay.io/redhat-services-prod/insights-management-tenant/insights-mcp/red-hat-lightspeed-mcp:latest

    Example: Track down the root cause

    Imagine that a web service written for Flask, the Python web framework, returns errors on your RHEL development virtual machine. You ask your IDE agent (like GitHub Copilot in Agent mode): "Why is Flask service failing on dev-node-01?"

    Based on your prompt, the agent uses the MCP server for RHEL to inspect the host. It identifies a permission denied error in a log directory. The agent reports that the failure stems from an SELinux context mismatch on /var/log/flask. It then provides the exact chcon or semanage commands to resolve the issue, and it can even apply these changes immediately to restore the service.

    Example: Gain insights into security

    An MCP service can also help harden your environment against security vulnerabilities. You might ask "Are there any security policies or Advisor hits for dev-node-01?"

    The MCP server for Red Hat Lightspeed identifies that the OpenSSH package needs an update to address a recent CVE. The agent also generates the specific dnf update command you need to run to perform the update. You can review and run this patch directly from your terminal window in the IDE.

    Example: Resolve performance issues

    Identifying bottlenecks often means a lot of manual work. An MCP server can automate data gathering. Suppose you notice unexpected latency in a database application built as a bootable container using image mode for RHEL. You ask your IDE agent "Analyze the performance of dev-db-01. Why is it slow?"

    The agent calls the MCP server for RHEL to run get_cpu_info and get_memory_info over SSH. It identifies a high load average and high iowait. The server flags a specific process consuming excessive virtual memory. Simultaneously, it queries the MCP server for Red Hat Lightspeed, which uses the Advisor service to find kernel tuning recommendations for database workloads. Advisor returns sysctl tuning parameters for virtual memory management. It also identifies that the application is swapping due to misconfigured huge pages.

    Summary

    By adopting MCP, you move toward assistants that don't just guess, but use the real-time system state for context. These servers can potentially provide "eyes and ears" for your LLM within a RHEL environment context, ensuring that troubleshooting is data-driven and executed within the safety of approved commands. Start using Red Hat assisted troubleshooting for your RHEL application development directly within your favorite IDE today.

    For more information check out these articles from Red Hat:

    • Smarter troubleshooting with the new MCP server for Red Hat Enterprise Linux (now in developer preview)
    • How to set up Red Hat Lightspeed model context protocol

    Related Posts

    • AI-driven vulnerability management with Red Hat Lightspeed MCP

    • A guide to AI code assistants with Red Hat OpenShift Dev Spaces

    Recent Posts

    • Leverage AI for root-cause analysis with MCP servers in VS Code and Cursor

    • How to integrate Developer Hub with OpenShift GitOps

    • AI meets you where you are: Slack, email & ServiceNow

    • Run Voxtral Mini 4B Realtime on vLLM with Red Hat AI on Day 1: A step-by-step guide

    • Deeper visibility in Red Hat Advanced Cluster Security

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue