# Orb MCP

> Orb connects usage-based billing logic to your AI agent. It lets you automate revenue operations tasks like ingesting usage events, managing customer accounts, and predicting invoices directly through natural conversation.

## Overview
- **Category:** data-management
- **Price:** Free
- **Tags:** usage-based-billing, revenue-operations, subscription-management, metering, invoicing, fintech

## Description

Need to track complex usage metrics or manage subscriptions without opening a dozen dashboards? This MCP handles the heavy lifting of usage-based billing cycles. Your agent can read live data streams, check historical financial records, and update billing information on demand. You ask for it—say you need to know what next month's invoice will look like, or perhaps you want to process a batch of usage events from last night. The MCP handles the API calls, ensuring your revenue operations run smoothly.

Connecting this through Vinkius means you get access to all these financial tools in one place, no matter if you use Claude, Cursor, or another compatible agent. It’s about getting accurate billing data instantly, letting you focus on product strategy instead of spreadsheet reconciliation.

## Tools

### cancel_subscription
Stops an existing subscription for a given customer.

### create_customer
Adds a brand new user record to the billing system using their name and email.

### create_ledger_entry
Records a financial adjustment, either adding or subtracting prepaid credits.

### create_subscription
Initializes a new subscription plan for a customer account.

### fetch_ledger
Retrieves the complete history of credit adjustments for a specific customer.

### get_upcoming_invoice
Looks up the predicted amount and details for an invoice before it's finalized.

### ingest_events
Processes batches of usage data, requiring customer ID, event name, timestamp, and a unique idempotency key.

### list_customers
Pulls a complete list of all customers currently in the system.

### list_invoices
Retrieves historical records of billing invoices.

### update_subscription
Modifies an existing subscription's details or plan type.

## Prompt Examples

**Prompt:** 
```
List the last 5 customers created in Orb.
```

**Response:** 
```
I've retrieved the latest customers. The most recent entries include 'Acme Corp' (ID: cust_821), 'Global Tech' (ID: cust_932), and 'Starlight Inc' (ID: cust_104). Would you like to see the subscription details for any of them?
```

**Prompt:** 
```
Ingest a usage event for customer cust_123: 50 units of 'api_requests'.
```

**Response:** 
```
Usage event successfully ingested for 'cust_123'. I've used a unique idempotency key for this batch to ensure accurate tracking. The 50 units of 'api_requests' are now reflected in their usage metrics.
```

**Prompt:** 
```
What is the upcoming invoice amount for subscription sub_987?
```

**Response:** 
```
The upcoming draft invoice for subscription `sub_987` is currently at $450.00. This includes the base plan fee plus $120.00 in metered usage accrued during the current period.
```

## Capabilities

### Ingesting Usage Events
Send large batches of usage events to track consumption in real-time for billing purposes.

### Managing Customer Accounts
Create new customer profiles and retrieve detailed information or a list of all existing users, including external IDs.

### Handling Subscriptions
Set up, modify, cancel, or update an existing subscription tied to a specific billing plan.

### Predicting and Listing Invoices
Fetch draft invoices for upcoming billing cycles or retrieve a full list of past invoices.

### Adjusting Credits
Manage prepaid credits by creating detailed ledger entries, whether they're increases, decreases, or expirations.

## Use Cases

### Checking Customer Credit Status
A financial analyst needs to know if a client has enough credits before enabling premium features. Instead of navigating through three tabs, they ask their agent to fetch_ledger for the account, getting an immediate yes or no.

### Onboarding a New Client
The RevOps manager signs up a new user and needs them billed immediately. They prompt their agent with create_customer and then follow up to create_subscription in two steps, all without leaving the chat window.

### Debugging Usage Failures
An engineering team member notices usage spikes but isn't sure if events were recorded. They use ingest_events with a specific customer ID and batch keys to verify delivery status immediately.

### End-of-Cycle Billing Review
The finance department needs a summary of all invoices for the last quarter. The agent runs list_invoices, providing an immediate overview that saves hours of database querying.

## Benefits

- Never manually export customer lists again. Use list_customers to get all user metadata, letting your agent find a specific ID or status for you.
- Predict revenue accurately by calling get_upcoming_invoice. You’ll know the estimated bill amount—including metered usage—before month-end close.
- Process huge volumes of data efficiently. The ingest_events tool handles batch processing, ensuring every unit of consumption is tracked with unique idempotency keys.
- Maintain accurate financial records by using create_ledger_entry to manage prepaid credits and adjustments without touching a spreadsheet.
- Handle customer changes instantly. You can use create_subscription or update_subscription right from your chat interface when an account needs adjusting.

## How It Works

The bottom line is you talk to your agent, and the MCP runs the necessary billing commands in the background.

1. Subscribe to this MCP and provide your Orb API Key.
2. Connect the credentials to your preferred AI client (like Cursor or Claude).
3. Instruct your agent using natural language; it will then execute billing actions against the Orb platform.

## Frequently Asked Questions

**How do I ingest usage events using Orb MCP?**
You use the ingest_events tool by providing the required customer ID, event name, timestamp, and a unique idempotency key. The agent ensures the data is recorded accurately in bulk.

**Can Orb MCP create new customers?**
Yes. Use the create_customer tool to add a brand new user record, specifying both their name and email address for billing purposes.

**How do I check if an invoice is coming up with Orb MCP?**
Call get_upcoming_invoice. This retrieves the draft total, letting you see exactly how much will be billed next without needing to wait for the official date.

**Does Orb MCP handle credit adjustments?**
Yes, it uses create_ledger_entry to manage prepaid credits. You can record entries for increments, decrements, or expirations easily.