unicorn-mcp
v4.1.0
Published
Ultra-efficient MCP server for the Fast Unicorn boilerplate (T3 Stack). Ships a strict system prompt, a static tech-stack resource, and three deterministic tools (get_feature_recipe, verify_code_compliance, get_stripe_flow_reference) compatible with Curso
Downloads
64
Maintainers
Readme
unicorn-mcp
Ultra-efficient Model Context Protocol (MCP) server for the Fast Unicorn commercial boilerplate (premium starter kit on the T3 Stack: Next.js 15 App Router, tRPC 11, Prisma 7, NextAuth v5, Tailwind v4, next-intl, Stripe, Resend).
Compatible with any MCP host: Cursor, Claude Desktop, VS Code (Continue / Cline / Roo), and custom CLIs. Speaks the stdio transport — no HTTP server, no extra config.
What this MCP does
- Injects a strict system prompt into the IDE's AI the moment it connects. The prompt locks the AI to the boilerplate's conventions (Spanish chat / English code,
~/imports only,~/i18n/routingfor navigation, tRPCuseXxxrouters, services receiving the database explicitly). - Exposes a read-only
tech-stackresource so the AI knows exactly what libraries ship pre-wired (avoids installing duplicates like another toast library whensileois already there). - Ships three deterministic tools the AI can call programmatically.
Surface area (everything the server registers)
| Channel | Name | Purpose |
| --- | --- | --- |
| initialize | instructions | Canonical system prompt sent on every connect. |
| Resource | unicorn-mcp://tech-stack | Pre-installed libraries, conventions, dashboard contract. |
| Resource | unicorn-mcp://system-prompt | Mirror of instructions for hosts that ignore it. |
| Prompt | system_prompt | One-shot prompt template (use as /system_prompt in some hosts). |
| Tool | get_feature_recipe | 6-step recipe to add a new domain (Prisma → service → router → root.ts → i18n → UI). |
| Tool | verify_code_compliance | Static analyzer for @/ imports, next/link, NEXTAUTH_SECRET, etc. |
| Tool | get_stripe_flow_reference | Canonical Stripe billing pipeline (checkout → webhook → DB sync). |
Tool details
get_feature_recipe
Returns the exact step-by-step Markdown recipe to extend the boilerplate with a brand-new business domain.
- Input:
domain(string, e.g."posts","orders","invoices"). - Output: Markdown with the 6 mandatory steps:
- Update
prisma/schema.prisma→ runpnpm db:pushor generate a migration. - Write pure business logic under
src/server/services/<domain>/, receiving the database client explicitly. - Create the tRPC router under
src/server/api/routers/<domain>.tswith theuseXxxprefix. - Register it inside
appRouterinsrc/server/api/root.ts. - Add translation namespaces in all three locale files (
messages/{en,es,zh}/<domain>.json) and register imports insrc/i18n/messages.ts. - Build the localized UI pages under
src/app/[locale]/respecting colocation and using~/i18n/routing.
- Update
verify_code_compliance
Static analysis tool to intercept generated code before writing it to disk.
- Input:
code(the snippet) + optionalfilePath(enables file-specific rules). - Output: Structured JSON with
ok, severity-classified violations,line/column, and a fixsuggestion. - Rules enforced:
@/imports → must be~/.next/link/next/navigation→ must be~/i18n/routinghelpers.emails.tsregistered insidesrc/server/api/root.ts→ blocked (it is a"use server"module, not a tRPC router).process.env.NEXTAUTH_SECRET→ must beAUTH_SECRET(NextAuth v5 pattern).src/features/paths → forbidden.- Stripe payloads without
metadata.userId→ flagged as warning.
get_stripe_flow_reference
Returns the canonical architectural map of the Stripe billing flow so the client AI never hallucinates an alternative invoicing pipeline:
- Client triggers a tRPC mutation (e.g.
api.useStripe.upgradeSubscription). - tRPC router delegates to
services/billing/checkout.ts, which always injectsmetadata.userId. - Stripe Checkout redirects the user to
/[locale]/payment/success. - Stripe POSTs the asynchronous webhook to
/api/stripe/webhook. webhook-sync.tsverifies theSTRIPE_WEBHOOK_SECRETsignature, extractsmetadata.userId, runs idempotency checks, and syncs the active subscription into PostgreSQL.
Install & connect
Published on npm as unicorn-mcp. You do not add it as a dependency of your Next.js app — register it inside your IDE's MCP config and the client runs it with npx.
Cursor / Windows
{
"mcpServers": {
"unicorn-mcp": {
"command": "cmd",
"args": ["/c", "npx", "-y", "unicorn-mcp@latest"]
}
}
}Cursor / macOS / Linux
{
"mcpServers": {
"unicorn-mcp": {
"command": "npx",
"args": ["-y", "unicorn-mcp@latest"]
}
}
}Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"unicorn-mcp": {
"command": "npx",
"args": ["-y", "unicorn-mcp@latest"]
}
}
}VS Code (Continue / Cline / Roo, etc.)
Use the IDE's MCP configuration UI and point it at the same npx -y unicorn-mcp@latest command.
How the system prompt reaches the AI
MCP defines three channels through which a server can deliver behavior guidance:
instructionsfield in the response to theinitializerequest. This is the canonical, host-neutral way. Cursor, Claude Desktop, and Claude Code all forward it as a system message automatically.unicorn-mcp://system-promptresource for hosts that ignoreinstructions. The user (or the host) can read the resource manually.system_promptprompt for hosts that prefer slash-commands (/system_prompt).
unicorn-mcp ships the same text through all three channels so the contract lands no matter the host.
Local development
npm install
npm run dev # tsx watch src/index.ts
npm run build # tsc → dist/
npm start # node dist/index.js (stdio)
npm run typecheck # tsc --noEmitCode layout
src/
├── index.ts # Entry: registers tools, resources, prompts
├── system-prompt.ts # Global behavior contract (sent as `instructions`)
├── lib/
│ └── mcp-response.ts # Helpers for text/json/markdown MCP responses
├── tools/
│ ├── get-feature-recipe.ts # `get_feature_recipe` tool
│ ├── verify-code-compliance.ts # `verify_code_compliance` tool
│ └── get-stripe-flow-reference.ts # `get_stripe_flow_reference` tool
├── resources/
│ └── boilerplate-tech-stack.ts # `unicorn-mcp://tech-stack` + `://system-prompt`
└── prompts/
└── system-prompt.ts # `system_prompt` prompt for slash-command hostsLicense
MIT.
