DEV.co
MCP Servers · stripe

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.

Source: GitHub — github.com/stripe/ai
1.6k
GitHub stars
288
Forks
TypeScript
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorystripe/ai
Ownerstripe
Primary languageTypeScript
LicenseMIT — OSI-approved
Stars1.6k
Forks288
Open issues65
Latest releaseUnknown
Last updated2026-07-07
Sourcehttps://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.

Quickstart

Get the ai source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/stripe/ai.gitcd ai# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

AI-driven billing and usage-based pricing

Integrate token metering and LLM cost tracking directly into Stripe billing cycles. Ideal for SaaS platforms monetizing AI workloads or offering consumption-based pricing tied to model usage.

Autonomous agents with Stripe access

Build AI agents (Claude, Codex, Cursor) that can interact with Stripe APIs securely via MCP, enabling agents to manage invoices, refunds, subscriptions, and payment workflows autonomously.

LLM application monetization

Developers building chatbots, content generation, or code assistance products can integrate token billing into Vercel ai SDK or native OpenAI/Anthropic clients without custom metering infrastructure.

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.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

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.

Software development agency

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.co

Related 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)?
No. @stripe/ai-sdk is for Vercel ai/@ai-sdk frameworks. @stripe/token-meter is for native OpenAI/Anthropic/Google SDKs. MCP is for agent access to Stripe. Choose based on your stack.
Can I use this with non-Stripe payment processors?
No. This toolkit is designed specifically for Stripe integration. Paddle, Square, PayPal, and others require their own billing SDKs.
How do I keep agent skills up to date?
Official Stripe plugins (Claude, Codex, Cursor) auto-update. Manually installed skills require running `npx skills update -y` periodically.
Is the MCP server suitable for production use?
It is hosted by Stripe and supports OAuth, suggesting production readiness. However, review Stripe's SLA and your security requirements. Requires HTTPS and online connectivity.

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.