npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@codespar/mcp-stripe

v0.2.1

Published

MCP server for Stripe — global standard-bearer payments API (PaymentIntents, Checkout, Billing, Refunds)

Readme

@codespar/mcp-stripe

MCP server for Stripe — global standard-bearer payments API

npm License: MIT

Stripe vs. Stripe ACP

Two Stripe MCP servers live in the CodeSpar catalog — different products:

| Package | Wraps | When to use | |---|---|---| | @codespar/mcp-stripe (this package) | Stripe's regular payments API (PaymentIntents, Checkout, Billing) | You are already using Stripe to accept payments today — the 99% case for LatAm SaaS that ship with Stripe. | | @codespar/mcp-stripe-acp | Stripe's Agentic Commerce Protocol | You are building on Stripe's new agent-native checkout spec. Much narrower product, bleeding edge. |

If you are a typical SaaS with Stripe as your PSP, this is the package.

Why Stripe in the CodeSpar catalog?

Stripe is the global standard-bearer for developer-first payments. Nearly every LatAm SaaS that bills international cards ships with Stripe — Truora, Platzi, Rappi Pay (for some flows), countless Y Combinator LatAm companies. Adding Stripe lets agents operate the payments stack those SaaS already run, without forcing a migration to a local-first gateway.

Quick Start

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

{
  "mcpServers": {
    "stripe": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-stripe"],
      "env": {
        "STRIPE_SECRET_KEY": "sk_test_..."
      }
    }
  }
}

Claude Code

claude mcp add stripe -- npx @codespar/mcp-stripe

Cursor / VS Code

Add to .cursor/mcp.json or .vscode/mcp.json:

{
  "servers": {
    "stripe": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-stripe"],
      "env": {
        "STRIPE_SECRET_KEY": "sk_test_..."
      }
    }
  }
}

Tools (30)

| Tool | Purpose | |---|---| | create_payment_intent | Create a PaymentIntent — Stripe's modern primitive for charging a customer. | | confirm_payment_intent | Confirm a PaymentIntent created with confirm=false. | | retrieve_payment_intent | Retrieve a PaymentIntent by id. | | cancel_payment_intent | Cancel a PaymentIntent. | | list_payment_intents | List PaymentIntents. | | create_refund | Refund a charge or a PaymentIntent. | | list_refunds | List Refunds. | | create_customer | Create a Stripe Customer. | | retrieve_customer | Retrieve a Customer by id. | | update_customer | Update a Customer. | | create_product | Create a Product — the catalog entity Prices reference. | | list_products | List Products. | | create_price | Create a Price attached to a Product. | | list_prices | List Prices. | | create_subscription | Create a Subscription for an existing customer. | | update_subscription | Update a Subscription. | | cancel_subscription | Cancel a Subscription. | | list_subscriptions | List Subscriptions. | | create_checkout_session | Create a hosted Checkout Session. | | create_payment_link | Create a long-lived Payment Link (shareable URL) that charges a price or set of line items. | | list_payment_links | List Payment Links. | | create_invoice | Create an Invoice draft for a customer. | | list_invoices | List Invoices. | | finalize_invoice | Finalize a draft Invoice. | | send_invoice | Send a finalized Invoice to the customer by email. | | pay_invoice | Attempt to collect payment on an open Invoice. | | void_invoice | Void a finalized Invoice. | | update_dispute | Submit evidence on a Dispute. | | list_disputes | List Disputes. | | retrieve_balance | Retrieve the current Stripe account balance — available, pending, and connect_reserved funds broken down by... |

Authentication

Stripe uses a single secret key. The key prefix selects the environment:

  • sk_test_... → test mode (no real money moves)
  • sk_live_... → live mode

There is no separate base URL — the key itself routes requests. Set STRIPE_SECRET_KEY and you are done.

Request bodies are application/x-www-form-urlencoded with bracket notation (customer[name]=Foo, metadata[order]=123, expand[]=latest_invoice). This server handles nested objects and arrays for you.

Pinning an API version

Stripe auto-upgrades breaking changes on a calendar cadence. If you want to lock the version your agent sees, set STRIPE_API_VERSION (e.g. 2024-06-20). The server passes it as the Stripe-Version header on every call.

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | STRIPE_SECRET_KEY | Yes | sk_test_... or sk_live_... from Stripe Dashboard > Developers > API keys | | STRIPE_API_VERSION | No | Pin API version via the Stripe-Version header (e.g. 2024-06-20) |

Sandbox / Testing

Every Stripe account has test mode built in — no separate signup. Use a sk_test_... key and any of Stripe's test cards (e.g. 4242 4242 4242 4242).

Get your credentials

  1. Sign up at stripe.com
  2. Go to Dashboard > Developers > API keys
  3. Copy your Secret key (test mode by default)
  4. Set STRIPE_SECRET_KEY

Roadmap

v0.2 (planned)

  • update_payment_intent, capture_payment_intent (separate capture)
  • retrieve_refund, list_refunds
  • list_customers, search_customers
  • update_subscription, retrieve_subscription
  • retrieve_invoice, finalize_invoice, pay_invoice, send_invoice, void_invoice
  • create_invoice_item, list_invoice_items
  • create_price, create_product
  • list_charges, retrieve_charge
  • retrieve_dispute, close_dispute, list_disputes

v0.3 (planned)

  • Stripe Connect: accounts, account links, transfers, payouts
  • create_setup_intent, confirm_setup_intent (saving cards for later)
  • PaymentMethod attach / detach / list
  • Webhook event construction helper

Want a tool sooner? Open an issue or PR.

Links

Enterprise

Need governance, spend caps, and audit trails for agent-initiated charges, refunds, and subscription changes? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT