As AI products get more complex, billing has to fit more than one execution model. Some apps own the full request flow. Others run agent-native workflows where tools are invoked dynamically. The real question is not "SDK or MCP?" — it is where billing and monetization logic should live in your product.
Chargly supports both. Both connect to the same billing primitives. The difference is the access layer.
The short version
- Use the SDK when your app owns the request flow and decides when to meter.
- Use MCP when agent-native workflows need billing and pricing tools inside the tool layer.
If your app already owns the request flow cleanly, the SDK is often the simpler choice. MCP is not "better by default" — it is the right fit when billing decisions must happen inside an agent's workflow, not in your application routes.
SDK vs MCP: practical comparison
| SDK | MCP | |
|---|---|---|
| Who decides when to meter | Your backend, in application code | Agent or runtime, via tool calls |
| Best fit | App-driven products; explicit feature boundaries | Agent-driven workflows; dynamic orchestration |
| Where business logic lives | Inside your routes and handlers | Inside the agent's reasoning and tool invocations |
| When top-up flows are initiated | Your app triggers checkout when needed | Agent can check balance and offer top-up mid-workflow |
Use the SDK when…
Your application already owns the execution path. That usually means:
- Your backend receives the request
- Your app knows which feature is being used
- Your system decides when to meter usage
- Billing is part of your application logic
Typical flow: user triggers action → backend decides what event occurred → app calls Chargly → credits deducted → result returned.
Mental model: "The user clicked generate image, so meter image.generate now." If that describes your flow, use the SDK.
Best fit for: SaaS products, internal admin dashboards, Next.js or Node apps, products with explicit feature boundaries.
Use MCP when…
Billing and monetization must exist inside an agent-native workflow. The agent may need to:
- Check a wallet balance before proceeding
- Charge for an action mid-workflow
- Create a checkout session when credits are low
- List credit packs to present options
In that case, billing behaves like a tool the agent can call — not a helper buried in app code. Chargly exposes operations such as:
chargly.get_walletchargly.meter_eventchargly.create_checkoutchargly.list_credit_packs
Mental model: "The agent wants to run a billable action, but first it should check the user's balance and decide whether to continue." If that describes your flow, use MCP.
MCP becomes more powerful when agents need access not only to billing tools, but also to pricing tools. The Pricing Advisor MCP support lets agents:
- Inspect pricing rules
- List recommendations
- Explain why a recommendation was made
- Apply or reject recommendations
That extends monetization logic into the agent layer — useful when pricing decisions should be part of the workflow, not just preconfigured in your backend.
Same primitives, different access layer
Chargly does not have one billing model for SDK users and a different one for MCP users. The underlying model is the same:
The same model for both
- wallets hold balances
- events represent billable actions
- credits are deducted
- Stripe powers top-ups
- developers define the pricing
SDK and MCP are two access surfaces into the same system. You can start with the SDK and add MCP later. Or use both in the same product — for example, the core app uses the SDK for direct billing while an AI assistant uses MCP tools for dynamic workflow billing. Both operate against the same wallets and event definitions.
Common mistakes
Assuming MCP is always better. It is not. If your app owns the request flow and billing is straightforward, the SDK is simpler to integrate and reason about.
Overengineering too early. Most early-stage products have a clear application boundary. Start with the SDK when you are building the first version, defining events, and getting to production. Add MCP when your product actually needs tool-native billing inside agent workflows.
Forcing one pattern everywhere. Different parts of a product can use different access layers. A dashboard might use the SDK; an AI assistant might use MCP. Same wallet system, different integration path.
Which to start with
If you are unsure, start with the SDK. It is the fastest path when you own the request flow, want direct event metering, and are integrating into backend application code. Add MCP when your product exposes agent workflows and billing needs to be callable as a tool.
Closing
The right question is not "SDK or MCP?" It is "Where should billing and monetization logic live in my product?" Chargly supports both so you can choose the access layer that matches how your product actually runs.
Next steps:
- MCP Support docs — billing and pricing tools for agent workflows
- SDK Reference — direct integration
- Try the demo — see the flow in practice
- Metering AI usage without token chaos — event-based billing fundamentals