Labsco
atharvagupta2003 logo

MCP Stripe Server

β˜… 44

from atharvagupta2003

Integrates with Stripe to manage payments, customers, and refunds.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup

MCP Stripe Server

smithery badge

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

stripe_demo

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

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:

Copy & paste β€” that's it
npx @modelcontextprotocol/inspector uv --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/src run server.py

Building

  1. Update dependencies:
Copy & paste β€” that's it
uv compile pyproject.toml
  1. Build package:
Copy & paste β€” that's it
uv build

Contributing

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.