Chargebee MCP server for AI agents

Live

API KEY

SUBSCRIPTION BILLING

Accounting & Finance

Chargebee gives your agent subscription billing in your Chargebee site: look up customers, subscriptions, and invoices, create and change subscriptions, issue credit notes and coupons, and record payments.

  • Per-user credentials: each call uses the actual user's API key, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
Chargebee
agent · Acme Q3
Run
Pause the subscription for customer cust_4821 at the end of the term.
S
chargebee_subscription_pause
284ms
Billing agent
Paused the subscription for cust_4821 at the end of the current term. It stays paused until you resume it.
Sources: Chargebee subscriptions, 1 subscription
chargebee
1 subscription
18:29
Message Claude...

Tools your subscription billing agent reaches for on Chargebee, scoped per user.

CALL ANY TOOL
27 tools for subscription billing in Chargebee: look up customers, subscriptions, and invoices, create and change subscriptions, issue credit notes and coupons, and record offline payments.
chargebee_coupon_create
Create coupon
Create a percentage, fixed-amount or free-quantity coupon in Chargebee that applies to the invoice total or to specific items. Returns the new coupon object. Use chargebee_coupon_create to set up a new discount. Apply it with coupon_ids on chargebee_subscription_create or chargebee_subscription_update.
Parameters
Name
Type
Required
Description
apply_on
string
Required
What the discount applies to: invoice_amount (the invoice subtotal) or each_specified_item (each matching line item; set item_constraints). Example: invoice_amount. One of: `invoice_amount`, `each_specified_item`.
id
string
Required
Unique ID for the coupon, up to 100 characters; customers can also enter it as a code. Example: SUMMER20.
name
string
Required
Display name of the coupon, up to 50 characters, unique on the site. Example: Summer 20% off.
currency_code
string
Optional
ISO 4217 currency of discount_amount, for fixed_amount coupons on multi-currency sites. Example: USD.
discount_amount
integer
Optional
Amount to deduct, in the currency's smallest unit (e.g. 1000 is $10.00), when discount_type is fixed_amount. Example: 1000.
discount_percentage
number
Optional
Percentage to deduct, from 0.01 to 100, when discount_type is percentage. Example: 20.
discount_type
string
Optional
Type of discount: percentage (default, set discount_percentage), fixed_amount (set discount_amount and currency_code) or offer_quantity. Example: percentage. One of: `fixed_amount`, `percentage`, `offer_quantity`.
duration_type
string
Optional
How long the discount lasts on a subscription: one_time, forever (default) or limited_period (set period and period_unit). Example: limited_period. One of: `one_time`, `forever`, `limited_period`.
invoice_name
string
Optional
Name shown on invoices instead of name. Example: Summer discount.
item_constraints
object
Optional
Which items the coupon applies to, written as parallel lists (index 0 of each list is the first rule). constraint is all, none, specific or criteria; item_type is plan, addon or charge; item_price_ids (for specific) is a JSON array written as text. Needed when apply_on is each_specified_item. Example: {"constraint": ["all"], "item_type": ["plan"]}.
max_redemptions
integer
Optional
Maximum number of times the coupon can be redeemed. Leave empty for no limit. Example: 100.
period
integer
Optional
Number of period_units the discount lasts, when duration_type is limited_period. Example: 3.
period_unit
string
Optional
Unit of period, when duration_type is limited_period. Example: month. One of: `day`, `week`, `month`, `year`.
valid_till
integer
Optional
Last time the coupon can be applied to new subscriptions. Unix timestamp in seconds (UTC). Example: 1735689600.
chargebee_coupon_get
Get coupon
chargebee_coupons_list
List coupons
chargebee_credit_note_create
Create credit note
chargebee_credit_note_get
Get credit note
chargebee_credit_notes_list
List credit notes
chargebee_customer_create
Create customer
chargebee_customer_get
Get customer
chargebee_customer_update
Update customer
chargebee_customers_list
List customers
chargebee_invoice_get
Get invoice
chargebee_invoice_payment_record
Invoice payment record
chargebee_invoice_pdf_get
Get invoice pdf
chargebee_invoice_void
Void invoice
chargebee_invoices_list
List invoices
chargebee_item_get
Get item
chargebee_item_price_get
Get item price
chargebee_item_prices_list
List item prices
chargebee_items_list
List items
chargebee_subscription_cancel
Cancel subscription
chargebee_subscription_create
Create subscription
chargebee_subscription_get
Get subscription
chargebee_subscription_pause
Pause subscription
chargebee_subscription_reactivate
Subscription reactivate
chargebee_subscription_resume
Resume subscription
chargebee_subscription_update
Update subscription
chargebee_subscriptions_list
List subscriptions
Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// Chargebee tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["chargebee"], toolNames: [
    "chargebee_customers_list",
    "chargebee_subscriptions_list",
    "chargebee_invoices_list"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Find the customer with this email, list their subscriptions, and show their unpaid invoices" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["chargebee"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Find the customer with this email, list their subscriptions, and show their unpaid invoices" }],
  tools,
});

// Execute the tool call with the user's vaulted Chargebee API key
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["chargebee"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Find the customer with this email, list their subscriptions, and show their unpaid invoices" }],
  tools,
});

// Tool call runs with the user's vaulted Chargebee API key
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["chargebee"] }, pageSize: 100,
});

const agent = new Agent({
  name: "billing_agent",
  model: "gemini-2.5-pro",
  instruction: "Chargebee tools scoped to this user",
  tools,
});

await agent.run("Find the customer with this email, list their subscriptions, and show their unpaid invoices");
Try these prompts
Copy any prompt into your agent. Each maps directly to a Chargebee tool. Click to copy, paste into your agent, done.
Customers and subscriptions
Copy the prompt
Copied
Find the Chargebee customer with this email.
Copy the prompt
Copied
List the active subscriptions for this customer.
Copy the prompt
Copied
Create a subscription for this customer on the Pro plan.
Invoices and credits
Copy the prompt
Copied
List the unpaid invoices for this customer.
Copy the prompt
Copied
Get a download link for this invoice's PDF.
Copy the prompt
Copied
Create a credit note against this invoice.
Catalog and coupons
Copy the prompt
Copied
List the plans and addons in my product catalog.
Copy the prompt
Copied
Create a 20 percent coupon for new customers.
Copy the prompt
Copied
Record a bank transfer payment against this invoice.
SEE HOW AUTH WORKS
Each user connects their own Chargebee API key once, and Scalekit sends it with every call. Keys stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
Chargebee
once. We tie it to their identity and the access they approved, with no shared bot account and no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
Chargebee
credential lives in a vault scoped to them. User A's data is never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tenants:
isolated
3
Resolve
When your agent calls a
Chargebee
tool, we fetch the right credential server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
Chargebee
tool call is logged: who triggered it, which tool ran, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other accounting and finance connectors.
GTM and RevOps Teams
Revenue forecast commentary
Pulls open pipeline from Salesforce and HubSpot, calculates coverage against quota, flags at-risk stages, posts commentary to Slack, and logs every snapshot to Google Sheets.
Test other agents
See the same per-user auth pattern across other accounting and finance connectors.
GTM
Revenue forecast agent
Score pipeline coverage against quota across Salesforce and HubSpot, post forecast commentary to Slack, log snapshots to Sheets.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared Chargebee API key looks fine in a demo. In production every subscription change and invoice void looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared key
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
Chargebee today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access Chargebee as the user or through a shared key?
As the user. Each user connects their own Chargebee API key once, and Scalekit sends it with every call. Audit logs attribute every subscription change and cancellation to that user, not a shared service account.
Where is the Chargebee API key stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. To rotate it, the user reconnects with a new API key. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in Chargebee?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the get and list tools without chargebee_subscription_cancel, which cancels a subscription, or chargebee_invoice_void, which cannot be undone. Scalekit also enforces scope checks before every API call.
What happens when a user revokes Chargebee access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
Can the agent pause or cancel a Chargebee subscription?
Yes, if you expose those tools. chargebee_subscription_pause and chargebee_subscription_resume pause and restart a subscription, chargebee_subscription_reactivate brings back a cancelled one, and chargebee_subscription_cancel cancels now, at term end, or on a set date.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""chargebee"": {
""url"": ""https://mcp.scalekit.com/chargebee"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.chargebee]
url = ""https://mcp.scalekit.com/chargebee""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""chargebee"": {
""url"": ""https://mcp.scalekit.com/chargebee"",
""type"": ""http""
}
}
}