npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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

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

  1. 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/routing for navigation, tRPC useXxx routers, services receiving the database explicitly).
  2. Exposes a read-only tech-stack resource so the AI knows exactly what libraries ship pre-wired (avoids installing duplicates like another toast library when sileo is already there).
  3. 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:
    1. Update prisma/schema.prisma → run pnpm db:push or generate a migration.
    2. Write pure business logic under src/server/services/<domain>/, receiving the database client explicitly.
    3. Create the tRPC router under src/server/api/routers/<domain>.ts with the useXxx prefix.
    4. Register it inside appRouter in src/server/api/root.ts.
    5. Add translation namespaces in all three locale files (messages/{en,es,zh}/<domain>.json) and register imports in src/i18n/messages.ts.
    6. Build the localized UI pages under src/app/[locale]/ respecting colocation and using ~/i18n/routing.

verify_code_compliance

Static analysis tool to intercept generated code before writing it to disk.

  • Input: code (the snippet) + optional filePath (enables file-specific rules).
  • Output: Structured JSON with ok, severity-classified violations, line/column, and a fix suggestion.
  • Rules enforced:
    • @/ imports → must be ~/.
    • next/link / next/navigation → must be ~/i18n/routing helpers.
    • emails.ts registered inside src/server/api/root.ts → blocked (it is a "use server" module, not a tRPC router).
    • process.env.NEXTAUTH_SECRET → must be AUTH_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:

  1. Client triggers a tRPC mutation (e.g. api.useStripe.upgradeSubscription).
  2. tRPC router delegates to services/billing/checkout.ts, which always injects metadata.userId.
  3. Stripe Checkout redirects the user to /[locale]/payment/success.
  4. Stripe POSTs the asynchronous webhook to /api/stripe/webhook.
  5. webhook-sync.ts verifies the STRIPE_WEBHOOK_SECRET signature, extracts metadata.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:

  1. instructions field in the response to the initialize request. This is the canonical, host-neutral way. Cursor, Claude Desktop, and Claude Code all forward it as a system message automatically.
  2. unicorn-mcp://system-prompt resource for hosts that ignore instructions. The user (or the host) can read the resource manually.
  3. system_prompt prompt 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 --noEmit

Code 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 hosts

License

MIT.