# Stripe Legacy MCP

> Stripe Legacy connects your AI agent directly to core Stripe payment APIs. It lets you manage payments, check account balances, create refunds, and handle customer data without logging into a separate dashboard. You run full financial operations—from listing charges to creating tokens—using simple chat commands.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** payment-gateway, transaction-management, financial-data, api-integration, customer-billing, pci-compliance

## Description

Listen up. This Stripe Legacy connection lets your AI agent talk straight to your core Stripe APIs, managing everything from payments and refunds to client accounts without you having to log into a damn dashboard. You run full financial ops—from listing old charges to creating new customer tokens—using nothing but simple chat commands.

**Managing Money Flow: Charging, Tokens, and Refunds**

You can process money right out of the gate. Use `create_charge` to process and record any new monetary charge against a specific customer or payment token. When you need to capture sensitive card data temporarily before making a charge, run `create_token`, which generates that single-use payment token for you. If you're dealing with payouts, remember you can always issue money back using `create_refund` against the original source of any completed charge. For quick cash flow checks, `get_balance` pulls up your current available and pending Stripe funds immediately. Need to know what went down on a specific day? You grab all details for one transaction ID using `get_charge`. If you need an overview of past activity, running `list_charges` lets you pull multiple charges while filtering by date or status.

**Client Accounts: Creating and Viewing Customers**

Handling customers is simple. First, you'll use `create_customer` to make a brand new record for any client in your Stripe account. To check out an existing client's profile and billing data, just call `get_customer` with their ID. If you need to see who you've done business with generally, `list_customers` retrieves a list of all customer IDs along with basic profile info.

**Reporting and Auditing: Seeing What’s Happening**

Want to audit your books? There are several ways to pull reports. You can use `list_invoices` to fetch records for billing invoices, which is killer when you're auditing payments that clients owe. If you deal with recurring services, `list_subscriptions` lists every active payment plan and what status they’re in. For a comprehensive view of historical transactions, running `list_charges` gives you multiple past charges, letting you filter them down by date or by their current status.

**How It Works, Straight Talk**

Your AI client takes your request—like 'refund the last charge for John Doe'—and translates it into a function call. This server executes that command directly against your live Stripe account credentials, giving you real-time data and completing the action without any manual steps on your end.

## Tools

### create_charge
Processes and records a new monetary charge against a customer or token.

### create_customer
Creates a new record for a client within your Stripe account.

### create_refund
Issues money back to the original source of a completed charge.

### create_token
Generates a temporary, single-use payment token from sensitive card data.

### get_balance
Retrieves the current available and pending balance for your Stripe account.

### get_charge
Pulls all details for one specific transaction ID.

### get_customer
Retrieves the profile and billing information for a specified customer.

### list_charges
Lists multiple past charges, allowing you to filter by date or status.

### list_customers
Retrieves a list of all customer IDs and basic profile data.

### list_invoices
Fetches records for billing invoices, useful for auditing payments owed.

### list_subscriptions
Lists all currently active recurring payment plans and their status.

## Prompt Examples

**Prompt:** 
```
Check my current Stripe account balance.
```

**Response:** 
```
I've retrieved your balance. You currently have $5,240.50 available and $1,120.00 pending in your Stripe account.
```

**Prompt:** 
```
Show me all charges from the past 24 hours with their status and customer details.
```

**Response:** 
```
89 charges in 24 hours totaling $23,456. Succeeded (84): $22,100. Failed (3): $890 (2 card declined, 1 insufficient funds). Pending (2): $466. By currency: USD (67, $18,900), EUR (15, €3,200), GBP (7, £1,356). Top customers: Meridian Corp ($4,500, 2 charges), TechVentures ($2,300). Average charge: $263.55. Recurring vs one-time: 56 recurring ($15,200), 33 one-time ($8,256). Disputes: 0. Refunds issued: 2 ($189). Processing fees: $682 (2.9% + $0.30).
```

**Prompt:** 
```
Get the current account balance and recent payout schedule.
```

**Response:** 
```
Account balance: Available $34,560. Pending: $12,340 (clears in 2 days). Connect reserved: $0. Total: $46,900. Recent payouts: May 15 - $28,900 (completed, bank ending 4521). May 12 - $24,500 (completed). May 9 - $31,200 (completed). Payout schedule: daily (automatic). Next payout: tomorrow, estimated $18,400. Monthly summary: $156,000 gross volume, $4,524 in fees (2.9%). Net deposits: $151,476. Currency breakdown: 78% USD, 14% EUR, 8% GBP.
```

## Capabilities

### Check Account Status
The tool retrieves your current Stripe balance and pending funds.

### List Transactions
It fetches lists of charges, invoices, or subscriptions based on filters you provide.

### Process Payments
You can create new charges, issue refunds, or generate single-use payment tokens.

### Manage Customers
The tool lets you view and retrieve specific customer profiles by ID.

## Use Cases

### Billing Inquiry Resolution
A client calls questioning a $50 charge from last week. Instead of asking the customer to email screenshots, you ask your agent to `get_charge` using the transaction ID provided. The agent instantly returns the full details—when it happened, who paid, and how much was processed. Problem solved in three seconds.

### End-of-Month Reconciliation
The finance team needs to confirm total revenue for a specific product line. They ask the agent to `list_charges` and filter by keywords or date ranges. The system aggregates the data, showing successful charges vs. failed attempts, giving an immediate audit snapshot.

### Onboarding New Users
You need to onboard a new client account in Stripe's database first. You run `create_customer` with their required details (name, email). Then, you immediately use the resulting customer ID to `create_charge`, ensuring the payment flows correctly from start to finish.

### Debugging Failed Payments
A critical client reports a card failure. You first run `get_customer` to ensure their account is up-to-date, then use `list_subscriptions` to confirm if the payment was linked to an active plan. This rapid data gathering helps pinpoint whether it's a billing issue or a tokenization error.

## Benefits

- Instantly audit revenue flow. Instead of digging through a dashboard to check recent activity, just ask the agent to `list_charges` for the last 7 days. You get summaries immediately.
- Stop manual balance checks. The `get_balance` tool gives you your available and pending funds in seconds—no need to open Stripe's financial overview page.
- Handle billing disputes faster. If a customer needs proof of payment, ask for the charge details using `get_charge`. It pulls up every metadata point instantly.
- Manage recurring revenue easily. Use `list_subscriptions` to see all active plans and their status, letting you quickly identify accounts that need attention.
- Streamline payouts and refunds. When a refund is needed, `create_refund` handles the API call immediately, tracking it against the original charge for your records.

## How It Works

The bottom line is: you get real-time access to Stripe's financial API directly within your chat client.

1. Subscribe to the Stripe Legacy server on Vinkius.
2. Input your Stripe Secret Key (sk_...) into the configuration; this authenticates your connection.
3. Ask your AI agent to perform a payment action, like 'List charges from yesterday.' The agent executes the tool and returns the data.

## Frequently Asked Questions

**How do I check my Stripe balance using get_balance?**
You simply ask your agent to 'Check my current account balance.' The `get_balance` tool executes and returns the available, pending, and total funds in a readable format.

**Can I refund a charge with create_refund? What do I need?**
Yes. To use `create_refund`, you must provide the ID of the original charge that was paid. The tool handles the actual money movement and records it in Stripe.

**How do I list all my active subscriptions using list_subscriptions?**
Ask your agent to 'List all active subscriptions.' The `list_subscriptions` tool pulls down a roster of current recurring payment plans, helping you audit your revenue streams.

**What is the difference between get_charge and list_charges?**
`get_charge` fetches details for one specific charge ID. `list_charges` pulls a batch of charges (e.g., all from last month), allowing you to review many transactions at once.

**If a new client signs up, what is the proper workflow for using `create_customer`?**
You must use `create_customer` first. This establishes a unique record in Stripe's system before any transactions occur. You pass basic identifying data—like email and name—to create that necessary customer account.

**How does using `create_token` improve security when I make a payment?**
The token converts sensitive card details into a single-use placeholder. Instead of sending raw credit card numbers to the agent, you pass this safe token. This keeps your main API keys protected.

**What is the difference between `list_charges` and using `list_invoices`?**
While both list transactions, invoices capture a complete billing cycle record. You use `list_invoices` to see everything billed—including payments and outstanding balances—whereas `list_charges` focuses only on raw transaction events.

**When I run `list_customers`, how do I retrieve data for thousands of users?**
The system handles large datasets using pagination. You don't need to worry about hitting an artificial limit; the agent requests results in chunks until it confirms it has gathered every customer record available.

**How do I find my Stripe Secret Key?**
Log in to your Stripe dashboard, navigate to **Developers** > **API keys**, and you will find your Secret Key (starting with sk_live_ or sk_test_) there.