MCP
This guide provides reference details for the MCP server to interact with EvalHub.
Prerequisites
Section titled “Prerequisites”The following installation steps assumes you want to use a dedicated “agent” ServiceAccount when using EvalHub multi-tenant deployed on an OpenShift cluster.
Create a team-a-agent ServiceAccount:
oc apply -f - <<EOFapiVersion: v1kind: ServiceAccountmetadata: name: team-a-agent namespace: team-aEOFGrant team-a-agent ServiceAccount the required permissions:
oc apply -f - <<EOFapiVersion: rbac.authorization.k8s.io/v1kind: Rolemetadata: name: evalhub-evaluator namespace: team-arules: - apiGroups: [trustyai.opendatahub.io] resources: [evaluations, collections, providers] verbs: [get, list, create, update, delete] - apiGroups: [mlflow.kubeflow.org] resources: [experiments] verbs: [create, get]---apiVersion: rbac.authorization.k8s.io/v1kind: RoleBindingmetadata: name: evalhub-evaluator-binding namespace: team-aroleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: evalhub-evaluatorsubjects: - kind: ServiceAccount name: team-a-agent namespace: team-a # required for ServiceAccount subjectsEOFInstallation of MCP in the AI Agent
Section titled “Installation of MCP in the AI Agent”Set “agent” ServiceAccount values in a dedicated profile for the EvalHub CLI:
evalhub --profile agent config set base_url https://evalhub-opendatahub.apps.(...).openshiftapps.comevalhub --profile agent config set tenant team-aevalhub --profile agent config set token $(oc create token team-a-agent -n team-a --duration=8760h)This makes an “agent” configuration profile for the CLI:
active_profile: defaultprofiles: agent: base_url: https://evalhub-opendatahub.apps.(...).openshiftapps.com tenant: team-a token: ...Then add MCP “evalhub” via evalhub CLI (this example assumes Claude as the AI Agent):
claude mcp add evalhub -- evalhub --profile agent mcpPlease notice this adds the mcp to the current (Claude’s) Project, to add globally you need:
- use
-s userwhen adding MCP so to install the MCP globally in~/.claude.jsonfor allprojects - you need evalhub CLI available system-wide
Troubleshooting
Section titled “Troubleshooting”Ensure evalhub “agent” configuration is healthy:
evalhub --profile agent healthUse evalhub “agent” configuration with MCP Inspector by starting it where the evalhub CLI is available:
npx @modelcontextprotocol/inspectorUse:
command:evalhub
arguments:--profile agent mcp