RevKeen MCP

Connect RevKeen billing tools to AI hosts over the Model Context Protocol

RevKeen MCP lets AI hosts like Claude, Cursor, and VS Code query your billing, customer, subscription, and usage data through the Model Context Protocol — an open standard for connecting AI assistants to external tools securely.

On this page you will learn how to connect your AI host to RevKeen, what tools are available, how the scope-based access model works, and when to choose MCP over SDKs or the REST API.

Quick start

The fastest path in Cursor is the same pattern Linear uses: one click, then OAuth.

Add RevKeen to Cursor

Cursor installs https://mcp.revkeen.com/mcp and opens RevKeen's browser OAuth screen. Grant the scopes you need and you are connected.

Claude Code:

claude mcp add --transport http revkeen https://mcp.revkeen.com/mcp

Try asking:

"List all overdue invoices from the last 30 days"


Connect from other hosts

If you are not using Claude Code, pick your host below. Cursor and VS Code have one-click install; JSON is the fallback.

One click: cursor://anysphere.cursor-deeplink/mcp/install?name=RevKeen&config=eyJ1cmwiOiJodHRwczovL21jcC5yZXZrZWVuLmNvbS9tY3AifQ==

Fallback .cursor/mcp.json:

{
  "mcpServers": {
    "revkeen": {
      "url": "https://mcp.revkeen.com/mcp"
    }
  }
}

stdio fallback only if the host cannot do remote HTTP:

npx -y mcp-remote https://mcp.revkeen.com/mcp

After your host connects, RevKeen opens a browser-based OAuth flow. The granted scopes become the tool permissions for that session.

Example prompts

Once connected, try these prompts in your AI host to see what RevKeen MCP can do:

PromptWhat it uses
"List all overdue invoices from the last 30 days"invoices_list with status filter
"Show me the details for customer Jane Smith"customers_list (search) then customers_get
"Which subscriptions are currently in dunning?"subscriptions_list_in_dunning
"What is the total usage for meter X this billing period?"usage_events_aggregate
"Show me all payments over $500 this month"payments_list with amount filter
"Check the usage balance for subscription abc-123"usage_balance_get
"List all active subscriptions for customer def-456"subscriptions_list with customer filter
"Dry-run a usage event to validate my payload"usage_events_dry_run

Your AI host translates these into the appropriate tool calls automatically.

Available tools

The default profile exposes 25 read-only tools across 9 areas. Write operations are behind a separate rollout policy.

Customers

ToolDescriptionScope
customers_listClassification: READ. List customers. Filter by email.customers:read
customers_getClassification: READ. Get detailed customer information including address and metadata.customers:read

Invoices

ToolDescriptionScope
invoices_listClassification: READ. List all invoices. Filter by status, customer, date range.invoices:read
invoices_getClassification: READ. Get detailed information about a specific invoice by ID.invoices:read
invoice_line_items_list_usage_eventsClassification: READ. Trace a usage invoice line back to the billing entries, meter matches, and events that produced it.invoices:read

Payments

ToolDescriptionScope
payments_listClassification: READ. List payments. Filter by customer, invoice, or status.payments:read
payments_getClassification: READ. Get payment details including status, amounts, and gateway info.payments:read

Orders

ToolDescriptionScope
orders_listClassification: READ. List orders. Filter by customer, status, or billing type.orders:read
orders_getClassification: READ. Get order details including line items and fulfillment info.orders:read

Subscriptions

ToolDescriptionScope
subscriptions_listClassification: READ. List subscriptions. Filter by status or customer.subscriptions:read
subscriptions_getClassification: READ. Get subscription details. Past-due subscriptions include dunning summary.subscriptions:read
subscriptions_list_in_dunningClassification: READ. List subscriptions currently in dunning (past_due). Includes dunning phase and retry info.subscriptions:read

Meters and pricing

ToolDescriptionScope
meters_listClassification: READ. List usage meters. Filter by active/archived status.prices:read
meters_getClassification: READ. Get detailed meter configuration including aggregation, filters, and event name.prices:read
meters_list_pricesClassification: READ. List all prices attached to a meter, including tier configurations.prices:read

Storefront

ToolDescriptionScope
storefront_products_listClassification: READ. List active, cart-eligible products with browser-safe display data, live prices, and derived availability. Requires Cart to be enabled (403 CART_DISABLED otherwise).products:read
storefront_products_getClassification: READ. Get one cart-eligible product by UUID, merchant product reference, or slug — same browser-safe projection as the list tool.products:read
storefront_availability_getClassification: READ. Get a product's availability (status plenty/low/soldout, remaining, display_mode). Products that do not track availability return status 'unknown'.products:read
storefront_status_getClassification: READ. Cart integration readiness report (activation, keys, origins, product-read, webhooks, availability) — the same semantics as revkeen cart status and the dashboard health panel. Never returns key material.apps:read

Usage billing

ToolDescriptionScope
usage_events_listClassification: READ. Query usage events. Filter by meter, customer, subscription, or time range.usage:read
usage_events_aggregateClassification: READ. Get aggregated usage summary for a meter over a time range. Returns total value and event count.usage:read
usage_events_dry_runClassification: READ. Default MCP affordance for validating usage attribution without persisting or creating a billable fact. Returns would_ingest/would_skip/would_fail status per event.usage:read
usage_balance_getClassification: READ. Get current usage balance for a customer or subscription. Returns per-meter breakdown with included allowance, overage, estimated charges, and margin data.usage:read

Integrations

ToolDescriptionScope
integrations_list_packagesClassification: READ. List packages from an external integration provider (e.g., PracticeHub).integrations:read
integrations_list_mappingsClassification: READ. List product mappings between external packages and RevKeen products.integrations:read

All 25 tools are read-only. Write and destructive operations (create, update, delete, send) are not exposed in the default profile. RevKeen is rolling these out behind a separate policy as the tool contract stabilizes.

Scope model

Access is controlled through read-focused OAuth scopes. Each scope unlocks specific tools. When you connect, the OAuth consent screen lets you choose which scopes to grant.

ScopeWhat it unlocks
invoices:readinvoices_list, invoices_get, invoice_line_items_list_usage_events
customers:readcustomers_list, customers_get
payments:readpayments_list, payments_get
orders:readorders_list, orders_get
subscriptions:readsubscriptions_list, subscriptions_get, subscriptions_list_in_dunning
prices:readmeters_list, meters_get, meters_list_prices
usage:readusage_events_list, usage_events_aggregate, usage_events_dry_run, usage_balance_get
integrations:readintegrations_list_packages, integrations_list_mappings
products:readstorefront_products_list, storefront_products_get, storefront_availability_get
apps:readstorefront_status_get

If your AI host connects but tools are missing, check that you granted the right scopes during OAuth.

How access works

Your host connects

Your MCP host sends a connection request to https://mcp.revkeen.com/mcp using Streamable HTTP transport.

RevKeen redirects you to a browser-based OAuth 2.1 consent screen. You sign in with your RevKeen account and select which scopes (customers, invoices, payments, etc.) to grant for this session.

Scoped session created

RevKeen issues an access token scoped to your merchant and the approved scopes. The token is audience-bound to the RevKeen MCP resource and is not forwarded to the underlying RevKeen API.

Tool calls enforced server-side

Every tool call is checked against your scopes, RevKeen role and permissions, merchant isolation, and rate limits. Engine API makes the authoritative permission decision and applies tenant safety controls before data is returned. The MCP server audit logs every call, scrubs PII from responses, and manages the session lifecycle for you.

This is the key difference between MCP and handing an AI tool a raw API key. The MCP server enforces access boundaries, tenant isolation, and tool contracts — the AI host cannot bypass them.

Tool stability

The 25 v1 tools are stable. RevKeen follows these guarantees:

  • No breaking changes to existing tool names, required parameters, or response shapes within a version.
  • New tools are added behind rollout policies and announced in the changelog →.
  • Deprecations are communicated with at least 90 days notice before removal.
  • Write tools will be introduced incrementally with explicit opt-in.

You can build automation on top of the v1 tool contract with confidence.

Rate limits

The MCP server enforces per-session rate limits to protect merchant resources:

ScopeLimit
Per session60 requests per minute
Per merchant300 requests per minute (across all sessions)

If you exceed a rate limit, the server returns an error with a retry_after hint. Wait the indicated time before retrying.

Rate limits are enforced server-side with Redis-backed counters. In production, rate limiting uses a fail-closed model — if the rate limit backend is unavailable, requests are denied rather than allowed.

Operational endpoints

EndpointPurpose
https://mcp.revkeen.com/Root metadata and public server information
https://mcp.revkeen.com/healthzHealth check (returns 200 OK when healthy)
https://mcp.revkeen.com/mcpRemote MCP endpoint (Streamable HTTP)

Troubleshooting

Host cannot connect

  • Confirm the URL is https://mcp.revkeen.com/mcp — not an older SSE or stdio endpoint.
  • Check that your host supports Streamable HTTP transport. Claude Desktop requires the @anthropic-ai/mcp-remote bridge (see setup above).
  • Verify your network allows outbound HTTPS to mcp.revkeen.com.

OAuth window does not open

  • Check for browser popup blockers — the OAuth flow opens in a new browser tab.
  • If you are behind a corporate proxy, ensure mcp.revkeen.com and your OAuth provider are allowlisted.
  • Try disconnecting and reconnecting in your host to re-trigger the flow.

Connected but tools are missing

  • Reconnect with the scopes you actually need. If you only granted customers:read, invoice tools will not appear.
  • Some hosts cache the tool list. Try reloading or restarting the host after reconnecting.

Tool call returns 403

  • The authenticated user may not have access to the target merchant. Verify your RevKeen account has the correct merchant role.
  • Check that the tool's required scope was granted during OAuth.

Tool call returns rate limit error

  • Wait for the retry_after period indicated in the error response.
  • If you are running automated workflows, add backoff logic between tool calls.
  • The per-merchant limit (300/min) is shared across all sessions — coordinate with teammates if multiple people are connected.

Data looks stale or empty

  • MCP reads live data from RevKeen. If results are empty, verify the merchant has the expected data in the RevKeen Dashboard.
  • The MCP server does not cache business data between calls.

When to use MCP vs SDKs vs REST vs CLI

SurfaceBest forTradeoffs
MCP →AI hosts and agent workflows — natural language queries, copilot integrationsRead-only today, scope-limited, requires OAuth
SDKs →Application code you own and deploy — type-safe, full API coverageRequires API key management, no AI-native features
API Reference →Raw HTTP integrations, webhook receivers, protocol detailsMost flexible but most manual
CLI →Terminal workflows, operator scripts, quick lookupsBest for humans, not for code

If you are building an AI agent that needs to take actions (create invoices, process refunds), use the REST API → with an API key today. MCP write tools are coming soon.

Self-hosting and local development

For contributors or advanced local development, you can run the MCP server from the RevKeen monorepo:

pnpm --filter @revkeen/mcp-server dev

The local server at apps/mcp-server uses the official MCP SDK with the same Streamable HTTP transport, OAuth bearer-token verification, scoped tool access, launch-policy model, and rate limiting as production.

See also

On this page