Back to MCP Catalog

Stripe Agent Toolkit MCP Server

Finance & FintechTypeScript
Integrate Stripe APIs into AI agent workflows through function calling
Available Tools

createCustomer

Create a new Stripe customer

listCustomers

List all Stripe customers

createCoupon

Create a new Stripe coupon

listCoupons

List all Stripe coupons

createPaymentLink

Create a new Stripe payment link

listPaymentLinks

List all Stripe payment links

createProduct

Create a new Stripe product

listProducts

List all Stripe products

createPrice

Create a new Stripe price

listPrices

List all Stripe prices

The Stripe Agent Toolkit enables seamless integration between Stripe's payment processing APIs and popular AI agent frameworks. It provides a structured way for AI agents to interact with Stripe services through function calling, supporting frameworks like OpenAI's Agent SDK, LangChain, CrewAI, Vercel's AI SDK, and Model Context Protocol (MCP). Built directly on top of Stripe's official Python and TypeScript SDKs, this toolkit allows AI agents to perform operations like creating customers, managing payment links, handling products and prices, and more. It includes robust configuration options for specifying allowed actions and context parameters, making it a powerful solution for building AI-powered financial applications.

Overview

The Stripe Agent Toolkit provides a bridge between AI agent frameworks and Stripe's payment processing APIs. This MCP server allows AI assistants to interact with Stripe services through structured function calls, enabling the development of sophisticated financial applications powered by AI.

Installation

To run the Stripe MCP server using npx, use the following command:

npx -y @stripe/mcp --tools=all --api-key=YOUR_STRIPE_SECRET_KEY

Replace YOUR_STRIPE_SECRET_KEY with your actual Stripe secret key from your Stripe Dashboard. Alternatively, you can set the STRIPE_SECRET_KEY in your environment variables.

Configuration

The Stripe Agent Toolkit MCP server can be configured to limit which Stripe API actions are available to the AI assistant. This is done through a configuration object that specifies allowed actions.

For example, to create your own MCP server with specific permissions:

import { StripeAgentToolkit } from "@stripe/agent-toolkit/modelcontextprotocol";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

const server = new StripeAgentToolkit({
  secretKey: process.env.STRIPE_SECRET_KEY,
  configuration: {
    actions: {
      paymentLinks: {
        create: true,
      },
      products: {
        create: true,
      },
      prices: {
        create: true,
      },
      // Add other actions as needed
    },
  },
});

async function main() {
  const transport = new StdioServerTransport();
  await server.connect(transport);
  console.error("Stripe MCP Server running on stdio");
}

main().catch((error) => {
  console.error("Fatal error in main():", error);
  process.exit(1);
});

Context Parameters

You can provide context values that serve as defaults when making requests. For example, the account context value enables you to make API calls for your connected accounts:

const server = new StripeAgentToolkit({
  secretKey: process.env.STRIPE_SECRET_KEY,
  configuration: {
    context: {
      account: "acct_123",
    },
    actions: {
      // Your actions configuration
    },
  },
});

Usage with AI Assistants

Once the MCP server is running, AI assistants can use it to interact with Stripe APIs. The assistant can perform operations like creating customers, managing payment links, handling products and prices, and more, depending on the configured permissions.

For example, you might ask the assistant to:

  • Create a new payment link for a specific product
  • List all customers matching certain criteria
  • Create a new product with pricing information
  • Generate a coupon code with specific discount parameters

The assistant will use the appropriate Stripe API functions to fulfill these requests while respecting the permissions configured in the MCP server.

Related MCPs

TastyTrade Portfolio Manager
Finance & FintechPython

Manage your TastyTrade brokerage account through Claude

Investor Agent
Finance & FintechPython

Financial analysis and investment insights for LLMs

Bankless Onchain
Finance & FintechTypeScript

Access and interact with blockchain data through the Bankless API

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.