mcp条带分析
将Claude连接到您的Stripe仪表板。收入、客户、订阅——都来自聊天。
安装
添加到您的 .mcp.json:
{
"mcpServers": {
"stripe-analytics": {
"command": "npx",
"args": ["-y", "mcp-stripe-analytics"],
"env": {
"STRIPE_SECRET_KEY": "sk_live_..."
}
}
}
}工具
get_revenue_summary
获取一段时间的总收入、费用、净收入和交易计数。
get_revenue_summary({ period: "month" })
// => { gross: 12450.00, fees: 361.05, net: 12088.95, count: 187 }参数: period — "today" | "week" | "month" | "year" (默认值: "month")
get_customer_count
一段时间内增加的客户和新客户总数。
get_customer_count({ period: "week" })
// => { total: 1243, new_in_period: 38 }参数: period — "today" | "week" | "month" | "year" (默认值: "month")
get_subscribe_metrics
订阅状态细分:活动、试用、过期、已取消。
get_subscription_metrics()
// => { active: 412, trialing: 27, past_due: 8, canceled: 63 }参数: 无
获取top_客户
按终身消费排名的前N位客户。
get_top_customers({ limit: 5 })
// => [{ email: "whale@co.com", name: "Whale Corp", total_spent: 8420.00 }, ...]参数: limit --数字(默认值: 10)
get_recent_charges
列出最近的费用,包括金额、状态和客户信息。
get_recent_charges({ limit: 10, status: "failed" })
// => [{ id: "ch_...", amount: 49.00, status: "failed", customer_email: "..." }, ...]参数: limit --数字(默认值: 20), status — "succeeded" | "failed" | "all" (默认值: "all")
获取_资金_摘要
一段时间内的退款计数和总金额。
get_refund_summary({ period: "month" })
// => { count: 4, total: 196.00 }参数: period — "today" | "week" | "month" | "year" (默认值: "month")
get_product_revenue
按产品分组的收入明细。
get_product_revenue({ period: "month" })
// => [{ product: "Pro Plan", revenue: 7800.00, count: 156 }, ...]参数: period — "today" | "week" | "month" | "year" (默认值: "month")
get_mrr
根据所有活动订阅计算的月度经常性收入。
get_mrr()
// => { mrr: 4120.50, active_subscriptions: 412 }参数: 无
安全
此服务器使用 只读Stripe API调用。它从不创建、更新或删除任何Stripe资源。您的账单数据是安全的。
使用一个 受限API密钥 具有只读权限以实现最大安全性。
由...建造
色变 --面向构建者的AI原生工具。
