[wip] Use MCP instead of Stripe API directly #212
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What Changed
Before: The library executed Stripe API operations locally. When you called a tool like create_customer, the library directly used the Stripe SDK (stripe.customers.create()) to make the API call. All tool definitions and their execution logic were bundled in the library itself.
After: The library is now a thin client that connects to Stripe's MCP server (mcp.stripe.com). When you call a tool, it:
Key architectural changes:
What Changed for Users
Breaking change - Async initialization is now required:
Why These Changes Were Necessary
Why the Breaking Change Was Required
The async initialization is unavoidable because:
The alternative would have been to bundle a static snapshot of tool definitions and only use MCP for execution - but this defeats the purpose of having tools update dynamically.