# Baremetrics — how to use (mcp.ai)

Connect your Baremetrics account and use 8 tools for analytics straight from your AI agent. Connect with your own API key. Baremetrics provides subscription analytics, metrics, customer insights, and revenue data for recurring-revenue businesses.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_baremetrics?ms=1787291280000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `baremetrics_get_account`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/baremetrics`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/baremetrics/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/baremetrics/get/account` — Return the connected Baremetrics account identity, company, default currency, and calculation range.
- `POST https://api.mcp.ai/api/baremetrics/get/cohorts` — Return Baremetrics cohort analysis for comparing customer retention and revenue behavior across signup cohorts.
- `POST https://api.mcp.ai/api/baremetrics/get/metric/breakdown` — Return daily values for one Baremetrics metric broken down by contributing customers or plans over an inclusive date range.
  - body: { metric: string, end_date: string, breakdown: string, start_date: string }
- `POST https://api.mcp.ai/api/baremetrics/get/metric/summary` — Return wide daily Baremetrics business metrics for an inclusive date range, including MRR, revenue, and customer counts in each daily row.
  - body: { end_date: string, start_date: string }
- `POST https://api.mcp.ai/api/baremetrics/get/metric/trend` — Return the daily time series and prior-period comparison for one Baremetrics metric over an inclusive date range.
  - body: { metric: string, end_date: string, start_date: string, compare_to_days?: integer }
- `POST https://api.mcp.ai/api/baremetrics/get/recurring/revenue/resource` — Get one customer, plan, subscription, charge, or refund by its OID within a Baremetrics source.
  - body: { source_id: string, resource_oid: string, resource_type: string }
- `POST https://api.mcp.ai/api/baremetrics/list/recurring/revenue/resources` — List one page of customers, plans, subscriptions, charges, or refunds from a Baremetrics source, using only filters valid for the selected resource type.
  - body: { order?: string, search?: string, sort_by?: string, per_page?: integer, source_id: string, next_cursor?: string, customer_oid?: string, end_timestamp?: integer, resource_type: string, start_timestamp?: integer, subscription_oid?: string }
- `POST https://api.mcp.ai/api/baremetrics/list/sources` — List one page of payment and Baremetrics API sources in the connected account and return source IDs required by source-scoped resource tools; use next_cursor to fetch later pages.
  - body: { per_page?: integer, next_cursor?: string }

## Example prompts
- "What can I do in Baremetrics?"
- "Show me a summary of my Baremetrics account"

## More
- Page: https://mcp.ai/baremetrics
- Agent spec (llms.txt): https://mcp.ai/baremetrics/llms.txt
- Postman collection: https://mcp.ai/baremetrics/postman.json
