Stripe MCP server

Finance and commerce

MCP server for Stripe, global payments API (PaymentIntents, Checkout, Billing, Refunds).

Your AI app calls the Stripe MCP server, which does the finance and commerce work and sends the result back to the chat.

About Stripe

Stripe is a community MCP server from codespar, filed in our directory under finance and commerce. MCP server for Stripe, global payments API (PaymentIntents, Checkout, Billing, Refunds).

Stripe runs on your own machine: your AI app starts it with the command npx -y @codespar/mcp-stripe@0.2.2 and talks to it over standard input and output. It needs STRIPE_SECRET_KEY set before Stripe starts.

Stripe is listed in the official MCP registry as io.github.codespar/mcp-stripe, version 0.2.2.

At a glance

Publisher
codespar (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @codespar/mcp-stripe
Written in
TypeScript
License
MIT
GitHub stars
278
Official MCP registry
io.github.codespar/mcp-stripe

How to set up Stripe

  1. Install Node.js on the machine that runs your AI app, because Stripe starts with npx and downloads its package on first run.
  2. Create STRIPE_SECRET_KEY for Stripe in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Stripe to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Stripe tools to confirm the connection.
  5. Run one read-only task with Stripe first, and keep your app asking before each tool call until the results look right.

Stripe compared with similar servers

  • Stripe Acp by codespar has fewer GitHub stars than Stripe (278 against 278); both are community servers, and both run locally.
  • Stp Spei by codespar has fewer GitHub stars than Stripe (278 against 278); both are community servers, and both run locally.
  • Take Blip by codespar has fewer GitHub stars than Stripe (278 against 278); both are community servers, and both run locally.

Before you connect Stripe

  • Give Stripe its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Stripe tool call until you trust what it does with them.
  • Treat text that Stripe fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Stripe on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Stripe

How marketing and sales teams put Stripe to work, by company size. Pick the size closest to yours and start Stripe on one use case.

Small business

  • A small business can ask Stripe which products and customers drive margin, then plan promotions around them.
  • Owners can use Stripe to check refunds, failed payments and churn reasons without opening three dashboards.
  • Stripe runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Ecommerce teams can connect Stripe to tie campaigns to orders and revenue, not just clicks.
  • Marketing and finance can use Stripe to check spend against budget each week and move money to what's working.
  • Start Stripe on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should keep Stripe read-only for agents, with any money movement handled by people and existing approvals.
  • Large commerce teams can use Stripe to answer revenue questions by channel and region with figures finance signs off on.
  • Stripe is a community server, so have security review the code and pin a version before Stripe touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Stripe README

From codespar/mcp-dev-latam on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

@codespar/mcp-stripe

MCP server for Stripe, global standard-bearer payments API

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

Questions about Stripe

What is the Stripe MCP server?

MCP server for Stripe, global payments API (PaymentIntents, Checkout, Billing, Refunds). Stripe is maintained by codespar on GitHub at codespar/mcp-dev-latam, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Stripe MCP server?

Add Stripe to your AI app's MCP config with the command npx -y @codespar/mcp-stripe@0.2.2. In Claude Code, run claude mcp add --transport stdio codespar-stripe -- npx -y @codespar/mcp-stripe@0.2.2. To run Stripe this way you need Node.js installed.

Does Stripe need an API key?

Yes. Stripe expects STRIPE_SECRET_KEY to be set. Create the key for Stripe in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.

Is Stripe an official MCP server?

No. Stripe is a community server maintained by codespar. Community servers can be excellent; read the code and the open issues before you give Stripe access to company data.

What license is Stripe under?

Stripe is released under the MIT license, according to its GitHub repository. The license covers the code of Stripe; the service it connects to has its own terms.