mcp条纹助手
一个MCP服务器,帮助开发人员编写、调试和测试Stripe集成代码。这是一个 编码助手,不是Stripe API包装器-不需要API密钥,也不需要对Stripe的网络调用。
工具
| 工具 | 它做什么 |
|---|---|
stripe_code_example | 为常见的Stripe操作(Types/Python)生成工作代码示例 |
stripe_webhook_validator | 检查webhook事件结构——有效负载形状、必填字段、陷阱 |
stripe_error_helper | 解释条纹错误代码及其原因并提出修复建议 |
stripe_migration_guide | 获取API版本之间的突破性更改和迁移步骤 |
stripe_test_data | 为Stripe对象生成逼真的测试夹具(JSON) |
安装
npx -y mcp-stripe-helper克劳德桌面/克劳德代码
添加到MCP配置中:
{
"mcpServers": {
"stripe-helper": {
"command": "npx",
"args": ["-y", "mcp-stripe-helper"]
}
}
}Cursor/Windsurf/其他MCP客户端
相同的配置格式——添加到MCP设置文件中。
用法示例
获取webhook处理程序示例:
“演示如何在TypeScript中处理checkout.session.com完成的webhooks”
用途 stripe_code_example 随着操作 handle_webhook + stripe_webhook_validator 与事件 checkout.session.completed.
调试条纹错误:
“我被卡扣了——这是什么意思?”
用途 stripe_error_helper 有错误 card_declined.
生成测试数据:
“为我的测试套件提供5个测试客户”
用途 stripe_test_data 具有object_type customer,计数 5.
计划API升级:
“Stripe API 2023-08-16和2024-12-18之间有什么区别?”
用途 stripe_migration_guide 有两个版本。
支持的操作(stripe_code_example)
create_customer--创建和配置Stripe客户charge_card--使用PaymentIntents(现代方法)为卡充值setup_subscription--使用SCA支持创建和取消订阅handle_webhook--带有签名验证的完整webhook处理程序create_checkout_session--一次性和订阅结账流程create_payment_intent--使用client_secret自定义支付流程create_product_and_price--一次性和经常性价格的产品attach_payment_method--附加并设置默认付款方式create_portal_session--客户自助计费门户list_invoices--列出并创建发票
发展
npm install
npm run build
npm start许可证
麻省理工学院
