mcpField
N
Nextscan

Nextscan

Local
github.com/berkayderinDeveloper Tools1Updated 35w ago

About Nextscan

Nextscan scans Next.js projects and gives developers a compact overview of routes, API endpoints, database schema, and security issues. Its single scan tool can focus on routes, APIs, schema, or security.

Key features

  1. 01Map application routes
  2. 02Inspect API authentication and validation
  3. 03Map Prisma and Drizzle relations
  4. 04Detect hardcoded secrets and environment leaks
  5. 05Focus scans by analysis area

Use cases

  1. 01Get an overview of an unfamiliar Next.js project
  2. 02Check API endpoint coverage and protections
  3. 03Review a project's schema or security

MCP support

Nextscan is an MCP server that exposes a scan tool to MCP-compatible clients. The tool analyzes a local Next.js project at a supplied path.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"nextscan": {
"command": "npx",
"args": [
"-y",
"@berkayderin/nextscan"
]
}
}
}
Run commandnpx -y @berkayderin/nextscan

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@berkayderin/nextscan1.0.1

Tools

1

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
pathstringYesAbsolute path to the Next.js project root
focusenumNoFocus on a specific area (omit for full scan)routes | api | schema | security

Details

From the project README

nextscan

MCP server that scans Next.js projects and returns a compact summary. One tool call → full project overview.

What it does

Without nextscanWith nextscan
Manual file-by-file explorationSingle scan call
Multiple tool calls to understand routesCompact route tree with flags
Missing security issuesHardcoded secrets + env leak detection
Unknown API coverageAuth + validation status per endpoint
Schema guessworkPrisma/Drizzle relation mapping

Quick Install

# Clone and build
cd nextscan
npm install
npm run build

# Add to Claude Code
claude mcp add nextscan -- node /path/to/nextscan/dist/index.js

Tool: scan

ParameterTypeRequiredDescription
pathstringYesAbsolute path to Next.js project root
focusenumNoroutes | api | schema | security

Example Output

nextscan — my-app
────────────────────────────────────────
Root: /Users/dev/my-app
   src/ : yes  app/ : yes  middleware: yes
   ORM  : prisma

Routes
   Pages: 12  Layouts: 3  API: 5
   Dynamic: 4  Static: 8
   Client: 3  Server: 9
   Groups: (marketing), (auth)
   Matchers: /dashboard/:path*, /api/:path*
   ┌─ Pages
   ├─ /
   ├─ /about
   ├─ /dashboard [client]
   ├─ /blog/[slug] [dyn,SSG]
   └─ /settings [client]

API Endpoints
   Total: 5  Unprotected: 1
   ├─ GET,POST /api/users [auth:next-auth | val:zod]
   ├─ GET /api/health [no-auth,no-rate-limit]
   └─ POST /api/webhook [no-auth,no-validation]

Schema
   Models: 5  Relations: 4
   Orphans: AuditLog
   User ─< Post (1:N)
   User ─ Profile (1:1)
   Post >─< Tag (N:N)

Security
   Score: 75/100  Headers: yes  Middleware: yes
   [high] API route /api/health has no auth: [GET]
   [medium] No rate limiting on /api/users

Example Prompts

  • "Scan my Next.js project at /Users/dev/my-app"
  • "Check the security of my Next.js app"
  • "Show me the route structure"
  • "Analyze the database schema"

Architecture

src/
├── index.ts              # MCP server entry point
├── tools/scan.ts         # Orchestrator
├── analyzers/
│   ├── routes.ts         # App router analysis
│   ├── api.ts            # API endpoint analysis
│   ├── schema.ts         # Schema orchestration
│   └── security.ts       # Security scanning
├── parsers/
│   ├── typescript.ts     # ts-morph utilities
│   ├── prisma.ts         # Regex-based Prisma parser
│   └── drizzle.ts        # AST-based Drizzle parser
├── formatters/
│   └── compact.ts        # Unicode tree formatter
└── utils/
    ├── fs.ts             # File system utilities
    └── detect.ts         # Project detection

Requirements

  • Node.js 18+
  • An MCP-compatible client (Claude Code, Claude Desktop, etc.)

Development

npm install
npm run build
npm test
npm run test:coverage

Author

Berkay Derin — github.com/berkayderin

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.