135 lines
3.6 KiB
Markdown

# Chargebee MCP Server
MCP server for Chargebee subscription billing and revenue management platform.
## Features
- **Customer Management**: List, create, and update customers
- **Subscription Lifecycle**: List, get, cancel, and reactivate subscriptions
- **Invoicing**: Manage invoices, create charges, collect payments
- **Plans & Add-ons**: Browse pricing plans and optional add-ons
- **Payment Methods**: Manage payment sources (cards, bank accounts)
- **Transactions**: View payment history and transaction details
- **Coupons & Credits**: Manage discounts and credit notes
- **Events**: Audit webhook events and activity logs
## Environment Variables
| Variable | Required | Description | Example |
|----------|----------|-------------|---------|
| `CHARGEBEE_API_KEY` | ✅ | Chargebee API key | `live_abc123...` |
| `CHARGEBEE_SITE` | ✅ | Chargebee site name | `yoursite` |
## Getting Your API Key
1. Log in to [Chargebee](https://app.chargebee.com/)
2. Go to **Settings** > **Configure Chargebee** > **API Keys & Webhooks**
3. Click **Add API Key** or copy existing key
4. Set environment variables:
```bash
export CHARGEBEE_API_KEY="your-api-key"
export CHARGEBEE_SITE="your-site-name"
```
## Required API Scopes
Chargebee API keys have full access to your account. Use appropriate API key types:
- **Full Access Key**: All operations
- **Read-Only Key**: List/get operations only
## Installation
```bash
npm install
npm run build
```
## Usage
### Stdio Mode
```bash
node dist/main.js
```
### With Claude Desktop
```json
{
"mcpServers": {
"chargebee": {
"command": "node",
"args": ["/path/to/chargebee/dist/main.js"],
"env": {
"CHARGEBEE_API_KEY": "your-key",
"CHARGEBEE_SITE": "your-site"
}
}
}
}
```
## Tools Overview (20+ tools)
### Subscriptions (4)
- `chargebee_list_subscriptions` - List with pagination
- `chargebee_get_subscription` - Get by ID
- `chargebee_cancel_subscription` - Cancel subscription
- `chargebee_reactivate_subscription` - Reactivate cancelled
### Customers (4)
- `chargebee_list_customers` - List customers
- `chargebee_get_customer` - Get customer
- `chargebee_create_customer` - Create new
- `chargebee_update_customer` - Update existing
### Invoices (4)
- `chargebee_list_invoices` - List invoices
- `chargebee_get_invoice` - Get invoice
- `chargebee_create_invoice_charge` - Add charge
- `chargebee_collect_invoice_payment` - Collect payment
### Add-ons (2)
- `chargebee_list_addons` - List add-ons
- `chargebee_get_addon` - Get add-on details
### Payment Sources (2)
- `chargebee_list_payment_sources` - List payment methods
- `chargebee_create_payment_source` - Add payment method
### Transactions (2)
- `chargebee_list_transactions` - List transactions
- `chargebee_get_transaction` - Get transaction
### Plans (2)
- `chargebee_list_plans` - List pricing plans
- `chargebee_get_plan` - Get plan details
### Coupons (2)
- `chargebee_list_coupons` - List discount coupons
- `chargebee_get_coupon` - Get coupon details
### Credit Notes (2)
- `chargebee_list_credit_notes` - List credit notes
- `chargebee_get_credit_notes` - Get credit note
### Events (1)
- `chargebee_list_events` - List webhook events
## Coverage Manifest
**Total Chargebee API endpoints**: ~150
**Tools implemented**: 23
**Intentionally skipped**: 127 (admin endpoints, hosted pages, advanced taxation, dunning management)
**Coverage**: 23/150 = 15%
### Skipped Endpoints
- Hosted checkout pages (UI-based)
- Advanced taxation rules
- Dunning management
- Quote management
- Multi-currency pricing
- Advanced metering
## License
MIT