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

sfvibe-templates-mcp

v1.1.1

Published

Reusable code templates MCP server for AI coding agents

Readme

sfvibe-templates-mcp

Reusable code templates MCP server for AI coding agents.

npm version License: MIT

Overview

sfvibe-templates-mcp provides production-ready code templates to AI coding agents (Cursor, Claude Code, Windsurf, etc.) via the Model Context Protocol (MCP). Stop generating boilerplate from scratch - get high-quality, tested templates instantly.

Why sfvibe-templates? (vs Documentation Fetchers)

| Aspect | sfvibe-templates | Documentation Fetchers (e.g., Context7) | |--------|----------------|----------------------------------------| | Token Usage | ~500-1,500 tokens per template | ~3,000-15,000+ tokens per doc page | | Response Type | Curated, production-ready code | Raw documentation (needs interpretation) | | Latency | Instant (local templates) | Variable (API + parsing) | | Accuracy | 100% tested, working code | May need adaptation | | Offline | Works offline | Requires internet | | Cost | No API calls for templates | API costs per request |

Token Efficiency Example

Task: "Add Google OAuth to my Next.js app"

Documentation Fetcher approach:
├─ Search query → 200 tokens
├─ Doc page fetch → 8,000+ tokens (NextAuth docs)
├─ LLM interpretation → 2,000 tokens
├─ Code generation → 1,500 tokens
└─ Total: ~12,000+ tokens

sfvibe-templates approach:
├─ Search query → 200 tokens
├─ Template fetch → 800 tokens (exact code needed)
├─ Copy & configure → 0 tokens
└─ Total: ~1,000 tokens

Savings: ~90% fewer tokens = faster & cheaper

Real-World Token Usage (Measured)

| Operation | Tokens | Response Time | |-----------|--------|---------------| | list_templates (all 10) | ~1,101 | 9ms | | list_templates (auth only) | ~345 | 8ms | | search_templates | ~419 | 1ms | | get_template (NextAuth Google) | ~1,121 | 3ms | | get_template (NextAuth Credentials) | ~1,411 | 2ms | | get_template (Stripe Checkout) | ~1,572 | 2ms | | get_template (Prisma Setup) | ~818 | 1ms | | get_template (tRPC Setup) | ~1,262 | 3ms |

Key Metrics:

  • Average template size: ~1,237 tokens
  • Template range: 818 - 1,572 tokens
  • Estimated savings vs doc fetchers: ~88-90%

Features

  • 10x Token Efficient: Pre-curated templates vs raw documentation
  • Semantic Search: Find templates using natural language queries
  • 10+ Templates: Auth, payment, email, database, storage, and more
  • Production Ready: All templates are tested and ready to use
  • Zero Hallucination: Exact code, not LLM-generated approximations
  • Framework Support: Next.js, with more frameworks coming soon
  • MCP Native: Works with any MCP-compatible AI coding tool

Installation

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "sfvibe-templates": {
      "command": "npx",
      "args": ["-y", "sfvibe-templates-mcp"],
      "env": {
        "OPENAI_API_KEY": "sk-..."
      }
    }
  }
}

Claude Code

claude mcp add sfvibe-templates -- npx -y sfvibe-templates-mcp

VS Code (Copilot)

Add to your settings.json:

{
  "mcp.servers": {
    "sfvibe-templates": {
      "command": "npx",
      "args": ["-y", "sfvibe-templates-mcp"]
    }
  }
}

Available Templates

| Category | Template | Description | |----------|----------|-------------| | Auth | NextAuth Credentials | Email/password auth with NextAuth.js v5 | | Auth | NextAuth Google | Google OAuth with NextAuth.js v5 | | Auth | Supabase Auth | Supabase Auth with @supabase/ssr | | Payment | Stripe Checkout | One-time payments with Stripe | | Payment | Stripe Subscription | Subscription billing with Stripe | | Email | Resend | Transactional emails with Resend | | Database | Prisma Setup | Prisma ORM configuration | | Database | Drizzle Setup | Drizzle ORM configuration | | Storage | S3 Upload | AWS S3 file uploads | | API | tRPC Setup | Type-safe API with tRPC |

MCP Tools

search_templates

Search for templates using natural language:

Input: "I need Google authentication for my Next.js app"
Output: List of relevant templates with scores

get_template

Get complete template code and setup instructions:

Input: templateId = "typescript/nextjs/auth/nextauth-google"
Output: Code files, dependencies, env vars, usage guide

list_templates

Browse available templates:

Input: category = "auth" (optional)
Output: List of templates in the category

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | OPENAI_API_KEY | No* | OpenAI API key for semantic search | | GOOGLE_API_KEY | No* | Google Gemini API key for semantic search | | ANTHROPIC_API_KEY | No* | Anthropic Claude API key for semantic search |

*Semantic search requires one of the API keys above. The system checks in order: OpenAI → Gemini → Claude. Without any key, keyword search is used as fallback.

Contributing

We welcome contributions! Help us build the best collection of templates.

Contributor Levels

| Level | Title | Requirements | Privileges | |-------|-------|--------------|------------| | 1 | Newcomer | First PR merged | Name in Contributors list | | 2 | Contributor | 3+ templates | Priority review, badge | | 3 | Regular | 10+ templates | Can review PRs | | 4 | Expert | 25+ templates | Category ownership | | 5 | Maintainer | Invited | Can merge PRs |

See CONTRIBUTING.md for detailed guidelines on adding templates.

CI/CD Release Pipeline

When code is pushed to the main branch, GitHub Actions automatically runs npm release in this order:

  1. pnpm install --frozen-lockfile
  2. typecheck, test, build, validate-templates
  3. Automatically bump patch version with npm version patch --no-git-tag-version
  4. npm publish --access public --provenance
  5. Commit the updated package.json and push a vX.Y.Z tag

Required setup:

  • Connect npm package sfvibe-templates-mcp to this GitHub repository as a Trusted Publisher
  • Allow contents: write permission for GitHub Actions GITHUB_TOKEN (already configured in workflow)

License

MIT - see LICENSE for details.

Links