mcp-stripe
Documentation
MCP Stripe Server
A Model Context Protocol (MCP) server implementation that integrates with Stripe for handling payments, customers, and refunds. This server provides a structured API to manage financial transactions securely.
Demo
Requirements
- Python 3.8+
- MCP SDK 0.1.0+
- Stripe Python SDK
- dotenv
Components
Resources
The server provides audit logging of all Stripe operations:
- Stores audit logs of customer, payment, and refund operations
- Supports structured logging for better traceability
- Uses MCP resource endpoints to retrieve audit data
Tools
The server implements Stripe API operations, including:
Customer Management
- customer_create: Create a new customer
- customer_retrieve: Retrieve a customer's details
- customer_update: Update customer information
Payment Operations
- payment_intent_create: Create a payment intent for processing payments
- charge_list: List recent charges
Refund Operations
- refund_create: Create a refund for a charge
Features
- Secure Payments: Integrates with Stripe for robust payment handling
- Audit Logging: Keeps track of all Stripe transactions
- Error Handling: Comprehensive error handling with clear messages
- MCP Integration: Supports MCP-compatible tools and resource listing
Installation
Installing via Smithery
To install Stripe Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @atharvagupta2003/mcp-stripe --client claudeInstall dependencies
python -m venv venv
source venv/bin/activate # On macOS/Linux
venv\Scripts\activate # On Windows
pip install -e .Configuration
Set up the environment variables in a `.env` file:
STRIPE_API_KEY=your_stripe_secret_keyClaude Desktop
Add the server configuration to your Claude Desktop config:
Windows: C:\Users\\AppData\Roaming\Claude\claude_desktop_config.json
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"stripe": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/src",
"run",
"server.py"
]
}
}
}Usage
Start the server
uv run src/server.pyExample MCP Commands
Create a customer
{
"tool": "customer_create",
"arguments": {
"email": "customer@example.com",
"name": "John Doe"
}
}Retrieve a customer
{
"tool": "customer_retrieve",
"arguments": {
"customer_id": "cus_123456"
}
}Create a payment intent
{
"tool": "payment_intent_create",
"arguments": {
"amount": 5000,
"currency": "usd",
"customer": "cus_123456"
}
}Create a refund
{
"tool": "refund_create",
"arguments": {
"charge_id": "ch_abc123"
}
}Error Handling
The server provides clear error messages for common scenarios:
- Missing API Key: STRIPE_API_KEY required
- Invalid API Key: Authentication error
- Customer not found: Invalid customer ID
- Invalid input: Missing or incorrect parameters
Development
Testing
Run the MCP Inspector for interactive testing:
npx @modelcontextprotocol/inspector uv --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/src run server.pyBuilding
1. Update dependencies:
uv compile pyproject.toml2. Build package:
uv buildContributing
We welcome contributions! Please see our Contributing Guidelines for details.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Frequently asked questions
What is mcp-stripe?
mcp-stripe is a Model Context Protocol (MCP) server listed in the TrackMCP directory.
How do I install mcp-stripe?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-stripe open source?
Yes — it is hosted on GitHub at https://github.com/atharvagupta2003/mcp-stripe and has 42 stars.
Related MCP tools
Cognee is the open-source AI memory platform for agents. Give your AI agents persistent long-term memory across sessions with a self-hosted knowledge graph engine.
Python SQL Parser and Transpiler
MCP server that interacts with Obsidian via the Obsidian rest API community plugin
Open-source meeting transcription API for Google Meet, Microsoft Teams & Zoom. Auto-join bots, real-time WebSocket transcripts, MCP server for AI agents. Self-host or use hosted SaaS.
A super light-weight embedded code search engine CLI (AST based) that just works - improves speed and efficiency for coding agent 🌟 Star if you like it!
Official MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP