Gives Claude read-only admin access to a running LastSaaS instance through 32 MCP tools. You can query financial metrics like ARR trends, inspect system health across nodes, audit API keys and webhooks, review user activity and tenant details, and investigate billing events without touching the database directly. Built for operational questions in natural language: "show me trial conversions this month" or "which tenants hit rate limits yesterday". The server connects via stdio and exposes dashboards, logs, and telemetry that would otherwise require SQL queries or clicking through admin panels. Useful if you're running LastSaaS in production and want an AI copilot for monitoring and investigation.
The last SaaS boilerplate you'll ever need.
LastSaaS is a complete, production-ready SaaS foundation built entirely through conversation with Claude Code. It gives you multi-tenant account management, authentication, role-based access control, white-label branding, Stripe billing, API keys, outgoing webhooks, a full admin interface, system health monitoring, credit-based usage tracking, and product analytics with telemetry — everything you need to launch a SaaS business, ready to customize for your specific product.
The bottleneck for building software isn't engineering capacity anymore — it's imagination. LastSaaS proves it: a single person with a clear vision and an AI agent can stand up what used to require a team and months of work. And because it was built with Claude Code, the codebase is fork-ready for agentic engineering — point an AI agent at it and keep building your product through conversation.
Every SaaS product needs the same boring foundation: user accounts, teams, roles, authentication, admin dashboards, billing, usage limits, branding, webhooks, API keys. Historically, building that foundation meant weeks of plumbing before you could write a single line of your actual product.
LastSaaS eliminates that. Fork it, point an AI agent at it, and start building your product on top of a foundation that already handles:
This is open-source infrastructure for the agentic era of software — where the person with the idea is also the person who ships it. The codebase follows consistent patterns that AI agents navigate fluently, so you can keep evolving it the same way it was built.
If you're evaluating SaaS boilerplates, you've probably looked at ShipFast, Supastarter, MakerKit, SaaS Pegasus, and Gravity. Here's why technical founders choose LastSaaS instead.
Free and open-source. ShipFast costs $169, MakerKit runs $199–599, Supastarter starts at $299, SaaS Pegasus charges $249/year, and Gravity is under $1K. LastSaaS is MIT-licensed — fork it, ship it, never pay a license fee. You own the code completely.
Go backend, not another Next.js project. ShipFast, Supastarter, MakerKit, and Gravity are all JavaScript/TypeScript stacks. SaaS Pegasus uses Django. LastSaaS pairs a Go backend with a React + TypeScript frontend — giving you compiled-binary deployment, low memory footprint (a 14MB Alpine container), and the concurrency model that Go is known for. If your SaaS will handle real traffic or you want a backend that isn't a Node.js monolith, this matters.
Genuine multi-tenancy. ShipFast has no multi-tenancy at all. SaaS Pegasus and Gravity offer basic team features but not true tenant isolation. LastSaaS gives you full multi-tenant architecture: tenant-scoped data isolation, three-tier RBAC (owner/admin/user), team invitations, ownership transfer, per-tenant activity logs, and per-tenant billing. This is the difference between "users can collaborate" and "each customer gets their own isolated workspace."
White-label branding built in. Most boilerplates give you a theme toggle at best. LastSaaS includes a full white-label system: custom app name, logo, colors, fonts, landing page, custom pages, CSS injection, favicon, configurable navigation with entitlement gating, and auth page customization. If you're building a platform where customers see your brand (not yours-plus-a-framework), this saves weeks.
Outgoing webhooks, not just Stripe webhooks. None of the alternatives — ShipFast, Supastarter, MakerKit, SaaS Pegasus, or Gravity — include an outgoing webhook system. LastSaaS ships with 19 event types across billing, team lifecycle, user lifecycle, credits, and security events, with HMAC-SHA256 signing, delivery tracking, and test events. Your customers can integrate with your platform from day one.
API keys with scoped access. ShipFast, Supastarter, and MakerKit don't include API key management. LastSaaS provides lsk_-prefixed API keys with admin and user authority scopes, SHA-256 hashed storage, and last-used tracking — ready for your customers to build integrations.
Health monitoring and financial dashboards. No competing boilerplate includes system health monitoring. LastSaaS collects CPU, memory, disk, HTTP, and MongoDB metrics every 60 seconds across all nodes, with 8 real-time charts, threshold alerting, and 30-day retention. The financial dashboard gives you revenue, ARR, DAU, and MAU time-series out of the box.
Product analytics with telemetry. No competing boilerplate includes product analytics. LastSaaS auto-instruments the customer journey — visitor → signup → plan page → checkout → paid conversion → upgrade — and visualizes it as a conversion funnel. The PM dashboard includes SaaS KPIs (MRR, ARR, ARPU, LTV, churn rate, trial conversion), retention cohort analysis, engagement metrics (DAU/WAU/MAU for paying subscribers), and a custom event explorer. A Go SDK and REST API let you track your own events with zero configuration.
MCP server for AI-native operations. This is unique to LastSaaS. A built-in Model Context Protocol server with 32 read-only tools lets you connect Claude (or any MCP-compatible AI) directly to your running application. Query your ARR trend, investigate error spikes, audit API keys, or review system health — all in natural language. No other SaaS boilerplate offers agentic admin access.
Built for AI-assisted development. LastSaaS was built entirely through conversation with Claude Code, and the codebase is designed to keep being built that way. Consistent patterns, clear naming, and a structure AI agents navigate fluently. Fork it, point an agent at it, describe your product, and keep going. The competing boilerplates were built for manual development — LastSaaS is built for the way software is made now.
| LastSaaS | ShipFast | Supastarter | MakerKit | Pegasus | Gravity | |
|---|---|---|---|---|---|---|
| Price | Free (MIT) | $169 | $299+ | $199–599 | $249/yr | <$1K |
| Stack | Go + React | Next.js | Next.js / Nuxt | Next.js | Django | Node + React |
| Multi-Tenancy | Full RBAC | — | ✓ | ✓ | Teams only | Teams only |
| White-Label | Full | — | Partial | Partial | — | — |
| Webhooks | 19 events | — | — | — | — | — |
| API Keys | Scoped | — | — | — | Basic | — |
| Health Monitoring | 8 charts | — | — | — | — | — |
| Product Analytics | 5-tab PM dashboard | — | — | — | — | — |
| Credit System | Dual buckets | — | — | Basic | — | — |
| MCP Server | 26 tools | — | — | — | — | — |
| Admin Dashboard | Full | — | ✓ | ✓ | ✓ | Basic |
| Stripe Billing | Full | ✓ | ✓ | ✓ | ✓ | ✓ |
charge.refunded, charge.dispute.created, charge.dispute.closed/p/{slug} with SEO metadatalsk_ prefixwhsec_-prefixed secretslastLoginAt over time)telemetry.Track() / TrackBatch() / TrackPageView() / TrackCheckoutStarted() / TrackLogin() for direct in-process event recording (no HTTP overhead)POST /telemetry/track (anonymous, rate-limited) for page views; POST /telemetry/events and /telemetry/events/batch (authenticated) for custom events/api/docs with expandable endpoint details/api/docs/markdown for integration in external docslastsaas setup — Initialize the system (create root tenant + owner)lastsaas start / stop / restart — Server process managementlastsaas change-password — Reset any user's passwordlastsaas send-message — Send system messages to userslastsaas transfer-root-owner — Transfer root tenant ownershiplastsaas config list|get|set — Manage configuration variableslastsaas version — Show binary and database versionslastsaas status — Check system healthlastsaas mcp — Start the MCP server (see MCP Server below)A built-in Model Context Protocol server gives AI assistants like Claude read-only access to your admin data — dashboards, users, tenants, financials, logs, health, and more. Useful for asking questions like "what's our ARR trend?" or "show me critical logs from the last hour" in natural language.
lastsaas://dashboard and lastsaas://health for automatic contextTool categories:
| Layer | Technology |
|---|---|
| Backend | Go 1.25, gorilla/mux |
| Frontend | React 19, TypeScript, Vite 7, Tailwind CSS 4 |
| Database | MongoDB (Atlas or local) |
| Auth | JWT (access + refresh), bcrypt, Google/GitHub/Microsoft OAuth, Magic Links, TOTP MFA |
| Billing | Stripe (stripe-go v82) — Checkout, Billing Portal, Webhooks, Tax |
| Resend | |
| Charts | Recharts |
| Metrics | gopsutil v4 |
| gofpdf (invoice generation) | |
| Security | DOMPurify (frontend), HMAC-SHA256 (webhooks) |
| Deployment | Docker, Fly.io |
git clone https://github.com/jonradoff/lastsaas.git
cd lastsaas
./scripts/setup.sh
This will prompt you for:
mongodb://localhost:27017It writes a .env file and copies the config template.
set -a && source .env && set +a
cd backend
go run ./cmd/server
The server starts on http://localhost:4290.
In a separate terminal:
set -a && source .env && set +a
cd frontend
npm install
npm run dev
The frontend starts on http://localhost:4280.
Run the CLI setup to create the root tenant and admin account:
cd backend
go run ./cmd/lastsaas setup
This creates the root tenant (your admin organization) and the owner account. You can now log in at http://localhost:4280.
Stripe integration is optional but required for paid subscriptions, credit bundle purchases, and invoice generation. If you skip this section, LastSaaS works as a free-tier-only platform.
Sign up at stripe.com and complete onboarding. You can use test mode during development.
Go to Stripe Dashboard → Developers → API keys and copy:
pk_test_ or pk_live_)sk_test_ or sk_live_)Go to Stripe Dashboard → Developers → Webhooks → Add endpoint:
https://your-domain.com/api/billing/webhook
stripe listen --forward-to localhost:4290/api/billing/webhookcheckout.session.completedinvoice.paidinvoice.payment_failedcustomer.subscription.updatedcustomer.subscription.deletedcharge.refundedcharge.dispute.createdcharge.dispute.closedAfter creating the endpoint, copy the Signing secret (starts with whsec_).
Add these to your .env file:
STRIPE_SECRET_KEY=sk_test_...
STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
Once the backend is running with Stripe configured:
Stripe Products and Prices are created automatically when customers check out — you don't need to configure anything in the Stripe Dashboard beyond the API keys and webhook.
When you're ready for production:
Config files live in backend/config/:
dev.example.yaml / prod.example.yaml — committed templatesdev.yaml / prod.yaml — your actual configs (gitignored)Set LASTSAAS_ENV=dev or LASTSAAS_ENV=prod to select which config to load. Defaults to dev.
Secrets are referenced as ${ENV_VAR} in YAML and expanded from environment variables at load time. Default values use ${VAR:default} syntax.
| Variable | Required | Description |
|---|---|---|
DATABASE_NAME | Yes | Project identity — shared name = shared user base |
MONGODB_URI | Yes | MongoDB connection string |
JWT_ACCESS_SECRET | Yes | Secret for signing access tokens |
JWT_REFRESH_SECRET | Yes | Secret for signing refresh tokens |
FRONTEND_URL | Yes | Frontend URL for CORS and email links |
APP_NAME | Yes | Your application name (used in emails, UI) |
STRIPE_SECRET_KEY | No | Stripe secret API key |
STRIPE_PUBLISHABLE_KEY | No | Stripe publishable key (sent to frontend) |
STRIPE_WEBHOOK_SECRET | No | Stripe webhook signing secret |
GOOGLE_CLIENT_ID | No | Google OAuth client ID |
GOOGLE_CLIENT_SECRET | No | Google OAuth secret |
GOOGLE_REDIRECT_URL | No | Google OAuth redirect URL |
RESEND_API_KEY | No | Resend email service API key |
FROM_EMAIL | No | Sender email address (default: noreply@yourdomain.com) |
FROM_NAME | No | Sender name (default: LastSaaS) |
lastsaas/
backend/
cmd/
server/main.go Entry point (HTTP server, route wiring)
lastsaas/main.go CLI administration tool + MCP server
config/ YAML config files
internal/
api/handlers/ HTTP handlers (auth, admin, tenant, billing, branding, webhooks, etc.)
apicounter/ API call counters for integration health
auth/ JWT, password hashing, Google/GitHub/Microsoft OAuth, TOTP MFA
config/ Config loader with env variable expansion
configstore/ Runtime configuration (DB-backed, cached)
db/ MongoDB connection, collections, indexes
email/ Resend email service with templates
events/ Internal event emitter (drives webhook deliveries)
health/ System health monitoring service
middleware/ Auth, tenant, RBAC, rate limiting, metrics, security, billing enforcement
models/ All data models
planstore/ Plan seeding
stripe/ Stripe service (Checkout, Billing Portal, Customers, Prices, Subscriptions)
syslog/ System logging service with injection detection
telemetry/ Telemetry event collection, Go SDK, and PM analytics queries
version/ Version management and auto-migration
frontend/
src/
api/client.ts Axios API client with token refresh
components/ Layout, AdminLayout, BrandingThemeInjector, shared components
contexts/ Auth, Tenant, and Branding React contexts
pages/
admin/ Admin interface (dashboard, users, tenants, plans, billing, branding, etc.)
admin/health/ Health monitoring components and charts
app/ Customer-facing pages (dashboard, billing, team, settings, activity)
app/settings/ User settings tabs (profile, security, MFA, sessions, billing)
auth/ Login, signup, MFA challenge, magic link, verification, password reset
public/ Landing page and custom pages
types/index.ts TypeScript type definitions
scripts/
setup.sh Interactive setup script
Dockerfile Multi-stage production build
fly.toml Fly.io deployment config
VERSION Current version number
LastSaaS includes built-in, self-hosted API documentation:
GET /api/docs — expandable endpoint cards with request/response examplesGET /api/docs/markdown — for embedding in external documentationThe documentation is generated from code and always matches the running version. It covers all endpoints, parameters, request/response formats, and all 19 webhook event types with payload descriptions.
The MCP server lets AI assistants query your admin data in natural language. It proxies read-only requests to the LastSaaS admin API using an API key.
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"lastsaas": {
"command": "/path/to/lastsaas",
"args": ["mcp"],
"env": {
"LASTSAAS_URL": "https://your-app.fly.dev",
"LASTSAAS_API_KEY": "lsk_your_api_key_here"
}
}
}
}
Add to your project's .mcp.json:
{
"mcpServers": {
"lastsaas": {
"command": "/path/to/lastsaas",
"args": ["mcp"],
"env": {
"LASTSAAS_URL": "https://your-app.fly.dev",
"LASTSAAS_API_KEY": "lsk_your_api_key_here"
}
}
}
}
cd backend
go build -o lastsaas ./cmd/lastsaas
| Variable | Required | Description |
|---|---|---|
LASTSAAS_URL | Yes | Base URL of the LastSaaS instance (e.g. http://localhost:4290 or https://your-app.fly.dev) |
LASTSAAS_API_KEY | Yes | Root-tenant API key with admin authority (starts with lsk_) |
| Tool | Description |
|---|---|
get_about | Software version and environment |
dashboard_stats | User/tenant counts and health overview |
list_tenants | Paginated tenant list with search and filters |
get_tenant | Detailed tenant with plan, billing, and members |
list_users | Paginated user list with search and filters |
get_user | Detailed user with auth methods and memberships |
list_transactions | Financial transactions with search and filters |
get_financial_metrics | Revenue, ARR, DAU, MAU time-series |
search_logs | Full-text log search with severity/category/date filters |
get_log_severity_counts | Log counts by severity level |
get_system_health | Current CPU, memory, disk, HTTP stats |
get_health_metrics | Time-series health data (per-node or aggregate) |
list_nodes | Server nodes with status and version |
get_integrations | Third-party integration health |
list_config | All runtime configuration variables |
get_config | Single config variable details |
list_plans | Subscription plans with pricing and entitlements |
get_plan | Detailed plan info |
list_entitlement_keys | Entitlement key catalog |
list_credit_bundles | Credit bundle pricing |
list_announcements | Published and draft announcements |
list_promotions | Stripe promotion codes and coupons |
list_api_keys | API key inventory (previews only) |
list_root_members | Admin team and pending invitations |
list_webhooks | Outbound webhook configurations |
list_webhook_event_types | Available webhook event types |
get_webhook | Webhook detail with delivery history |
These examples show how the MCP tools work in practice. Each example lists the user prompt and the exact tool calls that execute behind the scenes.
Prompt: "How's my SaaS doing today?"
Tool calls:
dashboard_stats — returns a snapshot:
Users: 1,284 (12 new today)
Tenants: 89 (3 new this week)
Health: All systems healthy
Active alerts: 0
Prompt: "Show me our revenue trend for the last 30 days"
Tool calls:
get_financial_metrics — queries time-series data:
{ "range": "30d", "metric": "revenue" }
Returns daily revenue data points (values in cents) for charting, e.g.:
2026-01-27: $1,250.00
2026-01-28: $890.00
...
2026-02-25: $2,100.00
get_financial_metrics — follow up with ARR:
{ "range": "30d", "metric": "arr" }
Prompt: "Look up the Acme Corp tenant and show me their details"
Tool calls:
list_tenants — searches by name:
{ "search": "Acme Corp" }
Returns matching tenants with IDs, plan names, and billing status.get_tenant — fetches full details using the tenant ID:
{ "id": "6789abc..." }
Returns plan info, billing status, credit balances, subscription dates, and a full member list with roles.Prompt: "Were there any critical errors in the last hour?"
Tool calls:
search_logs — filters by severity and time:
{
"severity": "critical",
"fromDate": "2026-02-26T14:00:00Z",
"perPage": "50"
}
Returns log entries with timestamps, categories, messages, and metadata. For example:
[critical] 14:23:05 billing — Stripe webhook signature verification failed
[critical] 14:31:12 security — Log injection pattern detected in user input
get_log_severity_counts — provides overall distribution:
critical: 2, high: 15, medium: 89, low: 342, debug: 1,204
Prompt: "How's the system health? Are all integrations working?"
Tool calls:
get_system_health — returns current metrics:
CPU: 12.3%
Memory: 245 MB / 512 MB (47.8%)
Disk: 1.2 GB / 8 GB (15.0%)
HTTP: 1,234 requests (p95 latency: 45ms)
MongoDB: 12 active connections
get_integrations — checks third-party connectivity:
MongoDB: healthy (3ms response)
Stripe: healthy (120ms response, 89 calls/24h)
Resend: healthy (95ms response, 12 calls/24h)
Google OAuth: healthy
Prompt: "Show me all active API keys and when they were last used"
Tool calls:
list_api_keys — returns inventory (full keys are never exposed):
"Production Automation" (admin) — lsk_...a3f2 — last used: 2 hours ago
"CI/CD Pipeline" (admin) — lsk_...b7e1 — last used: 15 minutes ago
"Customer Integration" (user) — lsk_...c9d4 — last used: 3 days ago
"Old Test Key" (admin) — lsk_...d1e5 — last used: never
Prompt: "What plans do we offer and how many subscribers does each have?"
Tool calls:
list_plans — returns all plans with pricing and subscriber counts:
Starter: $9/mo ($86/yr) — 45 subscribers — 5 seat limit
Pro: $29/mo ($278/yr) — 31 subscribers — 25 seat limit, per-seat pricing
Enterprise: $99/mo ($950/yr) — 8 subscribers — unlimited seats
list_credit_bundles — shows available credit purchases:
Small Pack: 100 credits — $5.00 — active
Medium Pack: 500 credits — $20.00 — active
Large Pack: 2000 credits — $60.00 — active
Prompt: "Are our webhooks delivering successfully? Show me the recent history for the production webhook"
Tool calls:
list_webhooks — shows all configured webhooks:
"Production" — https://api.example.com/webhooks — 12 events — active
"Staging" — https://staging.example.com/hooks — 5 events — active
get_webhook — fetches delivery history for the production webhook:
{ "id": "abc123..." }
Returns recent delivery attempts with status codes, response times, and any failures:
2026-02-26 14:30:01 — subscription.activated — 200 OK (120ms)
2026-02-26 14:15:22 — payment.received — 200 OK (95ms)
2026-02-26 13:45:10 — member.joined — 500 Error (340ms)
Prompt: "Find the user with email alice@example.com and show me their tenant memberships"
Tool calls:
list_users — searches by email:
{ "search": "alice@example.com" }
Returns the matching user with ID, verification status, and last login.get_user — fetches full details:
{ "id": "def456..." }
Returns:
Email: alice@example.com (verified)
Auth: password + Google OAuth
MFA: TOTP enabled
Memberships:
— Acme Corp (owner) — joined 2026-01-15
— Side Project Inc (admin) — joined 2026-02-10
Last login: 2 hours ago
Prompt: "Show me the CPU and memory trends across all nodes for the last 24 hours"
Tool calls:
list_nodes — identifies all server nodes:
node-1 (v1.0.0) — healthy — last seen: 30s ago
node-2 (v1.0.0) — healthy — last seen: 28s ago
get_health_metrics — fetches aggregate time-series data:
{ "range": "24h" }
Returns data points every 60 seconds with CPU %, memory %, disk %, HTTP request counts, and latency percentiles — ready for charting.get_health_metrics — optionally drill into a specific node:
{ "node": "node-1", "range": "24h" }
LastSaaS includes a Dockerfile and Fly.io configuration for production deployment.
# Install flyctl if needed
curl -L https://fly.io/install.sh | sh
# Create the app (first time only)
flyctl apps create your-app-name --org your-org
# Set production secrets
flyctl secrets set \
DATABASE_NAME="your-db-name" \
MONGODB_URI="mongodb+srv://..." \
JWT_ACCESS_SECRET="$(openssl rand -hex 32)" \
JWT_REFRESH_SECRET="$(openssl rand -hex 32)" \
FRONTEND_URL="https://your-app-name.fly.dev" \
APP_NAME="YourApp" \
STRIPE_SECRET_KEY="sk_live_..." \
STRIPE_PUBLISHABLE_KEY="pk_live_..." \
STRIPE_WEBHOOK_SECRET="whsec_..."
# Deploy
flyctl deploy
The Dockerfile builds both the Go backend and React frontend into a single ~14MB Alpine container. The Go binary serves the frontend SPA directly — no nginx or separate web server required.
The Docker image works anywhere containers run. The only external dependency is MongoDB. Set the environment variables listed above and expose port 8080.
LastSaaS was built entirely through conversation with Claude Code — every feature, every handler, every component was described in natural language and implemented by an AI agent. But the real point isn't that it was built this way — it's that it's designed to keep being built this way.
The codebase follows consistent patterns, uses clear naming, and maintains a structure that AI agents navigate fluently. Fork it, point Claude Code at it, and start describing your product. The agent already understands the patterns — authentication, tenancy, billing, middleware, events — and builds on top of them naturally. You're not starting from scratch; you're continuing a conversation.
Here's what's already wired up for you:
backend/internal/models/backend/internal/api/handlers/backend/cmd/server/main.gofrontend/src/pages/middleware.RequireEntitlement(db, "feature_name") and middleware.RequireActiveBilling()telemetry.Track() in Go or POST /telemetry/events from external clients, and they'll automatically appear in the PM dashboardLastSaaS is self-hosted software — you control your database, your hosting, and your data. The MCP server connects to your LastSaaS instance via the HTTP API using read-only tools — no data is transmitted to Metavert LLC or any third party.
For the full privacy policy, see: https://www.metavert.io/lastsaas-privacy-policy
MIT - Copyright 2026 Metavert LLC
LASTSAAS_URL*Base URL of the LastSaaS instance (e.g., https://your-app.fly.dev or http://localhost:4290)
LASTSAAS_API_KEY*secretRoot-tenant API key with admin authority (starts with lsk_). Create in Admin → API Keys.
io.github.shelvick/shopify-subscription-reconciliation
zleventer/google-ads-mcp
csoai-org/meok-stripe-acp-checkout-mcp
io.github.mharnett/google-ads
csoai-org/stripe-billing-mcp
co.pipeboard/google-ads-mcp