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

next-supa-mcp

v1.0.2

Published

MCP Server — official AI companion for the next-supa-utils library

Readme

next-supa-mcp

🤖 MCP Server — Official AI Companion for next-supa-utils

An MCP (Model Context Protocol) server that ensures AI assistants always generate code using next-supa-utils — instead of writing raw Supabase boilerplate.


✨ Why?

When AI assistants write Next.js + Supabase code, they tend to:

  • ❌ Use raw @supabase/ssr with verbose cookie-chunking logic
  • ❌ Write manual try/catch in every Server Action
  • ❌ Copy-paste 40+ lines of middleware boilerplate

next-supa-mcp fixes this by giving the AI tools that output code using next-supa-utils — a library that condenses all of that into clean, type-safe one-liners.


🛠️ Available Tools

| Tool | Description | |------|-------------| | get_next_supa_utils_docs | Returns the official cheatsheet with correct imports and API usage | | scaffold_auth_middleware | Generates a middleware.ts using withSupaAuth() with RBAC support | | generate_crud_action | Generates Server Actions wrapped with createAction() | | read_supabase_schema | Reads the user's database.types.ts for accurate code generation |


🚀 Quick Setup

1. Clone & Build

git clone https://github.com/aryaintarann/next-supa-mcp.git
cd next-supa-mcp
npm install
npm run build

2. Configure Your AI Client

Add to your MCP client configuration:

{
  "mcpServers": {
    "next-supa-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/next-supa-mcp/dist/index.js"]
    }
  }
}
{
  "mcpServers": {
    "next-supa-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/next-supa-mcp/dist/index.js"]
    }
  }
}
{
  "servers": {
    "next-supa-mcp": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/next-supa-mcp/dist/index.js"]
    }
  }
}
{
  "mcpServers": {
    "next-supa-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/next-supa-mcp/dist/index.js"]
    }
  }
}

Note: Replace /absolute/path/to/next-supa-mcp with your actual path.


📖 Tool Examples

get_next_supa_utils_docs

Returns a full cheatsheet covering all available imports:

Client Hooks:  useSupaUser, useSupaSession, useSupaUpload, useSupaRealtime, SupaProvider
Server Helpers: withSupaAuth, createAction, routeWrapper

scaffold_auth_middleware

Input:

{
  "routes": [
    { "path": "/dashboard" },
    { "path": "/admin/:path*", "allowedRoles": ["admin"] }
  ],
  "redirectTo": "/login"
}

Output: A complete middleware.ts using withSupaAuth:

import { withSupaAuth } from 'next-supa-utils/server';

export default withSupaAuth({
  routes: [
    { path: '/dashboard' },
    { path: '/admin/:path*', allowedRoles: ['admin'] },
  ],
  redirectTo: '/login',
});

export const config = {
  matcher: ['/((?!_next/static|_next/image|favicon.ico).*)'],
};

generate_crud_action

Input:

{ "tableName": "posts", "operation": "insert" }

Output: A Server Action using createAction:

'use server';
import { createAction } from 'next-supa-utils/server';

export const createPosts = createAction(
  async (supabase, input: CreatePostsInput) => {
    const { data, error } = await supabase
      .from('posts')
      .insert(input)
      .select()
      .single();
    if (error) throw error;
    return data;
  }
);

read_supabase_schema

Reads database.types.ts from the user's project so generated code uses the exact table and column names.


🧱 Tech Stack


📚 Related


📄 License

MIT