Skip to main content
ST

Stripe

v0.2.1API Key

Stripe's global payments API — distinct from stripe-acp (which wraps Stripe's Agentic Commerce Protocol). What every LatAm SaaS accepting Stripe uses today. Payment Intents, refunds, customers, subscriptions, checkout, payment links, invoices, disputes.

30 tools2 env vars🌐 GLOBALstable on npm

What your agent can do

Stripe gives your agent 30 tools it calls directly — pick the ones it needs, in Claude, Cursor, or any MCP client.

  • create_payment_intentCreate a PaymentIntent — Stripe's modern primitive for charging a customer. Use confirm=true to authorize + capture atomically, or omit for a two-step flow.
  • confirm_payment_intentConfirm a PaymentIntent created with confirm=false. Attaches and charges the payment method.
  • retrieve_payment_intentRetrieve a PaymentIntent by id.
Example call
// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("create_payment_intent", { /* ... */ });

Install

terminal
$ npm install @codespar/mcp-stripe

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

claude_desktop_config.json
{
  "mcpServers": {
    "stripe": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-stripe"
      ],
      "env": {
        "STRIPE_SECRET_KEY": "<your_stripe_secret_key>"
      }
    }
  }
}

After restart, your agent can call any of the 30 tools below — try create_payment_intent first.

Environment variables · 2

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

STRIPE_SECRET_KEY
requiredsecret

Stripe secret key (sk_test_... for test mode, sk_live_... for live mode). The key prefix selects the environment — no separate base URL.

STRIPE_API_VERSION
optional

Optional Stripe API version to pin via the Stripe-Version header (e.g. '2024-06-20'). When omitted, Stripe uses the account's default version.

Available tools · 30

Each tool is independent — your agent loads only what it needs to reduce context and response time.

WRITEcreate_payment_intent
Create a PaymentIntent — Stripe's modern primitive for charging a customer. Use confirm=true to authorize + capture atomically, or omit for a two-step flow.
WRITEconfirm_payment_intent
Confirm a PaymentIntent created with confirm=false. Attaches and charges the payment method.
WRITEretrieve_payment_intent
Retrieve a PaymentIntent by id.
DELETEcancel_payment_intent
Cancel a PaymentIntent. Works only when status is requires_payment_method, requires_capture, requires_confirmation, requires_action, or processing.
WRITElist_payment_intents
List PaymentIntents. Filter by customer or created window.
DELETEcreate_refund
Refund a charge or a PaymentIntent. Omit amount for a full refund; set amount for partial.
READlist_refunds
List Refunds. Filter by charge or payment_intent.
WRITEcreate_customer
Create a Stripe Customer. All fields optional; Stripe will still assign a cus_... id.

Compatible frameworks

MCP is a protocol — any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

Run `npx -y @codespar/mcp-stripe` and add the config block above to your MCP client — Claude, Cursor, VS Code, or any MCP-compatible client. No build step, no SDK required. Prefer hosted? CodeSpar's managed tier runs it for you with auth handled.
Stripe — MCP server · 30 tools | CodeSpar