Model Context Protocol server for Red Hat API integration
概览
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. The server exposes the following Red Hat API tools: 1. - Search for knowledge base solutions 2. - Retrieve full solution content 3. - Find cases matching a query 4. - Retrieve detailed information about a specific case - Python 3.13 or higher - UV package manager (recommended Python package manager) - Red Hat API offline token (obtained from your Red Hat account) 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 Create a .env file in the project root with your Red Hat API token: Replace your_offline_token_here with your actual offline token from step 1. You can test the server using the MCP development tools:
README
以下为原文 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)
Installation
1. Install UV (if not already installed)
2. Clone and Setup Project
git clone
cd redhat-api-mcp
uv sync
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
Developing with the MCP Inspector
You can test the server using the MCP development tools:
uv run mcp dev redhat_mcp_server.py
This will start the MCP inspector, allowing you to interact with your tools interactively.
Integrating with Claude Desktop
To install the server in Claude Desktop, add this configuration to your Claude Desktop config file.
{
"mcpServers": {
"redhat": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/redhat-api-mcp",
"run",
"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.
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"redhat": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/redhat-api-mcp",
"run",
"redhat_mcp_server.py"
],
"env": {
"RH_API_OFFLINE_TOKEN": "your_actual_offline_token_here"
}
}
}
}