Chargebee AgentKit MCP Server for AI Billing
Integrate AI agents with Chargebee using the AgentKit MCP server to automate smarter billing and subscription workflows.
Overview
The Chargebee AgentKit MCP Server exposes Chargebee product knowledge and API context to Model Context Protocol (MCP) clients. It acts as a local MCP server that LLM-based agents and editor integrations can query to retrieve documentation snippets, code examples, and context-aware guidance for billing and subscription workflows. Developers integrate this server with tools like Cursor, Windsurf, VS Code, Claude Desktop, and any other MCP-capable client.
This server is useful when you want your AI assistant to answer factual questions about Chargebee, generate integration-ready code, or produce step-by-step plans for billing operations without repeatedly fetching documentation manually. The package runs via Node.js (LTS) and is typically launched with npx, making it fast to add into a development environment or editor configuration.
Deprecation note: This package is deprecated and will no longer receive updates. Migrate to the newer KnowledgeBase MCP Server for improved capabilities and accuracy: https://www.chargebee.com/docs/billing/2.0/ai-in-chargebee/chargebee-mcp
Features
- Serves Chargebee documentation, FAQs, release notes and other knowledge-base content to MCP clients
- Returns context-aware code snippets and API patterns for common billing tasks
- Provides structured “code planner” output for implementing integrations
- Compatible with any MCP client or editor integration
- Easy-to-run via npx, no global install required
- Small footprint targeted for developer productivity (local server process)
Prerequisites
- Node.js LTS installed (recommended version from nodejs.org)
- An MCP-capable client or editor (Cursor, Windsurf, VS Code, Claude Desktop, etc.)
Installation / Configuration
Run the server directly with npx (one-off or for quick testing):
# Launch the Chargebee MCP server using npx
Generic MCP client configuration (minimal JSON example):
Editor-specific examples
- Cursor (add to global .cursor/mcp.json):
- Windsurf / Cascade (mcp_config.json):
- VS Code (CLI install):
# add MCP server to VS Code
- Claude Desktop / Cline / Roo Code — use the same JSON snippet in each tool’s MCP configuration file.
Note: Replace npx args with a pinned version if you need reproducible behavior (for example, @chargebee/[email protected]).
Available Tools / Resources
The MCP server exposes a small set of tool endpoints that agents can call. Typical examples:
| Tool name | Purpose |
|---|---|
| chargebee_documentation_search | Retrieve docs, API references, guides, and FAQs relevant to the query |
| chargebee_code_planner | Produce structured code outlines, sample API calls, and integration steps |
These tools return text and structured outputs suitable for LLM agents to incorporate into answers or generate code.
Repository and additional resources:
- GitHub: https://github.com/chargebee/agentkit/tree/main/modelcontextprotocol
- NPM package: https://www.npmjs.com/package/@chargebee/mcp
Use Cases
Answer product and API questions inside your editor
- Example: Ask “How does plan proration work for mid-cycle upgrades?” and receive a concise explanation plus relevant API parameters.
Generate integration-ready code snippets
- Example: Request a Node.js example to create a subscription with metered add-ons; the server returns a fully-formed snippet and parameter notes.
Plan and scaffold migration or billing changes
- Example: Ask for a step-by-step plan to migrate customers from legacy plans to new tiered plans, including data checks and rollback strategies.
Build webhook handlers and reconciliation logic
- Example: Request sample code for handling invoice.payment_failed webhooks and automatic retry logic.
Troubleshoot billing flows with linked docs
- Example: Provide an error message or API response and get a diagnosis plus links to the relevant docs and release notes.
Running in CI / Automation
Although primarily intended for interactive use with MCP clients, you can run the server in automated environments (containerized or ephemeral) by invoking the same npx command in your startup script. For production or longer-lived deployments, consider packaging or pinning a specific version and supervising the process with your usual process manager.
Contribution & License
This project’s source is on GitHub (see link above). The repository includes contribution guidelines for submitting fixes or improvements. The package is distributed under the MIT license.
Important: This package is deprecated. For new projects or long-term use, migrate to the Chargebee KnowledgeBase MCP Server as documented in the Chargebee docs.