> 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.md).

# MCP Server

The Revenium MCP Server connects AI agents to your Revenium account for cost intelligence, entity management, metering, alert governance, and operational diagnostics — all through natural conversation

The Revenium MCP Server surfaces your entire Revenium account as native tools inside any MCP-compatible AI assistant. Cost analysis, anomaly detection, budget alerts, customer and product management, metering, ROI tracking, and system diagnostics are all available through plain-language requests — no dashboards, no manual queries, no context-switching.

This is MCP-first integration: every Revenium capability that an operator or developer needs is accessible from the assistant's context, so cost intelligence and governance become part of every conversation.

***

### <i class="fa-route">:route:</i> Connect Your MCP Server

Choose the connection path that fits your environment:

| Connection model               | Use this when                                                                                          | Start here                                                      |
| ------------------------------ | ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------- |
| **Hosted OAuth (recommended)** | You want zero-install setup with per-user authentication and no shared API keys.                       | [Connect with OAuth](#connect-with-your-revenium-account-oauth) |
| **Local with API key**         | You need a local stdio server for CI, service accounts, or IDE setups that only support local servers. | [Run locally](#run-it-locally-with-an-api-key)                  |

#### Connect with Your Revenium Account (OAuth)

The fastest way to get started is the hosted MCP server. There is nothing to install and no API key to manage — you sign in with your Revenium account and the connection is ready:

```
https://mcp.revenium.ai/mcp
```

**Claude (web and desktop):** open **Settings > Connectors > Add custom connector**, paste the URL above, and complete the sign-in when your browser opens. Your assistant now has the full Revenium toolset.

**Claude Code:**

```bash
claude mcp add --transport http revenium https://mcp.revenium.ai/mcp
```

Then run `/mcp`, select **revenium**, and choose **Authenticate** — your browser opens to complete the sign-in.

Any MCP client that supports remote servers with OAuth authorization can connect the same way — see the [compatibility table](#supported-mcp-clients) below for tested clients.

The hosted connector serves the production environment. To point the MCP server at any other environment, use the local install below with that environment's API key and base URL.

{% hint style="info" %}
The hosted server authenticates every request with a short-lived OAuth token tied to your sign-in — no long-lived API key is created, stored, or shared.
{% endhint %}

#### Run It Locally with an API Key

You can also run the MCP server yourself and authenticate with an API key instead of OAuth — useful for CI environments, service accounts, and IDE setups that only support local stdio servers. Install `uv` (`pip install uv`) and add this to your MCP client config:

```json
{
  "mcpServers": {
    "revenium": {
      "command": "uvx",
      "args": ["revenium-mcp"],
      "env": {
        "REVENIUM_API_KEY": "rev_sk_your_api_key_here",
        "TOOL_PROFILE": "business"
      }
    }
  }
}
```

`TOOL_PROFILE` set to `business` gives the local server the same tools as the hosted connector, the full set this page describes; without it the server starts with its smaller default profile. A write key (`rev_sk_`) gives the MCP server all its tools. A read-only key (`rev_rk_`) works for read-only use; tools that create or change things are refused. A metering key (`rev_mk_`) is rejected. See [API Key Permissions](https://docs.revenium.io/integrations/api-key-permissions.md) for the full key tier reference.

The MCP server is open source under the MIT license, as are the [Revenium SDKs](https://docs.revenium.io/integrations/sdk-setup.md) for Python, Node.js and Go. The `uvx` install above runs it locally per developer, or your team can deploy a shared instance using the Dockerfile and docker-compose templates in the [Revenium MCP server repository](https://github.com/revenium/revenium-mcp). For Kubernetes deployments, see [Rancher Prime Integration](https://docs.revenium.io/integrations/mcp-server/rancher-prime.md). The repository also covers Claude Code shortcuts, IDE-specific install variants, troubleshooting, and the full configuration reference.

{% hint style="info" %}
This locally-run, open-source server is a separate thing from the hosted connector at `https://mcp.revenium.ai/mcp` described above — same underlying capabilities, but you install and manage this one yourself, authenticated with your own API key rather than OAuth sign-in.
{% endhint %}

***

### <i class="fa-desktop">:desktop:</i> Supported MCP Clients

| Client                | Transport | Connection method                                                                                                                | Status     |
| --------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| **Claude Web**        | HTTP      | Settings > Connectors > Add custom connector                                                                                     | Verified   |
| **Claude Desktop**    | HTTP      | Settings > Connectors > Add custom connector                                                                                     | Verified   |
| **Claude Code (CLI)** | HTTP      | `claude mcp add --transport http revenium https://mcp.revenium.ai/mcp`                                                           | Verified   |
| **Cursor**            | HTTP      | Settings > MCP > Add server (paste the hosted URL)                                                                               | Verified   |
| **Windsurf**          | stdio     | Local install via `uvx` in MCP client config                                                                                     | Verified   |
| **VS Code (Copilot)** | stdio     | Local install via `uvx` in MCP client config                                                                                     | Verified   |
| **Any MCP client**    | HTTP      | Point at `https://mcp.revenium.ai/mcp` with OAuth; or use the local stdio install for clients that do not support remote servers | Compatible |

{% hint style="info" %}
The [Revenium MCP server repository](https://github.com/revenium/revenium-mcp) maintains IDE-specific installation instructions and troubleshooting guides for each client.
{% endhint %}

***

### <i class="fa-buildings">:buildings:</i> Multi-Tenant by Design

The hosted MCP server is fully multi-tenant. Your Revenium team and tenant are resolved from your sign-in — not from server configuration — so:

* **Each person connects as themselves.** Teammates add the same connector URL and sign in with their own Revenium credentials; there are no shared secrets to distribute or rotate.
* **Data access is scoped to your team.** Every tool call runs in the context of the team associated with your account, and you only see that team's costs, products, subscriptions, customers, and alerts.
* **Access follows your account.** Deactivating a user in Revenium ends their MCP access with it — nothing else to clean up.
* **Your role applies.** Each call runs as the person who signed in, so it can do only what that person's [role](https://docs.revenium.io/account-and-resources/manage-users-and-teams.md#roles) allows. A user with the **Read Only** role gets read access to their team's data through the assistant. Creating, changing and deleting stay with the roles that allow them. A server you [run locally with an API key](#run-it-locally-with-an-api-key) acts as the person who owns the key, so the same applies.

***

### <i class="fa-chart-mixed">:chart-mixed:</i> What You Can Do

Once connected, the MCP server exposes the tools listed under Available Tools below. Most areas of Revenium have a read tool (usually `get_...`) that only looks at data and a write tool (`manage_...`) that creates, changes or deletes something; Costs & Revenue, Capabilities and Tool Introspection are read-only, and `system_diagnostics` and `tool_introspection` keep their own names. You interact with them through natural language: the assistant picks the tool for each request. Every write tool is labelled as a change, so clients that confirm changes with you, such as Claude, ask for your approval before running it; whether a client asks depends on the client and its settings.

#### Example prompts

These prompts each exercise one or more of the tools below. They are the same prompts the Claude Connectors Directory listing shows. The last one changes something, so Claude shows the change and asks for approval first.

1. What did we spend on AI last month, broken down by provider and model?
2. Who were our top 10 users by AI spend last month, and which department is each one in?
3. Were there any cost anomalies this week? Trace the biggest one to the agent, user or model behind it.
4. How close is each team to its AI budget this month?
5. Using the last 90 days, estimate next month's AI spend and name any team on track to go over its budget.
6. Which agents cost the most per job, and what outcome did each job produce?
7. Show the findings from my latest AI Insights run and what each one recommends.
8. What are our AI cost, revenue and margin by customer this month?
9. Put AI spend by department for the last six months into a table I can paste into the monthly report.
10. Set a monthly spend limit of $500 for the Platform team that warns at 80 percent.

#### Cost Intelligence and Analytics

Ask for spend breakdowns by any dimension (provider, model, customer, agent, user, department, API key or tool) over any period, from the last hour to any start and end date you name. Anomaly detection surfaces abnormal spend patterns with configurable sensitivity and dollar-impact thresholds. Spending alerts cover spike detection, cumulative budgets and relative change (week over week or month over month), delivered to Slack or email. Spend limits go one step further and warn or block when a team, user or agent crosses a threshold.

* "Why did my costs spike yesterday?"
* "Find cost anomalies in the last 7 days with at least $50 impact"
* "Set a daily budget alert at $500 that notifies Slack"
* "Create a spend limit that blocks the Research team at $2,000 a month"

**AI Insights** runs Revenium's recommendation engine and returns findings across waste, provider concentration risk, reliability issues and efficiency opportunities.

* "Run an AI Insights analysis and show me the findings"
* "What did the last AI Insights run recommend?"

#### Billing and Attribution

Your assistant can read and manage the entities that attribute AI usage and bill for it: customers (organizations, subscribers, users, teams and departments), products and their pricing, subscriptions, subscriber credentials, cost and revenue sources, usage meters, the tool registry and registered agents.

* "List all my customers"
* "Create a product called Summarizer API at $0.01 per request"
* "Subscribe Acme Corp to the Summarizer API"
* "Which tools in our tool registry have the lowest success rate this week?"

#### Metering and Transactions

Look up individual metered AI transactions and the models Revenium prices, or submit a transaction directly from the conversation.

* "Show the five most expensive AI calls from the last 24 hours, with the model, user and agent on each"
* "Submit a metering event for an OpenAI GPT-4o call with 1500 input tokens and 500 output tokens"

#### Jobs and ROI

Track the performance and return on investment of agent jobs: cost per job, conversion funnels, job type economics, and the outcome each job produced, reported back so cost data connects to the value it created.

* "Which agents cost the most per job this month?"
* "Report a successful outcome for job Y with $500 revenue"

#### Workflows

For operations that span several tools, guided workflow templates walk through each step, such as onboarding a customer with a product, a subscription and a budget alert.

#### System and Diagnostics

Check the connection's health, configuration and logs, review the setup checklist, connect Slack as an alert channel, and let the assistant describe its own tools.

* "Run a system health check"
* "List all available Revenium tools"

***

### <i class="fa-clipboard">:clipboard:</i> Available Tools

Read tools never change anything. Write tools are labelled as changes, so a client that confirms changes with you, such as Claude, asks before running one.

| Area                      | Read tool                | What it reads                                                                                              | Write tool               | What it changes                                                                                           |
| ------------------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------- | ------------------------ | --------------------------------------------------------------------------------------------------------- |
| Costs & Revenue           | `get_business_analytics` | AI costs and revenue by provider, model, customer, agent, user, department or tool; invoices and PR health | none                     |                                                                                                           |
| Guardrails: Alerts        | `get_alerts`             | Spending alerts, alert history, budget progress and anomalies                                              | `manage_alerts`          | Creates, updates, enables, disables and deletes spending alerts; resets budgets                           |
| Guardrails: Cost Controls | `get_cost_controls`      | Spend limits and the enforcement events and rules they produce                                             | `manage_cost_controls`   | Creates, updates and deletes spend limits that warn or block when crossed                                 |
| Intelligence              | `get_ai_insights`        | AI cost-intelligence runs, their findings and the feedback given on them                                   | `manage_ai_insights`     | Starts an AI cost-intelligence run or records feedback on a recommendation                                |
| Logs and Metering         | `get_metering`           | Metered AI transactions, supported models and integration guides                                           | `manage_metering`        | Submits an AI transaction to Revenium metering                                                            |
| Customers                 | `get_customers`          | Organizations, subscribers, users, teams, departments and their settings                                   | `manage_customers`       | Creates, updates and deletes them and changes their settings                                              |
| Products                  | `get_products`           | Products, their pricing, templates and subscriptions                                                       | `manage_products`        | Creates, updates and deletes products                                                                     |
| Subscriptions             | `get_subscriptions`      | Subscriptions, their usage, quotas and billed amounts                                                      | `manage_subscriptions`   | Creates, updates and deletes subscriptions                                                                |
| Credentials               | `get_credentials`        | Subscriber credentials and the guidance for setting them up                                                | `manage_credentials`     | Creates, updates and deletes subscriber credentials                                                       |
| Cost and Revenue Sources  | `get_sources`            | The sources that feed cost and revenue data                                                                | `manage_sources`         | Creates, updates and deletes cost and revenue sources                                                     |
| Usage Meters              | `get_usage_meters`       | Usage meters and meter templates                                                                           | `manage_usage_meters`    | Creates, updates and deletes usage meters                                                                 |
| Tool Registry             | `get_tools`              | Registered tools, their usage events, costs, latency and success rate                                      | `manage_tools`           | Registers, updates and deletes tools; records tool usage events                                           |
| Agent Squads              | `get_agents`             | Registered and discovered agents, squads and squad executions                                              | `manage_agents`          | Registers, updates and deletes agents                                                                     |
| All Jobs                  | `get_jobs`               | Jobs, their transactions, ROI, conversion funnels and job type economics                                   | `manage_jobs`            | Reports and amends job outcomes, period facts, job type economics and baselines                           |
| Workflows                 | `get_workflows`          | Workflow templates and the state and next step of a running workflow                                       | `manage_workflows`       | Starts a guided workflow or marks one of its steps complete                                               |
| Alert Channels (Slack)    | `get_slack`              | The Slack channels connected for alert notifications and the steps to connect a workspace                  | `manage_slack`           | Chooses the default Slack channel that alert notifications use                                            |
| System Setup              | `get_system_setup`       | The setup checklist, configuration status and onboarding guidance for this connection                      | `manage_system_setup`    | Changes this server's local setup, such as the notification email on a self-hosted server                 |
| System Diagnostics        | `system_diagnostics`     | The connection's health, configuration and logs, including ingestion failures                              | `manage_system_settings` | Turns tenant-wide settings on or off: strict ingestion mode, usage-based billing, attribution detail text |
| Capabilities              | `get_capabilities`       | The values the platform accepts for each resource type, such as currencies, plan types and metrics         | none                     |                                                                                                           |
| Tool Introspection        | `tool_introspection`     | The tools this server offers and the metadata of each one                                                  | none                     |                                                                                                           |

{% hint style="success" %}
Every tool in the table is available as soon as you connect, on the hosted connector and on a local install with `TOOL_PROFILE` set to `business`. Nothing else to configure.
{% endhint %}

{% hint style="info" %}
A few areas stay empty until the matching integration is connected: provider cost sources need a provider admin key, the Slack alert channel needs a Slack workspace sign-in, PR health needs a [GitHub connection](https://docs.revenium.io/track-and-control-costs/analyze-ai-tooling-spend/github-integration.md) through a personal access token or the Revenium GitHub App, and invoices appear only when usage-based billing is on.
{% endhint %}

***

### <i class="fa-forward">:forward:</i> What to Do Next

1. **Connect** using the [OAuth setup](#connect-with-your-revenium-account-oauth) above, then ask your assistant "Run a system health check" to verify the connection.
2. **Explore your spend** — try "Show me a cost summary for the last 7 days" to see what your analytics surface looks like through conversation.
3. **Set your first guardrail** — ask "Create a daily budget alert at $500 with Slack notifications" or "Set a monthly spend limit of $500 for the Platform team that warns at 80 percent". In Claude, the change is shown to you for approval before it runs.

For programmatic metering from application code, see [SDK Setup](https://docs.revenium.io/integrations/sdk-setup.md). For one-command codebase instrumentation, see [Revvy CLI](https://docs.revenium.io/integrations/revvy-cli.md).

## Related

* [Rancher Prime Integration](https://docs.revenium.io/integrations/mcp-server/rancher-prime.md) — Kubernetes in-cluster deployment
* [Context7 and AI Docs Access](https://docs.revenium.io/integrations/context7.md) — AI-readable docs access without running an MCP server
* [AI Assistants](https://docs.revenium.io/track-and-control-costs/analyze-ai-tooling-spend.md) — Dashboard-level visibility into coding assistant adoption and spend
* [SDK Setup](https://docs.revenium.io/integrations/sdk-setup.md) — Instrument application code with Revenium SDKs and middleware
* [Slack](https://docs.revenium.io/integrations/slack.md) — Route alerts and reports to Slack channels
* [Revvy CLI](https://docs.revenium.io/integrations/revvy-cli.md) — Guided codebase instrumentation from the command line


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
