Chargebee Analytics MCP Server
Overview
The Chargebee Analytics MCP Server lets supported AI clients answer reporting and analytics questions using your Chargebee data. It converts a natural-language question into a validated, read-only SQL query and runs the query after applying the applicable access policies. For an overview of Chargebee MCP Servers, see Chargebee MCP Servers.
Use this server when you need to:
- Calculate MRR or ARR for a period, broken down by plan or currency.
- Count active subscriptions, grouped by status or plan.
- Total revenue or invoices, month by month.
- Track churn or cancellation counts over a quarter.
- Analyze counts or totals for customers and subscriptions that match specified criteria.
Prerequisites
Meet the following requirements before you configure the Analytics MCP Server:
- Your Chargebee site must meet the site eligibility requirements in the table below.
- Your Chargebee user role must be that of a Finance executive or Site admin.
- You must have access to RevenueStory.
Site eligibility for the Analytics MCP Server
| Requirement | Value |
|---|---|
| Product catalog | Product Catalog 2.0 sites, excluding dual-mode sites |
| Region | All regions |
| Site type | Live sites |
The Analytics MCP Server is not available on test sites.
Configure the Analytics MCP Server
You can configure MCP servers as follows:
- Log in to Chargebee Billing.
- Navigate to Settings > Configure Chargebee > Agentic AI > MCP Servers.
- Select the Chargebee Analytics MCP Server to open its configuration page.
Access and authentication
Under the Access & Authentication tab, turn on the MCP Access toggle to allow external AI clients to access this server via MCP.
Server URL
Under MCP Server URL, copy the URL displayed for your Chargebee site. The displayed URL points to the endpoint for your site's region, so use it as shown rather than building the URL yourself. For a site in the US data center, the URL follows this pattern:
https://YOUR-CHARGEBEE-SUBDOMAIN.mcp.chargebee.com/analytics_mcp_serverInstall the Analytics MCP Server in an AI client
Under MCP Installation, select your AI client and follow the displayed instructions. The following examples show the command for Claude Code and the configuration for Cursor. Claude Desktop uses a custom connector.
Claude Code
claude mcp add --transport http "analytics_mcp_server" "https://YOUR-CHARGEBEE-SUBDOMAIN.mcp.chargebee.com/analytics_mcp_server"Cursor
{
"mcpServers": {
"analytics_mcp_server": {
"url": "https://YOUR-CHARGEBEE-SUBDOMAIN.mcp.chargebee.com/analytics_mcp_server"
}
}
}Claude Desktop
Add the Analytics MCP Server in Claude Desktop as a custom connector. Use the URL shown under MCP Server URL and the authentication method configured on the Access & Authentication tab.
On a Pro or Max plan:
- Go to Customize > Connectors.
- Click + Add, then click Add custom connector.
- Enter a name for the connector.
- Enter the server URL shown under MCP Server URL, including the path, then click Continue.
- Review the authentication settings Claude detected. Change them if they do not match the method on the Access & Authentication tab, then click Continue.
- Under Authentication, select Sign in now, Sign in when needed, or No sign in.
- If Claude shows OAuth client, select Use Claude's published identity, Register automatically, or Use your own OAuth client. Select Use your own OAuth client only when the server requires a client you register, and enter the client ID and client secret. Claude hides OAuth client when you select No sign in.
- If the server uses an API key or another fixed credential, add it under Request headers.
- Click Add.
On a Team or Enterprise plan, an Owner adds the connector before members can use it:
- Go to Organization settings > Connectors.
- Click Add.
- Hover over Custom, then select Web.
- Enter a name for the connector.
- Enter the server URL shown under MCP Server URL, including the path, then click Continue.
- Review the authentication settings Claude detected. Change them if they do not match the method on the Access & Authentication tab, then click Continue.
- Under Authentication, select Sign in now, Sign in when needed, or No sign in.
- If Claude shows OAuth client, select Use Claude's published identity, Register automatically, or Use your own OAuth client. Select Use your own OAuth client only when the server requires a client you register, and enter the client ID and client secret. Claude hides OAuth client when you select No sign in.
- If the server uses an API key or another fixed credential, add it under Request headers.
- Click Add.
Members then go to Customize > Connectors and click Connect on that connector.
For supported AI clients, use the Add MCP to... button to add the server directly to your client.
Verify the Analytics MCP Server connection
After installation, confirm that the Analytics MCP Server appears as an available server or toolset in your AI client. Then submit a reporting question, such as:
What was the monthly recurring revenue for the previous completed month?
A successful response shows that the client can access the server and run an analytics query. If the connection fails, verify that the site is eligible, that MCP Access is turned on, and that the connecting user is a Finance executive or Site admin with RevenueStory access.
Toolsets
The Toolsets tab contains the Reporting & Analytics toolset, which has two tools. The tools are typically used together: Generate SQL Query produces the statement, and Execute SQL Query runs it.
- Generate SQL Query: Takes an analytics question in plain English, resolves relative dates, validates table and column names against the site's schema, and returns a ready-to-run SQL
SELECTstatement. It does not generate data-modifying statements such asINSERT,UPDATE, orDELETE. - Execute SQL Query: Runs the generated SQL query against the site's analytics data after applying query access policies and returns the results. If a query fails, the error is returned to the query generator so that it can correct and retry the query.
Schema discovery, including available tables, columns, and relationships, happens automatically and is not exposed as a separate tool.
Data freshness of Analytics MCP results
Analytics MCP results are typically refreshed within 1–3 hours and are guaranteed to be no more than 4 hours behind.
Limitations
- The Analytics MCP Server is intended for reporting, aggregation, trends, and grouped analysis.
- It generates read-only SQL
SELECTstatements and does not modify Chargebee data. - It is not intended for product or API how-to questions. Use the Knowledge Base MCP Server for those requests.
- It is not intended to retrieve a single named customer, subscription, invoice, or payment record. Use the Data Lookup MCP Server for those requests.
See also
- Chargebee Knowledge Base MCP Server: Answer questions using Chargebee docs and API references.
- Chargebee Data Lookup MCP Server: Retrieve customer, subscription, invoice, and payment data from your Chargebee site.
- Custom MCP Server: Combine Chargebee tools into a server tailored to your use case.