Skip to main content
CH

Chargebee

v0.1.0API 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

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

All credentials are encrypted at rest in an isolated vault scoped per organization. OAuth2 tokens are automatically refreshed before expiry. Your agent code never sees raw secrets โ€” it receives scoped, short-lived session tokens.
Servers โ€” Every LatAm commerce API your agent needs | CodeSpar