rhdp-blog-search
by dmc5179
README.md
# Red Hat Developer Blog Search - MCP Server
MCP server that searches and reads content from the Red Hat Developer site
(developers.redhat.com). Built on the Hydra/Solr search API that powers the
site's search page.
## Tools
| Tool | Description |
|------|-------------|
| `search_rhdp` | Search blogs, articles, learning paths, etc. Filter by content type, product, topic. Sort by relevance or date. |
| `fetch_rhdp_page` | Fetch full article text from a `developers.redhat.com` URL. Returns clean markdown extracted from the page. |
## Build the container
```bash
podman build -t rhdp-blog-search:latest -f Containerfile .
```
## Configure Claude Code
Add the server to a **project-level** settings file so it only loads when you
are working in a project that needs it. This avoids adding tool descriptions to
every session's system prompt (which costs input tokens).
Create or edit `.claude/settings.json` in the project where you want access:
```json
{
"mcpServers": {
"rhdp-blog-search": {
"command": "podman",
"args": ["run", "-i", "--rm", "rhdp-blog-search:latest"]
}
}
}
```
To use it globally (loads every session — more token overhead), add the same
block to `~/.claude/settings.json` instead.
### Keeping token cost low
The MCP server **only runs while a Claude Code session is active** — Podman
starts the container when the session begins and stops it when the session ends.
There is no background daemon.
However, the two tool descriptions are included in every prompt of a session
where the server is configured. To minimize unnecessary cost:
- **Use project-level config** (`.claude/settings.json` in the project root)
rather than global config. The tools only appear in sessions started from that
directory.
- **Don't add it to your home directory config** unless you want it everywhere.
- Alternatively, start Claude Code with an explicit MCP config file:
```bash
claude --mcp-config path/to/mcp.json
```
## Usage in Claude Code
Once configured, ask Claude to use the tools naturally:
> Search Red Hat Developer blogs about OpenShift Virtualization best practices
> and summarize what you find. Cite each blog with its URL.
> Find the newest blog posts about OpenShift GitOps and give me a summary of
> each one with links.
> Research how to set up OpenShift AI on Developer Sandbox. Use the Red Hat
> Developer blog search to find relevant articles, then read the most relevant
> ones and give me a step-by-step guide with citations.
Claude will call `search_rhdp` to find relevant content, then `fetch_rhdp_page`
to read specific articles, and cite them with URLs from the results.
### search_rhdp parameters
| Parameter | Default | Description |
|-----------|---------|-------------|
| `query` | *(required)* | Search terms |
| `content_type` | `blog_post` | Comma-separated: `article`, `blog_post`, `books`, `cheat_sheet`, `events`, `learning_path`, `video_resource` |
| `product` | | Filter by product, e.g. `Red Hat OpenShift` |
| `topic` | | Filter by topic, e.g. `Kubernetes` |
| `sort` | `relevant` | `relevant`, `newest`, `oldest` |
| `max_results` | `10` | Number of results (max 50) |
## CLI usage (without MCP)
The search module also works standalone:
```bash
python3 rhdp_blog_search.py openshift --type blog_post --sort newest --rows 5
python3 rhdp_blog_search.py openshift --facets-only
python3 rhdp_blog_search.py openshift --type blog_post --json
```
## How it works
The Red Hat Developer search page is a React SPA that queries a Solr-backed
API at `access.redhat.com/hydra/rest/search/platform/developers`. This server
calls that API directly, bypassing the JavaScript frontend, and returns
structured JSON results. The `fetch_rhdp_page` tool fetches individual blog
pages and extracts article text using BeautifulSoup.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues