SS

stolostron/search-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

5 stars 4 forks 质量 54 趋势 33

ACM Search MCP Server

概览

Model Context Protocol (MCP) server providing access to Red Hat Advanced Cluster Management (ACM) search database and Kubernetes resources across managed clusters. - Red Hat Advanced Cluster Management - Helm For additional deployment options see Helm Deployment. - - Advanced Kubernetes resource search across all managed clusters with comprehensive filtering: - : kind, name, namespace, cluster, status - : labelSelector, clusterSelector, textSearch, ageNewerThan, ageOlderThan - : outputMode (list/count/summary/health), groupBy, sortBy, sortOrder, limit, countOnly Authentication auto-enables in Kubernetes environments: See docs/helm-install.md for complete Helm deployment guide. All configuration via environment variables or Helm values. - DATABASE_URL - PostgreSQL connection to ACM search database (auto-discovered in Helm)

README

以下为原文 README 节选,完整内容请查看原文。

MCP Server for Red Hat ACM

Model Context Protocol (MCP) server providing access to Red Hat Advanced Cluster Management (ACM) search database and Kubernetes resources across managed clusters.

This project is Tech Preview. Do not deploy in production environments.

Quick Start

Pre-requisites:

  • Red Hat Advanced Cluster Management
  • Helm

Deploy from Helm repository

helm repo add acm-mcp-server https://raw.githubusercontent.com/stolostron/search-mcp-server/main/charts
helm install acm-mcp-server acm-mcp-server/acm-mcp-server --create-namespace --namespace acm-search

For additional deployment options see Helm Deployment.

Access the MCP server

Option 1: Connect from Claude Code

ROUTE_URL=$(oc get route acm-mcp-server -n acm-search -o jsonpath='{.spec.host}')
TOKEN=$(oc whoami -t)
claude mcp add --transport http acm-search \
  "https://$ROUTE_URL/mcp" \
  --header "Authorization: Bearer $TOKEN"

# NOTE: If your cluster uses a self-signed certificate, start claude code with
# NODE_TLS_REJECT_UNAUTHORIZED=0 claude

Option 2: Using cURL

# Get the OpenShift ROUTE_URL and TOKEN
ROUTE_URL=$(oc get route acm-mcp-server -n acm-search -o jsonpath='{.spec.host}')
TOKEN=$(oc whoami -t)

# Search for failing pods across the fleet
curl -k -X POST "https://$ROUTE_URL/mcp" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/call","id":1,"params":{"name":"find_resources","arguments":{"kind":"Pod","status":"Failed,Error,CrashLoopBackOff","limit":5}}}'

Available Tools

  • find_resources - Advanced Kubernetes resource search across all managed clusters with comprehensive filtering:
    • Basic filters: kind, name, namespace, cluster, status
    • Advanced filters: labelSelector, clusterSelector, textSearch, ageNewerThan, ageOlderThan
    • Output control: outputMode (list/count/summary/health), groupBy, sortBy, sortOrder, limit, countOnly

Development/Testing

# Local development
DATABASE_URL="postgresql://user:pass@acm-hub:5432/search" go run ./cmd/server

# HTTP transport (for web/API access)
DATABASE_URL="your-db-url" go run ./cmd/server --transport=http --port=8080

# STDIO transport (for Claude Desktop integration)
DATABASE_URL="your-db-url" go run ./cmd/server --transport=stdio

Authentication (in-cluster)

Authentication auto-enables in Kubernetes environments:

# Zero-config deployment (auth auto-enabled)
helm install acm-mcp-server ./helm/acm-mcp-server --create-namespace --namespace acm-search

# Disable auth for testing (not recommended for production)
helm install acm-mcp-server ./helm/acm-mcp-server \
  --create-namespace --namespace acm-search \
  --set authentication.enabled=false

# Local testing with RBAC
MCP_ENABLE_AUTH=true MCP_KUBECONFIG=~/.kube/config DATABASE_URL="..." go run ./cmd/server

Helm Deployment

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →