AgentShip is a complete Next.js boilerplate with auth, billing, streaming Claude AI, Postgres, and an MCP server — all wired up and tested. Clone, configure, deploy.
Buy AgentShip — £99One-time payment · lifetime updates · private GitHub repo access
No placeholder modules. Every item below is production-quality TypeScript you can clone and run.
GitHub + Google OAuth with DrizzleAdapter. Session middleware, sign-in page, server-action sign-in flow. Zero boilerplate in routes.
Checkout session, billing portal, and a webhook handler for subscription created/updated/deleted. Plan IDs map to per-user AI quotas automatically.
Server-sent events route on the Claude API with adaptive thinking. Typed Zod tool handlers. Add a capability in ~10 lines.
Track every user's token spend, weight input vs output cost, gate by plan quota. The unglamorous code that protects your margin.
Type-safe schema for users, accounts, sessions, subscriptions, and usage. One command to migrate. No ORMs you'll regret.
Your SaaS exposed as an MCP server at /api/mcp. AI agents connect to it directly. Add tools in one file.
Plan badge, usage meter, billing portal link, and a streaming chat interface — clean Tailwind v4 components ready to customise.
Welcome and upgrade confirmation emails with HTML templates. Triggered automatically from the auth and webhook flows.
This is real code from the repo — not pseudocode.
export const searchOrders = betaZodTool({ name: "search_orders", description: "Look up a customer's orders. Call when the user asks about order status.", inputSchema: z.object({ email: z.string().email() }), run: async ({ email }) => db.orders.findByEmail(email), }); // Done. The chat route picks it up, Claude calls it when relevant, // results stream back to the user. Usage is metered automatically.
Every AgentShip app ships with a JSON-RPC endpoint at /api/mcp. AI agents — Claude, Cursor, anything MCP-compatible — can call your SaaS actions directly. Add tools in src/lib/mcp/server.ts.
// src/lib/mcp/server.ts — add a tool, it's live immediately const tools: MCPTool[] = [ { name: "get_user_data", description: "Retrieve data for the authenticated user.", inputSchema: { type: "object", properties: { field: { type: "string" } } }, handler: async ({ field }, userId) => db.findForUser(userId, field), }, ];
one-time payment
Secure checkout by Stripe · GitHub repo invite sent within minutes
At checkout you enter your GitHub username. You'll be invited as a collaborator to the private AgentShip repository — clone it, build on it, and pull updates as they land. Invites are sent within 24 hours, usually much faster.
One license per developer. Build and sell unlimited commercial products with it. The only thing you can't do is resell or redistribute the boilerplate itself.
Node.js 20+, a Neon Postgres database (free tier works), a Stripe account, an Anthropic API key, and a GitHub or Google OAuth app. The setup guide walks through each in under 15 minutes.
The Claude API (Anthropic), using current model IDs and the official TypeScript SDK — adaptive thinking, streaming, tool runner, prompt caching. The architecture isolates the provider in one module if you want to swap it.
The Model Context Protocol lets AI agents (Claude, Cursor, etc.) call your app's functions directly. AgentShip ships your app as an MCP server out of the box — AI tools can query your database, trigger workflows, or return live data as part of a conversation.
If the repo isn't what you expected, reply to your receipt within 14 days for a full refund. No forms, no fuss.
There are other boilerplates. Here's the honest difference.
Great general SaaS starters. Neither ships with agentic AI, MCP, or usage metering out of the box — those are the modules you'd build yourself. AgentShip starts where they end.
Built around the Claude API: adaptive thinking, tool runner, prompt caching. The architecture also works with OpenAI if you swap the provider module, but it's designed to get the most from Claude.