saas-brain-mcp
Open-source MCP server for Claude AI that connects Stripe and Supabase to enable natural language SaaS analytics, including churn analysis, subscription tracking, and revenue insights.
README
SaaS Brain MCP
Ask questions about your SaaS business in plain English using Claude AI.
"Who is about to churn?" • "What's my revenue this week?" • "Who are my best customers?"
No dashboards. No SQL. Just ask.
What it does
SaaS Brain is an MCP (Model Context Protocol) server that connects Claude AI to your Stripe and Supabase data. Ask natural language questions and get intelligent business insights instantly.
Available tools
| Tool | What it answers |
|---|---|
getRevenue |
Total revenue for any date range |
getTopCustomers |
Highest spending customers |
getActiveSubscriptions |
All active subscribers + plan info |
getInactiveUsers |
Users who haven't logged in for N days |
getUserActivity |
Last login + activity for a specific user |
getChurnRiskUsers |
Paying users who have gone inactive |
getHighValueUsers |
Customers above a spend threshold |
getHighValueAtRiskUsers |
High spenders who are now inactive |
Example questions you can ask Claude
- "What's my revenue from January to March?"
- "Show me my top 5 customers by spend"
- "Which users are at risk of churning?"
- "Who pays the most but hasn't logged in recently?"
- "Give me a full health report of my SaaS"
Tech stack
- Java 17 + Spring Boot
- Stripe API
- Supabase REST API
- Docker
- MCP Protocol (JSON-RPC 2.0)
Prerequisites
- Java 17+
- Maven
- A Stripe account (free, test mode works)
- A Supabase project (free tier works)
- A Claude.ai account (free tier works)
Setup
1. Clone the repo
git clone https://github.com/Mohd16kaif/saas-brain-mcp.git
cd saas-brain-mcp
2. Add your API keys
Create src/main/resources/application.properties:
server.port=8080
spring.application.name=saas-brain-mcp
stripe.api.key=sk_test_YOUR_STRIPE_KEY
supabase.url=https://YOUR_PROJECT.supabase.co
supabase.key=YOUR_SERVICE_ROLE_KEY
Get your keys from:
- Stripe: dashboard.stripe.com → Developers → API Keys
- Supabase: app.supabase.com → Settings → API → service_role key
3. Run locally
mvn spring-boot:run
Test it:
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
Deploy to Render (free, 24/7)
1. Fork this repo on GitHub
2. Create a new Web Service on Render
- Go to render.com → New → Web Service
- Connect your forked repo
- Language: Docker
- Branch:
main - Instance Type: Free
3. Add environment variables in Render
| Key | Value |
|---|---|
STRIPE_API_KEY |
your Stripe key |
SUPABASE_URL |
your Supabase project URL |
SUPABASE_KEY |
your Supabase service_role key |
4. Deploy
Render builds and deploys automatically. Your server will be live at:
https://your-service-name.onrender.com
Connect to Claude.ai
- Go to claude.ai → Settings → Connectors
- Click Add custom connector
- Name:
saas-brain - URL:
https://your-render-url.onrender.com/mcp - Save and enable in chat
Then just ask Claude anything about your business.
Connect to Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"saas-brain": {
"type": "http",
"url": "https://your-render-url.onrender.com/mcp"
}
}
}
File location:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Important notes
- Use Supabase's
service_rolekey (not theanonkey) needed to queryauth.users - Churn detection works by matching emails between Stripe and Supabase make sure users sign up with the same email in both
- Free Render instances sleep after 15 minutes of inactivity first request may take 30 seconds to wake up
Cost
$0 Stripe test mode is free, Supabase free tier is permanent, Render free tier is sufficient for personal use.
License
MIT free to use, modify, and deploy.
Built by
Mohd. Kaif Shaikh GitHub
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。