npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@codespar/mcp-chargebee

v0.1.1

Published

MCP server for Chargebee — global subscription billing, recurring revenue orchestration

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)

| Tool | Purpose | |---|---| | create_subscription | Create a new subscription in Chargebee. | | retrieve_subscription | Retrieve a subscription by ID | | update_subscription | Update a subscription. | | cancel_subscription | Cancel a subscription. | | reactivate_subscription | Reactivate a cancelled or paused subscription | | list_subscriptions | List subscriptions. | | create_customer | Create a customer in Chargebee. | | retrieve_customer | Retrieve a customer by ID | | update_customer | Update a customer. | | list_customers | List customers. | | retrieve_invoice | Retrieve an invoice by ID | | list_invoices | List invoices with optional filters | | create_payment_source_using_token | Attach a payment source to a customer using a gateway token (e.g. | | delete_payment_source | Delete a payment source | | list_events | List 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

| Variable | Required | Description | |----------|----------|-------------| | CHARGEBEE_SITE | Yes | Site subdomain, e.g. acme-test for acme-test.chargebee.com | | CHARGEBEE_API_KEY | Yes | API 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