MCP server for the Red Hat Offline Knowledge Portal (OKP). Bridges LLM tool calls to the OKP Solr index so agents can search RHEL documentation, CVEs, errata, solutions, and articles.
Install dependencies:
uv sync
Run locally (stdio transport, default):
uv run okp-mcp
Run with HTTP transport:
uv run okp-mcp --transport streamable-http --port 8000
Settings come from CLI arguments and MCP_* environment variables. CLI args take precedence.
| Setting | Env var | Default | Description |
|---|---|---|---|
--transport |
MCP_TRANSPORT |
streamable-http |
stdio, sse, or streamable-http |
--host |
MCP_HOST |
0.0.0.0 |
Bind address for HTTP transports |
--port |
MCP_PORT |
8000 |
Bind port for HTTP transports |
--log-level |
MCP_LOG_LEVEL |
INFO |
Python log level |
--solr-url |
MCP_SOLR_URL |
http://localhost:8983 |
Base URL of the Solr instance |
Run okp-mcp --help for the full list.
Start the OKP Solr instance and MCP server together:
podman login registry.redhat.io
podman-compose up -dThis pulls the OKP Solr image from registry.redhat.io (requires authentication) and builds the MCP server container locally.
Build the MCP server image:
podman build -t okp-mcp -f Containerfile .
Install dev dependencies:
uv sync --group dev
Run the full CI suite locally:
make ci
Individual targets:
make lint # ruff check
make format # ruff format
make typecheck # ty check
make radon # cyclomatic complexity gate (A/B only)
make test # pytest with coverage
Functional test scenarios are defined in tests/functional_cases.py. They are gated behind the functional pytest marker and deselected by default. Run them with uv run pytest -m functional -v (requires a running Solr instance).
See LICENSE for details.