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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@chukaofili/next-mcp

v1.2.0

Published

MCP server for scaffolding Next.js applications with Docker support

Readme

@chukaofili/next-mcp

A Model Context Protocol (MCP) server for scaffolding production-ready Next.js applications with Docker support, authentication, database integration, and more.

npm version License: MIT

Features

  • Automated Next.js Setup: Generate complete Next.js projects with TypeScript, React Compiler, and modern tooling
  • Database Integration: Support for PostgreSQL, MySQL, MongoDB, and SQLite with Prisma, Drizzle, or Mongoose
  • Authentication: Pre-configured better-auth integration with user management
  • UI Components: Automatic shadcn/ui setup with all components
  • State Management: Optional Zustand or Redux integration
  • Testing: Built-in support for Vitest, Jest, or Playwright
  • Docker Support: Production-ready Dockerfile and docker-compose.yml generation

Installation

Prerequisites

  • Node.js >= 24
  • pnpm >= 10 (or npm/yarn/bun)

Claude CLI

Run the following command to add next-mcp as an MCP server:

claude mcp add --transport stdio --scope user next-mcp -- npx @chukaofili/next-mcp@latest

Google Gemini CLI

Run the following command to add next-mcp as an MCP server:

gemini mcp add --transport stdio --scope user next-mcp npx @chukaofili/next-mcp@latest

Cursor IDE

Add to your Cursor configuration file (~/.cursor/mcp.json):

{
  "mcpServers": {
    "next-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": ["@chukaofili/next-mcp@latest"]
    }
  }
}

Available Tools

scaffold_project

Create a complete Next.js project with your specified configuration.

Key Configuration Options:

  • typescript (default: true): Enable TypeScript
  • database: none, postgres, mysql, mongodb, sqlite
  • orm: none, prisma, drizzle, mongoose
  • auth: none, better-auth
  • uiLibrary: none, shadcn
  • stateManagement: none, zustand, redux
  • testing: none, jest, vitest, playwright
  • packageManager: npm, pnpm, yarn, bun

Example:

{
  "config": {
    "name": "my-awesome-app",
    "architecture": {
      "typescript": true,
      "database": "postgres",
      "orm": "prisma",
      "auth": "better-auth",
      "uiLibrary": "shadcn",
      "stateManagement": "zustand",
      "testing": "vitest"
    }
  },
  "targetPath": "/path/to/projects"
}

Other Tools

  • generate_dockerfile: Generate production-ready Docker configuration
  • setup_shadcn: Initialize shadcn/ui with all components
  • generate_base_components: Generate essential React components and layouts
  • setup_database: Configure database connection and migrations
  • setup_authentication: Configure better-auth with login/signup pages
  • validate_project: Run comprehensive validation checks
  • generate_readme: Generate comprehensive project documentation

Example Workflow

  1. Create the project:

    "Use next-mcp to scaffold a new Next.js project called 'my-app' with PostgreSQL, Prisma, and better-auth"
  2. Add Docker support:

    "Generate Dockerfile and docker-compose.yml for the project"
  3. Set up UI components:

    "Initialize shadcn/ui and generate base components"

Development

Build and Test

# Build
pnpm build

# Run tests
pnpm test

# Run with MCP Inspector
pnpm inspector

# Lint and format
pnpm lint
pnpm format

Project Structure

next-mcp/
├── src/
│   ├── index.ts              # Main MCP server
│   └── templates/            # Project templates
│       ├── auth/
│       ├── database/
│       └── docker/
├── tests/
│   ├── unit/
│   └── integration/
└── dist/                     # Compiled output

Environment Variables

After scaffolding, configure these in your project's .env:

# Database
DATABASE_URL="postgresql://user:password@localhost:5432/dbname"

# Authentication
BETTER_AUTH_SECRET="your-secret-key-here"
BETTER_AUTH_URL="http://localhost:3000"

# Application
NEXT_PUBLIC_APP_URL="http://localhost:3000"

Troubleshooting

Logs

All logs are stored in ~/.next-mcp/:

# View production logs
tail -f ~/.next-mcp/next-mcp.log

# View test logs
tail -f ~/.next-mcp/next-mcp-test.log

MCP Connection Issues

  1. Check your Claude Desktop configuration syntax
  2. Verify the project is built (pnpm build if running locally)
  3. Ensure Node.js >= 24 is installed
  4. Check logs in ~/.next-mcp/next-mcp.log

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Write tests for new features
  4. Ensure all tests pass
  5. Submit a Pull Request

Links


Made with ❤️ for the Next.js community