Red Hat API MCP Server

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.

Category
访问服务器

README

Red Hat API MCP Server

Python 3.13+ MCP Compatible UV

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

The server exposes the following Red Hat API tools:

  1. Search Red Hat KCS Solutions - Search for knowledge base solutions
  2. Get Solution by ID - Retrieve full solution content
  3. Search Red Hat Cases - Find cases matching a query
  4. 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 fastmcp or uv 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

  1. Visit the Red Hat API Token Management page per KCS
  2. Log in to your Red Hat account
  3. Generate an offline token
  4. 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 terms
  • rows (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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选