The MCP Stripe Server is a specialized implementation of the Model Context Protocol that integrates with Stripe to manage payments, customers, and refunds through a structured API. It provides secure financial transaction handling with comprehensive audit logging.
The easiest way to install Stripe Server for Claude Desktop is through Smithery:
npx -y @smithery/cli install @atharvagupta2003/mcp-stripe --client claude
python -m venv venv
source venv/bin/activate # On macOS/Linux
venv\Scripts\activate # On Windows
pip install -e .
.env
file with your Stripe API key:STRIPE_API_KEY=your_stripe_secret_key
Add the server configuration to your Claude Desktop config file:
Windows: C:\Users\<username>\AppData\Roaming\Claude\claude_desktop_config.json
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"stripe": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/src",
"run",
"server.py"
]
}
}
}
Launch the MCP Stripe server with:
uv run src/server.py
The server provides several Stripe-related tools through MCP:
{
"tool": "customer_create",
"arguments": {
"email": "[email protected]",
"name": "John Doe"
}
}
{
"tool": "customer_retrieve",
"arguments": {
"customer_id": "cus_123456"
}
}
{
"tool": "payment_intent_create",
"arguments": {
"amount": 5000,
"currency": "usd",
"customer": "cus_123456"
}
}
{
"tool": "refund_create",
"arguments": {
"charge_id": "ch_abc123"
}
}
The server provides clear error messages for common scenarios:
For testing and exploring the API capabilities, use the MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/src run server.py
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.