Skip to main content
Glama
Lokesh-2025

Stripe MCP Server

by Lokesh-2025
README.md
# Stripe MCP Server

A Model Context Protocol (MCP) server that connects Claude (or any MCP client) to your Stripe account. Query customers, revenue, invoices, subscriptions, disputes, and issue refunds — all via natural language.

## Requirements

- Node.js 18+
- A Stripe account with a secret API key

## Installation

```bash
git clone https://github.com/your-username/stripe-mcp-server.git
cd stripe-mcp-server
npm install
cp .env.example .env
# Edit .env and set STRIPE_SECRET_KEY
```

## Running manually

```bash
STRIPE_SECRET_KEY=sk_live_... node index.js
```

## Claude Desktop Configuration

Add the following to your `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "stripe": {
      "command": "node",
      "args": ["/absolute/path/to/stripe-mcp-server/index.js"],
      "env": {
        "STRIPE_SECRET_KEY": "sk_live_..."
      }
    }
  }
}
```

Restart Claude Desktop after editing.

## Tools

| Tool | Description | Parameters |
|------|-------------|------------|
| `list_customers` | List recent Stripe customers | `limit` (1–100, default 10) |
| `get_revenue` | Total revenue from successful charges in a date range | `from` (YYYY-MM-DD), `to` (YYYY-MM-DD) |
| `list_invoices` | List invoices by status (`open` = unpaid) | `status` (draft \| open \| paid \| uncollectible \| void) |
| `list_failed_payments` | List recent failed charges with failure reasons | `limit` (1–100, default 10) |
| `get_subscription` | Get all subscriptions for a customer | `customer_id` (e.g., `cus_...`) |
| `create_refund` | Issue a full or partial refund | `charge_id` (e.g., `ch_...`), `amount` (cents, optional) |
| `list_disputes` | List disputes/chargebacks with evidence deadlines | `limit` (1–100, default 10) |

## Example prompts

- *"List my last 20 customers"*
- *"How much revenue did I make in May 2025?"*
- *"Show me all unpaid invoices"*
- *"What failed payments happened recently?"*
- *"Get subscriptions for customer cus_ABC123"*
- *"Refund charge ch_XYZ for $10"*
- *"Are there any open disputes?"*

## Security

- Never commit your `.env` file or hardcode your secret key.
- Use a **restricted key** with only the permissions your use case needs.
- Use `sk_test_...` keys for development.

## License

MIT