Skip to main content
CH

Chargebee

v0.1.1API Key

Global subscription-billing orchestration used by LatAm SaaS (Platzi, Truora). Stripe-style subscription logic on top of local gateways. Zero overlap with Vindi/Iugu — this is the global-SaaS pattern.

15 tools2 env vars🌐 GLOBALstable on npm

What your agent can do

Chargebee gives your agent 15 tools it calls directly — pick the ones it needs, in Claude, Cursor, or any MCP client.

  • create_subscriptionCreate a new subscription in Chargebee. Provide either a nested `customer` object (with email/first_name/last_name) for a new customer, or pass an existing `customer_id` via nested customer or top-level field.
  • retrieve_subscriptionRetrieve a subscription by ID
  • update_subscriptionUpdate a subscription. Accepts any Chargebee subscription fields (plan_id, plan_quantity, coupon_ids, addons, billing_cycles, etc.)
Example call
// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("create_subscription", { /* ... */ });

Install

terminal
$ npm install @codespar/mcp-chargebee

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

claude_desktop_config.json
{
  "mcpServers": {
    "chargebee": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-chargebee"
      ],
      "env": {
        "CHARGEBEE_SITE": "<your_chargebee_site>",
        "CHARGEBEE_API_KEY": "<your_chargebee_api_key>"
      }
    }
  }
}

After restart, your agent can call any of the 15 tools below — try create_subscription first.

Environment variables · 2

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

CHARGEBEE_SITE
required

Chargebee site subdomain (e.g. 'acme' for acme.chargebee.com, 'acme-test' for test site)

CHARGEBEE_API_KEY
requiredsecret

Chargebee API key (full-access or restricted) from Settings > API Keys

Available tools · 15

Each tool is independent — your agent loads only what it needs to reduce context and response time.

WRITEcreate_subscription
Create a new subscription in Chargebee. Provide either a nested `customer` object (with email/first_name/last_name) for a new customer, or pass an existing `customer_id` via nested customer or top-level field.
READretrieve_subscription
Retrieve a subscription by ID
WRITEupdate_subscription
Update a subscription. Accepts any Chargebee subscription fields (plan_id, plan_quantity, coupon_ids, addons, billing_cycles, etc.)
DELETEcancel_subscription
Cancel a subscription. By default cancels immediately; set end_of_term=true to cancel at period end.
WRITEreactivate_subscription
Reactivate a cancelled or paused subscription
READlist_subscriptions
List subscriptions. Pass filters as a free-form object using Chargebee's field[operator]=value format, e.g. { "status[is]": "active", "customer_id[is]": "cust_123" }.
WRITEcreate_customer
Create a customer in Chargebee. At least one of email, first_name, or last_name is required.
READretrieve_customer
Retrieve a customer by ID

Compatible frameworks

MCP is a protocol — any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

Run `npx -y @codespar/mcp-chargebee` and add the config block above to your MCP client — Claude, Cursor, VS Code, or any MCP-compatible client. No build step, no SDK required. Prefer hosted? CodeSpar's managed tier runs it for you with auth handled.
Chargebee — MCP server · 15 tools | CodeSpar