> 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 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"
      }
    }
  }
}
```

The MCP server needs a write-scope key (`rev_sk_*`) because it both reads Revenium data and can create alerts and modify resources — a metering-only key (`rev_mk_*`) will be rejected. See [API Key Permissions](/integrations/api-key-permissions.md) for the full key tier reference.

The MCP server is open source. 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](/integrations/mcp-server/rancher-prime.md). The repository also covers Claude Code shortcuts, IDE-specific install variants, troubleshooting, and the full configuration reference.

***

### <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.

***

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

Once connected, the MCP server exposes 18 tools organized around five operational areas. You interact with them through natural language — the assistant picks the right tool and action for each request.

#### Cost Intelligence and Analytics

The MCP server gives your assistant full access to Revenium's cost analytics engine. Ask for spend breakdowns by any dimension — provider, model, customer, agent, API key, or tool — over any time window from the last hour to the last 30 days.

* "Why did my costs spike yesterday?"
* "Show me a cost breakdown by model for the last 7 days"
* "Which customers are driving the most spend this month?"
* "What's my agent-level cost breakdown for the past 24 hours?"

**Anomaly detection** surfaces abnormal spend patterns across all dimensions, with configurable sensitivity and dollar-impact thresholds. **Budget alerts** cover three trigger types — spike detection for real-time monitoring, cumulative usage for period-based budgets, and relative change for week-over-week or month-over-month trend shifts — with delivery to Slack or email.

* "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 relative-change alert that fires when weekly spend increases by 20%"
* "Disable all alerts temporarily"

**AI Insights** triggers Revenium's recommendation engine, which analyzes your usage and returns findings across waste, provider concentration risk, reliability issues, and efficiency opportunities.

* "Run an AI insights analysis and show me the findings"
* "List my previous insight runs"

#### Entity Management

The MCP server is not read-only — it is a full management layer for Revenium entities. Your assistant can create, read, update, and delete customers, products, subscriptions, data sources, metering elements, and tools, all through conversation.

**Customers** are the organizations, subscribers, users, and teams that consume your AI-powered services. Manage their full lifecycle and analyze their relationships.

* "List all my customers"
* "Create a customer called Acme Corp"
* "Show me the relationships for customer X"

**Products** represent the APIs, services, or AI capabilities you are billing for. Create them from structured data, natural language, or templates with pricing models attached.

* "Create a product called Summarizer API at $0.01 per request"
* "Show me available product templates"
* "What pricing models are supported?"

**Subscriptions** connect customers to products. Create, search, cancel, and manage credentials for each subscription.

* "Subscribe Acme Corp to the Summarizer API"
* "List all active subscriptions"
* "Cancel subscription X"

**Data sources** represent the API keys and ingestion endpoints that route metering events to the right product.

* "Create a new data source for the Summarizer API"
* "Validate my data source configuration"

**Metering elements** define the meters — the specific dimensions and units — that metering events record against. Create them from templates and assign them to data sources.

* "List available metering element templates"
* "Create a token-count meter and assign it to source X"

**Tool Registry** manages the tools your AI agents use, with pricing models, cost tracking by agent and provider, success rates, and latency metrics.

* "Register a new tool called Document Parser at $0.005 per call"
* "Show me cost breakdown by agent for my tools"
* "What's the success rate for tool X?"

#### Metering and Transactions

Submit AI transaction events directly through the assistant — individually or in batch. The metering tools handle field validation, cost estimation, model lookup, and provider verification before submission.

* "Submit a metering event for an OpenAI GPT-4o call with 1500 input tokens and 500 output tokens"
* "Estimate the cost of a Claude Sonnet call with 10K input tokens"
* "Look up supported AI models"

For integration testing, the metering field validation tool generates test data, runs validation suites, and analyzes field mapping to verify that your metering pipeline is correctly configured before going to production.

* "Generate test metering data for my setup"
* "Run a validation suite against my field mapping"

#### Jobs and ROI

Track the performance and return on investment of individual AI agent jobs. Measure conversion funnels, calculate ROI across job types, and report business outcomes back to Revenium so cost data connects to the value it produced.

* "Show me ROI for my agent jobs this month"
* "What's my conversion funnel for job type X?"
* "Report a successful outcome for job Y with $500 revenue"

#### Workflows

For complex operations that span multiple tools, the workflow engine coordinates multi-step processes through guided templates. Instead of issuing five separate commands, describe what you need and the assistant walks through each step.

* "Onboard a new customer with a product, subscription, and budget alert"
* "Show me available workflow templates"

#### System and Diagnostics

The diagnostic tools validate your environment configuration, run health checks, analyze operation logs, and debug auto-discovery issues. Use them during initial setup or when troubleshooting connectivity.

* "Run a system health check"
* "Show me my environment variables and their status"
* "Search logs for errors in the last hour"
* "What's my onboarding status?"

The tool introspection system lets the assistant describe its own capabilities — list every available tool, inspect individual tool metadata, and discover supported actions and parameters.

* "List all available Revenium tools"
* "What actions does manage\_alerts support?"

#### Setup Assistants

Guided setup flows for email verification and Slack integration walk through configuration step by step, checking prerequisites and validating connectivity at each stage.

* "Help me set up my email for alert notifications"
* "Guide me through Slack integration setup"

***

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

| Tool                               | Category          | What it does                                                                               |
| ---------------------------------- | ----------------- | ------------------------------------------------------------------------------------------ |
| `business_analytics_management`    | Cost Intelligence | Spend breakdowns by provider, model, customer, agent, API key, and tool; anomaly detection |
| `manage_alerts`                    | Cost Intelligence | Budget alerts (spike, cumulative, relative-change) with Slack and email delivery           |
| `manage_ai_insights`               | Cost Intelligence | AI recommendation engine — trigger runs, review findings, submit feedback                  |
| `manage_customers`                 | Entity Management | Customer lifecycle — organizations, subscribers, users, teams                              |
| `manage_products`                  | Entity Management | Product creation with pricing models, templates, and natural language support              |
| `manage_subscriptions`             | Entity Management | Connect customers to products; credential management                                       |
| `manage_sources`                   | Entity Management | Data source and API key configuration                                                      |
| `manage_metering_elements`         | Entity Management | Meter definitions — templates, assignment to data sources                                  |
| `manage_tools`                     | Entity Management | Tool Registry — pricing, cost tracking, success rates, latency                             |
| `manage_metering`                  | Metering          | AI transaction submission (single and batch), cost estimation, model lookup                |
| `manage_metering_field_validation` | Metering          | Test data generation, validation suites, field mapping analysis                            |
| `manage_jobs`                      | Jobs and ROI      | Job performance, ROI calculation, conversion funnels, outcome reporting                    |
| `manage_workflows`                 | Workflows         | Multi-step cross-tool operations via guided templates                                      |
| `system_diagnostics`               | System            | Environment validation, health checks, log analysis, operation debugging                   |
| `configuration_status`             | System            | Onboarding status, auto-discovery, system health                                           |
| `tool_introspection`               | System            | Self-describing tool metadata and capability discovery                                     |
| `verify_email_setup`               | Setup             | Email configuration verification and guided setup                                          |
| `slack_setup_assistant`            | Setup             | Guided Slack integration configuration                                                     |

{% hint style="success" %}
All 18 tools are available immediately after connecting — no additional configuration required.
{% 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 alert** — ask "Create a daily budget alert at $500 with Slack notifications" to put a guardrail in place.

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

## Related

* [Rancher Prime Integration](/integrations/mcp-server/rancher-prime.md) — Kubernetes in-cluster deployment
* [Context7 and AI Docs Access](/integrations/context7.md) — AI-readable docs access without running an MCP server
* [AI Assistants](/track-and-control-costs/analyze-ai-tooling-spend.md) — Dashboard-level visibility into coding assistant adoption and spend
* [SDK Setup](/integrations/sdk-setup.md) — Instrument application code with Revenium SDKs and middleware
* [Slack](/integrations/slack.md) — Route alerts and reports to Slack channels
* [Revvy CLI](/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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
