Skip to content

Methods-Lab/MCP-Server-Stripe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

mcp-server-stripe 💳

Safety: Zero-Trust MCP: 1.2.0 License: MIT

mcp-server-stripe is a production-grade Model Context Protocol (MCP) server that exposes Stripe's capabilities to AI agents with built-in financial safety rails, audit logging, and observability.

Built for autonomous agents (Claude, Cursor, LangGraph) that need to manage customers, payments, and subscriptions without the risk of accidental $1M refunds or PII leaks.

🚀 Quickstart

1. Installation

uvx mcp-server-stripe

2. Configuration (Claude Desktop)

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "stripe": {
      "command": "uvx",
      "args": ["mcp-server-stripe"],
      "env": {
        "STRIPE_API_KEY": "sk_test_...",
        "STRIPE_MAX_AMOUNT_CENTS": "100000",
        "ENABLE_LIVE_MODE": "false"
      }
    }
  }
}

🛡️ Safety-First Model

This server implements Zero-Trust for Financial Agents. It prevents the "Oops, I deleted production" scenario through:

1. Two-Step Confirmation Flow

Destructive operations (refunds, cancellations) require a human (or supervisor) confirmation token.

sequenceDiagram
    Agent->>StripeServer: create_refund(pi_123, amount=100)
    StripeServer-->>Agent: Error: Confirmation Required (token: conf_abc)
    Agent->>User: "I need to refund $1.00. Confirm?"
    User->>Agent: "Approved."
    Agent->>StripeServer: create_refund(confirmation_token=conf_abc)
    StripeServer-->>Agent: Success: Refund Issued
Loading

2. Amount Guardrails

Hard caps on transaction sizes are enforced at the server level via STRIPE_MAX_AMOUNT_CENTS.

3. Automatic Idempotency

Every write operation generates an idempotency key derived from hash(tool + args + minute_bucket), preventing accidental duplicate charges during LLM retries.

🛠️ Tool Inventory (20 High-Value Operations)

Category Tool Side Effect Safety Level
Customers create_customer, get_customer, search_customers, update_customer Write/Read Default
Payments create_payment_intent, confirm_payment_intent, capture_payment_intent, list_payments Write/Read Amount Guardrail
Refunds create_refund, get_refund Destructive Two-Step Token
Subscriptions create_subscription, cancel_subscription, update_subscription, list_subscriptions Destructive Two-Step Token
Invoices create_invoice, finalize_invoice, send_invoice Write Default
Catalog create_product_with_price, list_products Write/Read Default
Reporting get_balance, get_payout_schedule Read Read-Only

📊 Observability & Compliance

  • JSONL Audit Logs: Every call is logged to audit.log with PII redacted.
  • OpenTelemetry: Native tracing for every Stripe request.
  • PII Redaction: Card numbers, emails, and names are hashed before logging.

Built by Senior Staff Engineers. For support, open an issue.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages