Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
Overview
Versioning
Changelog
Upgrade your API version
Upgrade your SDK version
Essentials
SDKs
API
Testing
Stripe CLI
Sample projects
Tools
Workbench
Developers Dashboard
Stripe Shell
Stripe for Visual Studio Code
Features
Workflows
Event Destinations
Stripe health alertsFile uploads
AI solutions
Agent toolkit
Model Context Protocol
Security and privacy
Security
Privacy
Extend Stripe
Build Stripe apps
Use apps from Stripe
Partners
Partner ecosystem
Partner certification
HomeDeveloper resources

Model Context Protocol (MCP)Public preview

Let your AI agents interact with the Stripe API by using our MCP server.

The Stripe Model Context Protocol (MCP) server defines a set of tools that AI agents can use to interact with the Stripe API and search our knowledge base (including documentation and support articles).

If you use AI-powered code editors like Cursor or Windsurf, or general-purpose tools like Claude Desktop, you can use the MCP server.

Remote server

Stripe hosts a Streamable HTTP MCP server that’s available at https://mcp.stripe.com. The Stripe MCP server uses OAuth Dynamic Client Registration to connect MCP clients as per the MCP spec.

Install in Cursor

To open Cursor and automatically add the Stripe MCP, click install. Alternatively, add the following to your ~/.cursor/mcp.json file. To learn more, see the Cursor documentation.

{ "mcpServers": { "stripe": { "url": "https://mcp.stripe.com" } } }

OAuth connections

When you add the Stripe MCP to a client, the MCP client opens an OAuth consent form which allows you to authorize the client to access your Stripe data. OAuth is done through a Stripe App. Only admins can install the Stripe MCP. After installing, you can manage your OAuth connections in your Dashboard settings.

To view authorized MCP clients:

  1. Navigate to the Stripe MCP app in the Stripe Dashboard.

  2. In the right panel, click Clients to view OAuth-connected MCP clients.

To revoke OAuth access for a specific MCP client:

  1. Find the client in the list, and click the overflow menu.

  2. Select Revoke.

Allowlist of client redirect URIs

Stripe maintains an allowlist of vetted MCP client redirect URIs to protect our users from malicious phishing attacks. If there’s an MCP client application that you want to allowlist, email us at mcp@stripe.com.

Bearer token

If you’re building agentic software, you can pass a Stripe API key as a bearer token to the MCP remote server. We strongly recommend using restricted API keys to limit access to the functionality your agent requires. For example, you can use this authorization method with OpenAI’s Responses API.

Command Line
curl https://mcp.stripe.com/ \ -H "Content-Type: application/json" \ -H "Authorization: Bearer
sk_test_BQokikJOvBiI2HlWgH4olfQ2
"
\ -d '{ "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "create_customer", "arguments": {"name": "Jenny Rosen", "email": "jenny.rosen@example.com" } }, "id": 1 }'

Local server

If you prefer or require a local setup, run the local Stripe MCP server.

Install in Cursor

To open Cursor and automatically add the Stripe MCP, click install. Alternatively, add the following to your ~/.cursor/mcp.json file. To learn more, see the Cursor documentation.

{ "mcpServers": { "stripe": { "command": "npx", "args": ["-y", "@stripe/mcp", "--tools=all"], "env": { "STRIPE_SECRET_KEY":
"sk_test_BQokikJOvBiI2HlWgH4olfQ2"
} } } }

The code editor agent automatically detects all the available tools, calling the relevant tool when you post a related question in the chat.

See also

  • Build on Stripe with LLMs
  • Add Stripe to your agentic workflows
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Join our early access programme.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc