No Spreadsheets. No Surprises.

Revenium MCP Server

The Revenium MCP Server is the fastest way to connect AI agents — like Claude — directly to your Revenium account.

Instead of building dashboards and running manual queries, you ask your AI assistant in plain English: "What's driving my AI cost spike this week?" or "Set up an alert if any single transaction exceeds $5."

The MCP server handles the rest.

This is MCP-first integration: Revenium's capabilities surface as native tools inside your AI assistant's context, so cost intelligence and governance become part of every conversation.

What You Can Do With the MCP Server

Once connected, an agent can:
Arrow Up Icon

Investigate Cost Spikes

Ask "Why did my costs spike yesterday?" and get a breakdown by provider, model, customer, agent, or API key

Brain Icon

Detect Anomalies

Find abnormal spend patterns across all dimensions, with configurable sensitivity and dollar thresholds

Analytics Icon

Monitor Trends

Get cost summaries for any time window (last hour, day, week, or month) broken down any way you need

Arrow Up Icon

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

Money Icon

Meter its Own Usage

Track the agent's own API calls back to your Revenium account for full operational transparency

Gear Icon

Set Budget Alerts 

Trigger Slack or email notifications when monthly, daily, or per-transaction spend exceeds a threshold

Script Icon

Integrate Metering Into Your App 

Get working code examples and implementation guidance for Python and JavaScript without leaving your IDE

Analytics Icon

Track Agent Job ROI

Measure the business outcomes and return on investment of individual AI agent jobs

Getting Started

Step 1: Install uv
Copy Icon
pip install uv
uv is a fast Python package manager used to run the MCP server without a manual install.
Step 2: Add to Your MCP Config
Copy Icon
{
  "mcpServers": {
    "revenium": {
      "command": "uvx",
      "args": ["revenium-mcp"],
      "env": {
        "REVENIUM_API_KEY": "hak_your_api_key_here"
      }
    }
  }
}

This works with any MCP-compatible client. Use this as your baseline — the Claude Code and IDE-specific steps below are just convenience wrappers around the same config.
For Claude Code
Copy Icon
{
  claude mcp add revenium \
  -e REVENIUM_API_KEY=hak_your_api_key_here \
  -- uvx revenium-mcp

For Cursor, Augment, or Other IDEs
Add the JSON config above to your IDE's MCP settings file (e.g. ~/.cursor/mcp.json).
1. Install SDK
Copy Icon
pip install revenium-middleware-openai
2. Configure Environment Variables
Copy Icon
export REVENIUM_METERING_API_KEY="YOUR_REVENIUM_KEY"export OPENAI_API_KEY="YOUR_OPENAI_KEY"
3. Import Revenium SDK
Copy Icon
import openai

# The following line is the only required change
import revenium_middleware_openai

response = openai.chat.completions.create
	model="gpt-4",
	messages=[
		{
		"role": "system",
		"content": "You are a helpful assistant."
Pro Tip:
The latest SDK options & configuration scripts can always be found in the 'Get Connected' page in the Revenium app. Copy the exact code required to install the SDK with your account's API key.

See It In Action

Watch how Revenium works in under 2 minutes
No Spreadsheets. No Surprises.

Get Up and
Running in 2 Minutes

Clear, actionable data. Instant value.Just a few lines of code to get started.