mcpField
M
mcp-chargebee

mcp-chargebee

Local
github.com/codesparFinance275Updated 4w ago

About mcp-chargebee

mcp-chargebee is an MCP server for Chargebee, a subscription billing platform. It exposes 15 tools for subscriptions, customers, invoices, payment sources and webhook events. It suits SaaS teams selling subscriptions into Latin American and other markets.

Key features

  1. 0115 MCP tools for subscriptions, customers, invoices
  2. 02List filtering with field[operator] syntax
  3. 03Authentication through site name and API key
  4. 04Sandbox test site for development

Use cases

  1. 01Querying and changing customer subscription status through an agent
  2. 02Retrieving invoices filtered by customer or status
  3. 03Attaching gateway tokens as customer payment sources

MCP support

This project is an MCP server that exposes Chargebee API v2 subscriptions, customers, invoices, payment sources and events as tools for MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-chargebee": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-chargebee"
],
"env": {
"CHARGEBEE_SITE": "<CHARGEBEE_SITE>",
"CHARGEBEE_API_KEY": "<CHARGEBEE_API_KEY>"
}
}
}
}
Run commandnpx -y @codespar/mcp-chargebee
Environment variables to set
CHARGEBEE_SITEChargebee site subdomain (e.g. 'acme' for acme.chargebee.com, 'acme-test' for test site)
CHARGEBEE_API_KEYSecretChargebee API key (full-access or restricted) from Settings > API Keys

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@codespar/mcp-chargebee0.1.2

Tools

15

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
addonsarrayNoAddon objects: [{ id, quantity }]
plan_idstringYesPlan identifier (required)
customerobjectNoNew customer object (email, first_name, last_name, company, ...) — omit if using customer_id
coupon_idsarrayNoCoupon IDs to apply
customer_idstringNoExisting Chargebee customer ID
plan_quantitynumberNoQuantity of the plan
billing_cyclesnumberNoNumber of billing cycles before subscription ends

Details

From the project README

@codespar/mcp-chargebee

MCP server for Chargebee — global subscription billing orchestration

npm License: MIT

Why Chargebee in the CodeSpar catalog?

Chargebee is subscription-billing orchestration on top of payment gateways (Stripe, Adyen, Braintree, local LatAm acquirers). It handles plans, proration, dunning, tax, and revenue recognition — the SaaS monetization layer, not the card-processing layer.

The CodeSpar catalog already ships Vindi and Iugu for Brazil-native recurring billing. Chargebee complements (not overlaps) those: it is the global-SaaS pattern used by Platzi, Truora, and most US SaaS selling into LatAm. Zero feature overlap, different market.

Quick Start

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

{
  "mcpServers": {
    "chargebee": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-chargebee"],
      "env": {
        "CHARGEBEE_SITE": "your-site",
        "CHARGEBEE_API_KEY": "your-api-key"
      }
    }
  }
}
Claude Code
claude mcp add chargebee -- npx @codespar/mcp-chargebee
Cursor / VS Code

Add to .cursor/mcp.json or .vscode/mcp.json:

{
  "servers": {
    "chargebee": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-chargebee"],
      "env": {
        "CHARGEBEE_SITE": "your-site",
        "CHARGEBEE_API_KEY": "your-api-key"
      }
    }
  }
}

Tools (15)

ToolPurpose
create_subscriptionCreate a new subscription in Chargebee.
retrieve_subscriptionRetrieve a subscription by ID
update_subscriptionUpdate a subscription.
cancel_subscriptionCancel a subscription.
reactivate_subscriptionReactivate a cancelled or paused subscription
list_subscriptionsList subscriptions.
create_customerCreate a customer in Chargebee.
retrieve_customerRetrieve a customer by ID
update_customerUpdate a customer.
list_customersList customers.
retrieve_invoiceRetrieve an invoice by ID
list_invoicesList invoices with optional filters
create_payment_source_using_tokenAttach a payment source to a customer using a gateway token (e.g.
delete_payment_sourceDelete a payment source
list_eventsList webhook events.

Authentication

Chargebee API v2 uses HTTP Basic with your API key as username and empty password. This package handles it automatically — just set CHARGEBEE_API_KEY.

Request bodies are sent as application/x-www-form-urlencoded (Chargebee's v2 convention). Nested objects and arrays are flattened to parent[child]=value / parent[0][child]=value.

Filter syntax

Chargebee uses field[operator]=value for list filters, e.g. status[is]=active, email[is][email protected], occurred_at[after]=1700000000.

Pass these via the filters object on any list_* tool:

{
  "filters": {
    "status[is]": "active",
    "plan_id[is]": "pro-monthly"
  }
}

Common list filters are also exposed as top-level conveniences (e.g. list_invoices accepts customer_id, status directly).

Environment Variables

VariableRequiredDescription
CHARGEBEE_SITEYesSite subdomain, e.g. acme-test for acme-test.chargebee.com
CHARGEBEE_API_KEYYesAPI key from Settings > API Keys (full-access or restricted)

Sandbox / Testing

Every Chargebee account includes a free test site (<your-site>-test.chargebee.com). Use its API key for development — no charges flow to real gateways.

Get your credentials
  1. Sign up at chargebee.com
  2. Your test site is created automatically (<name>-test)
  3. Go to Settings > API Keys and create a Full-Access or Read-Only key
  4. Set CHARGEBEE_SITE and CHARGEBEE_API_KEY

Roadmap

v0.2 (planned)
  • create_invoice — charge a customer outside of a subscription
  • record_payment — record offline payments
  • create_coupon / list_coupons
  • create_plan / list_plans / create_addon
  • list_transactions
v0.3 (planned)
  • create_hosted_page_checkout — generate Chargebee hosted checkout URLs
  • retrieve_quote / convert_quote
  • Revenue reporting helpers

Want a tool sooner? Open an issue or PR.

Links

Enterprise

Need governance, budget limits, and audit trails for agent-initiated subscription changes? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.