Stripe 的模型上下文协议服务器允许你通过函数调用的方式与 Stripe API 进行集成。该协议支持多种工具来与不同的 Stripe 服务进行交互。
使用 npx 运行 Stripe MCP 服务器的命令如下:
# 设置所有可用工具
npx -y @stripe/mcp --tools=all --api-key=你的STRIPE密钥
# 设置特定工具
npx -y @stripe/mcp --tools=customers.create,customers.read,products.create --api-key=你的STRIPE密钥
# 配置 Stripe 关联账户
npx -y @stripe/mcp --tools=all --api-key=你的STRIPE密钥 --stripe-account=关联账户ID

请确保将 你的STRIPE密钥
替换为你实际的 Stripe 密钥。或者,你也可以在环境变量中设置 STRIPE_SECRET_KEY
。
将以下内容添加到你的 claude_desktop_config.json
中。更多详情请参见这里。
{ "mcpServers": { "stripe": { "command": "npx", "args": [ "-y", "@stripe/mcp", "--tools=all", "--api-key=STRIPE_SECRET_KEY" ] } } }
如果你使用 Docker:
{ “mcpServers”: { “stripe”: { “command”: “docker", “args”: [ “run”, "--rm", "-i", “mcp/stripe”, “--tools=all”, “--api-key=STRIPE_SECRET_KEY” ] } } }
工具 | 描述 |
---|---|
customers.create |
创建新客户 |
customers.read |
读取客户信息 |
products.create |
创建新产品 |
products.read |
读取产品信息 |
prices.create |
创建新价格 |
prices.read |
读取价格信息 |
paymentLinks.create |
创建新的支付链接 |
invoices.create |
创建新发票 |
invoices.update |
更新现有发票 |
invoiceItems.create |
创建新的发票项目 |
balance.read |
获取余额信息 |
refunds.create |
创建新退款 |
paymentIntents.read |
读取支付意图信息 |
subscriptions.read |
读取订阅信息 |
subscriptions.update |
更新订阅信息 |
coupons.create |
创建新优惠券 |
coupons.read |
读取优惠券信息 |
disputes.update |
更新现有争议 |
disputes.read |
读取争议信息 |
documentation.read |
搜索 Stripe 文档 |
要调试你的服务器,可以使用 MCP Inspector。
首先构建服务器:
npm run build
然后在终端运行以下命令:
# 启动 MCP Inspector 和带有所有工具的服务器
npx @modelcontextprotocol/inspector node dist/index.js --tools=all --api-key=你的STRIPE密钥

首先构建服务器:
docker build -t mcp/stripe .
然后在终端运行以下命令:
docker run -p 3000:3000 -p 5173:5173 -v /var/run/docker.sock:/var/run/docker.sock mcp/inspector docker run --rm -i mcp/stripe --tools=all --api-key=你的STRIPE密钥

你的STRIPE密钥
替换为你实际的 Stripe API 密钥。