ai
Stripe AI is a TypeScript-based toolkit for integrating Stripe's billing and payment infrastructure with large language models and AI agent frameworks. It provides SDKs for popular AI platforms (OpenAI, Anthropic, Google) and hosts a Model Context Protocol server for secure agent access to Stripe services.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | stripe/ai |
| Owner | stripe |
| Primary language | TypeScript |
| License | MIT — OSI-approved |
| Stars | 1.6k |
| Forks | 288 |
| Open issues | 65 |
| Latest release | Unknown |
| Last updated | 2026-07-07 |
| Source | https://github.com/stripe/ai |
What ai is
The repository contains @stripe/ai-sdk for Vercel's ai/@ai-sdk integration, @stripe/token-meter for native LLM SDK integration without framework dependencies, and an MCP server at mcp.stripe.com for OAuth-secured agent access. Built in TypeScript with support for autonomous agent workflows and skill-based agent instruction sets.
Get the ai source
Clone the repository and explore it locally.
git clone https://github.com/stripe/ai.gitcd ai# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Choose between @stripe/ai-sdk (for Vercel ai/@ai-sdk) or @stripe/token-meter (for native SDKs). Token-meter avoids framework lock-in but requires manual setup.
- OAuth flow for MCP requires user consent and token management; plan for session handling and token refresh in production agent deployments.
- Token metering must be called at each LLM API boundary to ensure accurate billing; missing calls will under-report usage.
- Agent skills auto-update through official Stripe plugins (Claude, Codex, Cursor) but require plugin infrastructure; manual skill installation requires explicit version management.
- Test billing logic thoroughly in Stripe's test mode before production; incorrect token counts or missing usage events will cause reconciliation issues.
When to avoid it — and what to weigh
- Non-Stripe payment processing — This toolkit is purpose-built for Stripe. If your platform uses Paddle, Square, PayPal, or other payment processors, you will need alternative billing integration solutions.
- Synchronous, low-latency billing requirements — MCP and token metering add network hops. Real-time, sub-millisecond billing decisions may require direct Stripe API calls rather than agent-mediated workflows.
- No LLM or agent framework in your stack — This toolkit assumes you are already using OpenAI, Anthropic, Google, or Vercel ai libraries. If you have no AI components, the SDKs will not be applicable.
- Offline or air-gapped environments — The MCP server requires HTTPS connectivity and OAuth. Disconnected or restricted-network deployments will not support secure agent access to Stripe.
License & commercial use
MIT License. Permissive OSI-approved license allowing commercial use, modification, and distribution with minimal restrictions. Includes standard liability disclaimers.
MIT is a permissive license that permits commercial use without royalties or restrictions. However, use of the repository for commercial purposes is permitted only if you comply with MIT license terms (attribution and license notice). Stripe services themselves (API, MCP server) are governed by separate Stripe Terms of Service and usage agreements; this OSS license covers only the code in the repository.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Good |
| Assessment confidence | High |
MCP server uses OAuth for authentication and HTTPS for transport, providing user-level isolation. Token metering does not itself validate token counts; incorrect instrumentation could leak usage data or enable fraud. API keys and OAuth tokens must be managed securely in production. No security audit results or vulnerability disclosure policy visible in the provided data. Review Stripe's security documentation and MCP spec before production deployment.
Alternatives to consider
Custom Stripe billing integration
Direct Stripe API calls without SDK abstraction. Offers maximum control and avoids framework dependencies, but requires building token metering and agent tooling from scratch.
OpenAI Platform Billing API
OpenAI's native token billing (if using their models). Simpler for OpenAI-only stacks but does not integrate with other LLM providers or Stripe payment processing.
Anthropic's native usage tracking
Anthropic SDK provides usage reporting. Useful for Anthropic-only setups but does not unify billing across multiple LLM providers or link to external payment systems.
Build on ai with DEV.co software developers
Explore the Stripe AI repository, review integration guides on docs.stripe.com, and test token metering in your Stripe sandbox environment before production deployment.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
ai FAQ
Do I need to use all three components (@stripe/ai-sdk, @stripe/token-meter, MCP)?
Can I use this with non-Stripe payment processors?
How do I keep agent skills up to date?
Is the MCP server suitable for production use?
Software development & web development with DEV.co
DEV.co helps companies turn open-source tools like ai into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your mcp servers stack.
Ready to monetize your AI product with Stripe?
Explore the Stripe AI repository, review integration guides on docs.stripe.com, and test token metering in your Stripe sandbox environment before production deployment.