mcp-chargebee — Claude Code MCP server: what it does, how to install
Manages recurring subscriptions, customer records, and invoices in Chargebee through your AI agent. Useful for automating SaaS billing tasks directly from the workspace.
claude mcp add mcp-chargebee -e CHARGEBEE_SITE=<CHARGEBEE_SITE> -e CHARGEBEE_API_KEY=<CHARGEBEE_API_KEY> -- npx -y @codespar/mcp-chargebeeWhat mcp-chargebee does
The server connects language models to Chargebee v2 billing endpoints using 15 dedicated tools. Your assistant can create, retrieve, modify, pause, or reactivate subscriptions, inspect invoices, and read webhook event logs. Outgoing requests use application/x-www-form-urlencoded formatting. The server flattens nested JSON payloads into bracket notation on the fly.
List queries support structured filters matching the field[operator]=value convention via the filters parameter or direct top-level options. You can also attach gateway payment tokens to existing customers or delete stored payment sources when cards expire.
Calls fail immediately without valid CHARGEBEE_SITE and CHARGEBEE_API_KEY credentials. When setting up automated workflows, start with your sandboxed test site (<site>-test) to prevent unintended modifications to live accounts.
What it helps with
- manage recurring customer subscriptions and renewal statuses
- inspect unpaid invoices and track incoming webhook events
- attach external gateway tokens to customer payment profiles
- filter active subscriptions by plan identifier
Example prompts for the agent
- Find all active subscriptions on the pro-monthly plan
- Cancel subscription sub_98765 and show the confirmation
- Retrieve the latest invoices for customer cust_12345
How to install mcp-chargebee
Platform CLI
claude mcp add mcp-chargebee -e CHARGEBEE_SITE=<CHARGEBEE_SITE> -e CHARGEBEE_API_KEY=<CHARGEBEE_API_KEY> -- npx -y @codespar/mcp-chargebeeReplace <…> with your own values
Platform CLI
codex mcp add chargebee --env CHARGEBEE_SITE=<CHARGEBEE_SITE> --env CHARGEBEE_API_KEY=<CHARGEBEE_API_KEY> -- npx -y @codespar/mcp-chargebeeReplace <…> with your own values
Config file
{
"mcpServers": {
"chargebee": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-chargebee"
],
"env": {
"CHARGEBEE_SITE": "<CHARGEBEE_SITE>",
"CHARGEBEE_API_KEY": "<CHARGEBEE_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"chargebee": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codespar/mcp-chargebee"
],
"env": {
"CHARGEBEE_SITE": "<CHARGEBEE_SITE>",
"CHARGEBEE_API_KEY": "<CHARGEBEE_API_KEY>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e CHARGEBEE_SITE=<CHARGEBEE_SITE> -e CHARGEBEE_API_KEY=<CHARGEBEE_API_KEY> chargebee npx -y @codespar/mcp-chargebeeReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-chargebee
How to install mcp-chargebee in Claude Code?
Run claude mcp add mcp-chargebee -e CHARGEBEE_SITE=<CHARGEBEE_SITE> -e CHARGEBEE_API_KEY=<CHARGEBEE_API_KEY> -- npx -y @codespar/mcp-chargebee in your terminal. Replace the placeholders with your Chargebee subdomain and API token.
What actions can the server perform on subscriptions?
It provides create_subscription, retrieve_subscription, update_subscription, cancel_subscription, reactivate_subscription, and list_subscriptions. These tools cover looking up, changing, or stopping recurring plans.
How do you test the server without touching live billing data?
Point CHARGEBEE_SITE to your sandbox subdomain ending in -test. Use an API key generated from that test site to avoid affecting production payments.