Red Hat API MCP Server
Provides tools for searching and retrieving Red Hat Knowledge Centered Support (KCS) solutions and support cases, including getting solution details by ID, searching cases, and obtaining case details.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Red Hat API MCP Server search for RHEL 8 kernel panics"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: RHOAI Observability MCP
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 | sh2. 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.txtConfiguration
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" > .envReplace 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.pyThis 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) -> DictParameters:
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) -> DictParameters:
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/tokenLicense
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.
Available Tools
4 toolsget_caseGet CaseC
Get case details by case number.
Inputs: case_number (required), session_id. Returns: object
get_kcsGet KcsA
Get a specific solution by ID and extract structured content
Inputs: solution_id (required), session_id. Returns: object
search_casesSearch CasesB
Search for Red Hat cases and return a list of case numbers.
Inputs: query (required), rows, start, session_id. Returns: result
search_kcsSearch KcsB
Search for Red Hat KCS Solutions and return a list with Solution IDs.
Inputs: query (required), rows, start, session_id. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct action-resource pair: search vs get, and KCS vs cases. There is no overlapping or ambiguous functionality between the four tools.
All tool names follow a consistent verb_noun snake_case pattern, using search_ or get_ prefixes. The naming makes the purpose of each tool immediately clear.
With four tools covering two resource types, the server is tightly scoped and every tool earns its place. This is an appropriate size for a focused Red Hat support API integration.
The server provides both search and detail retrieval for KCS solutions and cases, which covers the core read-only workflow for this domain. There are no obvious gaps that would leave an agent unable to accomplish a typical KCS or case lookup task.
Maintenance
Related MCP Connectors
Manage tickets, run agents and workflows, query tables, and search workspace knowledge.
Read and write KukGit repositories, files, issues and pull requests from an AI assistant.
Search your knowledge bases from any AI assistant using hybrid RAG.
Search Kayako cases, replies, customers and help-center articles, and reply to or create cases.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Redmine instances to manage issues, projects, and users. It provides comprehensive tools for issue tracking, project oversight, and user management through the Redmine REST API.13 npmMIT
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants with direct access to Red Hat OpenShift AI observability data, enabling querying of Prometheus metrics, Alertmanager alerts, Loki logs, Grafana dashboards, and Kubernetes cluster state to troubleshoot vLLM inference workloads.5MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to discover and launch Ansible job templates on Ansible Automation Platform, monitor job status, and retrieve outputs.4-
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to find and manage Redmine tickets via the Redmine REST API, supporting issue listing, details, updates, and comments.15 npmMIT