Red Hat API MCP Server
Integrates with Red Hat APIs to enable searching Knowledge Centered Support (KCS) solutions, retrieving solution details, searching support cases, and obtaining case details through LLM applications.
README
Red Hat API MCP Server
This project implements a Model Context Protocol (MCP) server that provides tools for interacting with Red Hat APIs, making it easy to integrate with LLM applications.
Table of Contents
- Features
- Prerequisites
- Installation
- Configuration
- Usage
- Available Tools
- Examples
- Troubleshooting
- Advanced Usage
- Contributing
Features
The server exposes the following Red Hat API tools:
- Search Red Hat KCS Solutions - Search for knowledge base solutions
- Get Solution by ID - Retrieve full solution content
- Search Red Hat Cases - Find cases matching a query
- Get Case Details - Retrieve detailed information about a specific case
Prerequisites
- Python 3.13 or higher
- UV package manager (recommended Python package manager)
- Red Hat API offline token (obtained from your Red Hat account)
- fastmcp (
pip install fastmcporuv pip install fastmcp)
Installation
1. Install UV (recommended)
UV is the recommended package manager for Python projects:
curl -LsSf https://astral.sh/uv/install.sh | sh
2. Clone and Setup Project
# Clone the repository
git clone <your-repository-url>
cd redhat-api-mcp
# Install dependencies with UV (recommended)
uv pip install -r requirements.txt
# Or with pip
pip install -r requirements.txt
Configuration
1. Get Your Red Hat API Token
- Visit the Red Hat API Token Management page per KCS
- Log in to your Red Hat account
- Generate an offline token
- Copy and save the token securely
2. Environment Setup
Create a .env file in the project root with your Red Hat API token:
# Create .env file
echo "RH_API_OFFLINE_TOKEN=your_offline_token_here" > .env
Replace your_offline_token_here with your actual offline token from step 1.
Usage
Running the MCP Server
You can run the server using fastmcp:
# Using UV (recommended)
uv run fastmcp run redhat_mcp_server.py
# Or using pip
fastmcp run redhat_mcp_server.py
This will start the MCP server on port 8000, allowing you to interact with your tools using any MCP client.
Integrating with Claude Desktop
To install the server in Claude Desktop, add this configuration to your Claude Desktop config file:
{
"mcpServers": {
"redhat": {
"command": "fastmcp",
"args": [
"run",
"/path/to/your/redhat-api-mcp/redhat_mcp_server.py"
],
"env": {
"RH_API_OFFLINE_TOKEN": "your_actual_offline_token_here"
}
}
}
}
Available Tools
search_kcs
Search for Red Hat KCS Solutions and Articles.
search_kcs(query: str, rows: int = 50, start: int = 0) -> List[Dict]
Parameters:
query(str): Search terms (supports advanced Solr syntax)rows(int, optional): Number of results to return (default: 50, max: 100)start(int, optional): Starting index for pagination (default: 0)
Returns: List of solution objects with id, title, score, and view_uri
get_kcs
Get a Red Hat solution by its ID and extract structured content.
get_kcs(solution_id: str) -> Dict
Parameters:
solution_id(str): The KCS solution ID
Returns: Dictionary with title, environment, issue, resolution, and root_cause
search_cases
Search for Red Hat support cases.
search_cases(query: str, rows: int = 10, start: int = 0) -> List[Dict]
Parameters:
query(str): Search termsrows(int, optional): Number of results to return (default: 10)start(int, optional): Starting index for pagination (default: 0)
Returns: List of case objects with case_number, summary, status, product, etc.
get_case
Get detailed information about a specific Red Hat support case.
get_case(case_number: str) -> Dict
Parameters:
case_number(str): The Red Hat case number (e.g., "01234567")
Returns: Detailed case information with summary, description, severity, and comments
Advanced Usage
Advanced Query Parameters
For detailed information about using advanced Solr query expressions with the Red Hat Hydra API, see expression.md.
Prompt Templates
The server includes sophisticated prompt templates for case analysis:
- Case Summary: Generates C.A.S.E. format summaries
- Case Resolution: Provides investigation workflows
- Multi-phase Analysis: Advanced case resolution protocols
Custom Configuration
You can override default API endpoints by adding these to your .env file:
# Optional: Custom API endpoints
RH_API_BASE_URL=https://access.redhat.com
RH_SSO_URL=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
License
This project is licensed under the MIT License - see the LICENSE file for details.
Note: This MCP server requires a valid Red Hat account and API access. Ensure you have the appropriate permissions for the Red Hat services you intend to access.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.