MarvelousUkuesa/stripe-mcp-server
If you are the rightful owner of stripe-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This repository contains a Machine-to-machine Communication Protocol (MCP) server that exposes key functionalities of the Stripe API as tools.
Stripe MCP Server 💳 This repository contains a Machine-to-machine Communication Protocol (MCP) server that exposes key functionalities of the Stripe API as tools. It allows Large Language Models (LLMs) or other automated agents to interact with Stripe using natural language commands, enabling them to perform tasks like creating products, prices, and payment links.
Why MCP? On their own, LLMs are brilliant at manipulating text, but they can't perform actions in the real world, like sending emails, managing GitHub repositories, or processing payments. To do that, they need tools.
Traditionally, integrating a service like Stripe would require developers to:
Deeply study the Stripe API and its architecture.
Write significant amounts of custom "glue code" to connect the LLM to the API.
Maintain this code, which is expensive and prone to breaking.
This process creates a bottleneck, vendor lock-in, and a large maintenance burden.
MCP solves this problem. It introduces a standardized protocol for LLMs to communicate with external services. Instead of writing complex integrations, a service can just expose its functionalities via an MCP server. This brings several key advantages:
🌐 Standardization: Everyone speaks the same language, making it faster and easier to build powerful, multi-service applications.
💻 Less Code: Drastically reduces the amount of glue code, testing, and maintenance required.
🔄 Flexibility: Makes it simple to switch between different service providers without a major rewrite.
This server is an example of that vision, providing Stripe's capabilities through a simple, standardized MCP interface.
Features & Available Tools This server provides the following tools, which can be called by an LLM agent:
- create_stripe_product_and_price
Creates a new product in your Stripe account along with its price.
Parameters:
product_name (str): The name of the product (e.g., "Cool T-Shirt").
price (int): The price of the product in cents (e.g., 2500 for $25.00).
Returns: A dictionary containing the new product and price IDs.
- create_payment_link
Generates a Stripe payment link for a list of one or more existing products.
Parameters:
products_qty (List[ProductQty]): A list of products to include, where each item specifies the product name and quantity.
Returns: The URL for the Stripe Payment Link.
🚀 Getting Started Follow these steps to get the server up and running on your local machine.
- Prerequisites
Python 3.8+
A Stripe account and your API Secret Key.
- Installation
First, clone the repository and then install the required Python packages.
Bash
It's recommended to use a virtual environment
python -m venv venv
source venv/bin/activate # On Windows, use venv\Scripts\activate
Install dependencies
pip install mcp-server stripe httpx pydantic 3. Configuration
You must configure your Stripe API key in the script.
Open the Python file and find this line:
Python
IMPORTANT: Replace with your actual Stripe Secret Key (sktest...)
🔒 Security Note: For production use, it's highly recommended to use environment variables to store your API key instead of hardcoding it in the file.
- Running the Server
To start the server, simply run the Python script from your terminal:
Bash uv run stripe_mcp.py