BeforeShip MCP Server
Provides pre-deploy AI-assisted security and readiness checks for AI-built apps, including scanning for secrets, auth gaps, and payment safety.
README
BeforeShip
Your AI coding agent says the app is done. BeforeShip checks if it is safe to deploy.
BeforeShip is an open-source launch gate for solo founders and vibe coders building apps with Cursor, Claude Code, Codex, Replit, Lovable, Bolt, v0, and other AI coding tools.
It scans AI-built SaaS apps for the production basics coding agents often skip:
- auth and authorization gaps
- exposed secrets and unsafe env usage
- Supabase RLS/database isolation issues
- Stripe/Razorpay webhook safety
- rate limits, CORS, validation, and security headers
- missing smoke tests and deployment readiness
- risky AI-agent diffs like deleted tests, huge rewrites, or auth/payment changes without verification
The goal is simple:
Run one command before deploy. Know if your vibe-coded app is safe to ship.
Status
This repository is starting as a public product spec and research-backed roadmap for an OpenAI Hackathon project.
The first executable slice is now in progress:
npm test
npm run scan -- --no-report
node packages/cli/bin/beforeship.js scan /path/to/app
node packages/cli/bin/beforeship.js loop /path/to/app --max-iterations 3
Current checks:
- basic stack detection for Next.js, Supabase, Stripe/Razorpay, Vercel, and env files
- committed env-file warning
- secret-like token detection for OpenAI, Supabase JWT-style keys, Stripe, and Razorpay
- Next.js API route auth-guard and trusted-user-id heuristics
- Stripe/Razorpay webhook signature and idempotency heuristics
- Supabase service-role, RLS, owner-policy, and public-bucket heuristics
- API safety checks for wildcard CORS, auth-route rate limits, and input validation
- Next.js deploy-readiness checks for tests, health routes, and
.env.example - score/verdict engine
- markdown and JSON reports under
.beforeship/ - bounded verification loop with named terminal states and loop memory
Demo fixture:
node packages/cli/bin/beforeship.js scan examples/flawed-next-supabase-app --no-report
The fixture should return DO NOT SHIP and show the launch blockers BeforeShip is designed to catch.
Repository-level scans respect .beforeshipignore, which excludes this intentionally flawed fixture.
The intended MVP is:
CLI first + MCP server + optional GitHub Action
Initial target stack:
Next.js + Supabase + Stripe/Razorpay + Vercel
Why BeforeShip?
AI coding tools make it easy to create working apps, but hard to verify production readiness.
A vibe-coded app can look 90% done while missing the dangerous invisible pieces:
- payment webhook signature verification
- database row-level security
- server-side auth checks
- safe API key handling
- rate limiting
- rollback and smoke tests
- deployment env separation
BeforeShip is the missing pre-deploy gate between:
"It works locally"
and:
"It is safe to launch"
Product thesis
Coding agents optimize for making code run. BeforeShip checks whether the generated app is safe to ship.
BeforeShip is not meant to replace Semgrep, Snyk, CodeQL, Gitleaks, or human review.
It is meant to orchestrate and explain the checks solo founders actually need before deploying an AI-built SaaS app.
Planned CLI
npx beforeship scan
npx beforeship scan --url https://myapp.com
npx beforeship report
npx beforeship fix-prompts
npx beforeship mcp
Example output:
BeforeShip score: 42/100
Verdict: DO NOT SHIP
Critical:
1. Razorpay webhook does not verify signature
2. Supabase service role key appears in client code
3. /api/admin/users has no auth guard
High:
4. No rate limiting on login
5. CORS allows all origins
6. No smoke tests found
Planned MCP tools
BeforeShip should expose a small number of high-leverage MCP tools, not a huge overloaded tool list.
before_ship_scan
before_ship_explain
before_ship_fix_plan
before_ship_gate_deploy
Optional:
before_ship_agent_policy
Planned checks
Secrets
.envcommitted- API keys in frontend bundle
NEXT_PUBLIC_misuse- Supabase service role exposed
- OpenAI/Anthropic/GitHub keys exposed
- Stripe/Razorpay secrets exposed
- Cursor/agent context includes secret files
Auth
- API routes without session/auth guard
- admin pages without server-side protection
- user ID trusted from body/query
- IDOR patterns
- auth middleware exists but is unused
- role checks performed client-side only
Supabase / database
- RLS disabled
- tables with user data and no owner policy
- service role used outside server
- public anon key misuse
- migration drift
- unsafe storage buckets
Payments
- Stripe/Razorpay webhook signature missing
- missing idempotency
- subscription status trusted from frontend
- price/plan selected client-side
- billing country/currency not server-validated
- entitlement table missing
- payment success page grants access without verified webhook
API safety
- wildcard CORS
- no rate limiting
- no input validation
- no CSRF for cookie auth flows
- verbose errors
- insecure file uploads
- missing security headers
- SSRF patterns
Deploy readiness
- no health endpoint
- no smoke tests
- no rollback note
- missing env vars
- Vercel serverless timeout risks
- critical routes lack logging
- no staging/prod separation
AI-agent-specific checks
- huge AI-generated files
- repeated full-file rewrites
- deleted tests
- new dependency added without reason
- changed auth/payment/db files without tests
- destructive scripts/migrations
- no
AGENTS.md/CLAUDE.md - agent touched files outside declared scope
- diff contains temporary auth bypasses
- tests modified to fit broken code
Planned report files
.beforeship/
config.yml
launch-report.md
findings.json
fix-prompts.md
evidence/
Example finding:
{
"id": "payment.webhook.signature_missing",
"severity": "critical",
"file": "web/src/app/api/razorpay/webhook/route.ts",
"title": "Razorpay webhook does not verify signature",
"why_it_matters": "Anyone can fake a payment success event and unlock access.",
"fix_prompt": "Add Razorpay webhook signature verification using RAZORPAY_WEBHOOK_SECRET. Reject unsigned or invalid payloads. Add a regression test."
}
How OpenAI fits
BeforeShip should use deterministic checks first and OpenAI reasoning second.
OpenAI can help with:
- stack-aware risk triage
- founder-friendly explanations
- fix prompt generation
- test plan generation
- false-positive reduction
- deploy-gate reasoning for AI agents
It should not rely only on LLM judgement for security.
Repository structure
Current repository is documentation-first.
Planned implementation shape:
beforeship/
packages/
cli/
core/
mcp/
github-action/
docs/
research.md
product-spec.md
roadmap.md
examples/
flawed-next-supabase-app/
Contributing
BeforeShip is intended to be open source.
Good first contribution areas:
- add stack-specific checks
- add examples of common vibe-coded app failures
- improve scoring rules
- add tests for detectors
- add MCP client setup docs
- add GitHub Action workflow
- improve report UX
See CONTRIBUTING.md.
License
MIT — see LICENSE.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。