> For the complete documentation index, see [llms.txt](https://docs.revenium.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.revenium.io/integrations/mcp-server/rancher-prime.md).

# MCP Server for Rancher Prime

The Revenium MCP Server for Rancher gives Liz — SUSE Rancher Prime's AI assistant — direct access to your Revenium account. Once connected, Liz can answer AI cost questions, set spend alerts, and investigate anomalies as a native member of her agent crew, alongside your Kubernetes and infrastructure tooling.

This repo wraps the standard Revenium MCP server with an HTTP transport so it can run inside a Rancher-managed cluster and be consumed by the Rancher AI Agent — which expects an HTTP endpoint, not the stdio interface used by local clients like Claude Code.

### What Liz Can Do With the Revenium MCP Server

Once connected, Liz can:

* Investigate cost spikes — ask "Why did my AI costs spike yesterday?" and get a breakdown by provider, model, customer, agent, or API key
* Detect anomalies — find abnormal spend patterns across all dimensions, with configurable sensitivity and dollar thresholds
* Set budget alerts — configure Slack or email notifications when monthly, daily, or per-transaction spend exceeds a threshold
* Monitor trends — get cost summaries for any time window (last hour, day, week, or month) broken down any way you need
* Catch cost increases early — set relative-change alerts that fire when spend rises or falls by a percentage week-over-week or month-over-month
* Meter its own usage — track Liz's own API calls back to your Revenium account for full operational transparency

### Requirements

* A Kubernetes cluster managed by Rancher (tested with Rancher 2.13.4)
* Rancher with the AI Assistant feature enabled
* kubectl configured against that cluster

A Revenium API key — get one at [app.revenium.ai](https://app.revenium.ai).

### Getting Started

#### Step 1: Create the API Key Secret

Do this once, outside the YAML, so your key is never committed to version control:

```zsh
kubectl -n cattle-ai-agent-system create secret generic revenium-mcp-credentials \
  --from-literal=REVENIUM_API_KEY=rev_sk_your_api_key_here
```

The MCP server requires a write-scope key (`rev_sk_*`) — it reads account data and can create alerts and modify resources, so a metering-only key (`rev_mk_*`) will be rejected. See [API Key Permissions](/integrations/api-key-permissions.md).

#### Step 2: Deploy the MCP Server

Apply the Rancher deployment manifest from the maintained Revenium MCP Rancher package:

```zsh
kubectl apply -f revenium-mcp-k8s.yaml
```

This deploys the MCP server as a Kubernetes Deployment + Service inside cattle-ai-agent-system. No custom image or registry is required — the container pulls the published `revenium-mcp` package at start.

#### Step 3: Verify the Server is Up

```
kubectl -n cattle-ai-agent-system rollout status deploy/revenium-mcp-server
kubectl -n cattle-ai-agent-system get svc revenium-mcp-server
```

The in-cluster endpoint is:

```
http://revenium-mcp-server.cattle-ai-agent-system.svc
```

{% hint style="info" %}
**Regulated environments.** The default manifest exposes the endpoint as HTTP because in-cluster traffic is typically isolated by the cluster network policy. If your environment requires encryption-in-transit for in-cluster traffic, route the service through your cluster's existing service mesh or ingress TLS termination.
{% endhint %}

#### Step 4: Register the Agent

Apply the AIAgentConfig CR to register the MCP endpoint with the Rancher AI Assistant:

```zsh
kubectl apply -f revenium-agent.yaml
```

This uses the same API the Rancher AI Assistant uses internally to seed its built-in Rancher, Fleet, and Cluster Provisioning agents.

#### Step 5: Confirm Liz Can See It

```
kubectl get aiagentconfigs -n cattle-ai-agent-system -w
```

Once the revenium entry appears, refresh the Rancher AI Assistant. The Revenium agent will show up in the agent picker alongside the built-in agents.\ <br>

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.revenium.io/integrations/mcp-server/rancher-prime.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
