Skip to main content
Glama

MCP Stripe Server

MIT License
13
  • Apple

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

stripe_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 claude

Install 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_key
Claude Desktop

Add the server configuration to your Claude Desktop config:

Windows: C:\Users<username>\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.py

Example 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.py

Building

  1. Update dependencies:
uv compile pyproject.toml
  1. Build package:
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.

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A server that integrates with Stripe for handling payments, customers, and refunds through the Model Context Protocol, providing a secure API to manage financial transactions.

  1. Demo
    1. Requirements
    2. Components
    3. Features
    4. Installation
    5. Usage
    6. Error Handling
    7. Development
    8. License

Related MCP Servers

  • stripeofficial

    -
    security
    A
    license
    -
    quality
    The Stripe Model Context Protocol server allows you to integrate with Stripe APIs through function calling. This protocol supports various tools to interact with different Stripe services.
    Last updated 10 days ago
    2,652
    869
    TypeScript
    MIT License
  • -
    security
    F
    license
    -
    quality
    A server implementing the Model Context Protocol to make and query payments through Worldpay APIs, enabling payment processing, payment queries, and checkout form generation.
    Last updated 4 months ago
    TypeScript
  • -
    security
    A
    license
    -
    quality
    A Model Context Protocol server that provides comprehensive integration with PayPal's APIs, enabling seamless interaction with payment processing, invoicing, subscription management, and business operations through a standardized interface.
    Last updated 4 months ago
    TypeScript
    Apache 2.0
  • -
    security
    A
    license
    -
    quality
    A server that provides integration with PayPal's APIs, enabling seamless interaction with payment processing, invoicing, subscription management, and business operations through a standardized interface.
    Last updated 4 months ago
    TypeScript
    MIT License

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/atharvagupta2003/mcp-stripe'

If you have feedback or need assistance with the MCP directory API, please join our Discord server