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
journalctllogs, process information,systemctlservice 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:latestFor 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:latestExample: 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: