Skip to main content
ST

Stripe

v0.2.0API 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

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

All credentials are encrypted at rest in an isolated vault scoped per organization. OAuth2 tokens are automatically refreshed before expiry. Your agent code never sees raw secrets โ€” it receives scoped, short-lived session tokens.
Servers โ€” Every LatAm commerce API your agent needs | CodeSpar