Nextscan

io.github.berkayderin由 GitHub 账号 berkayderin 发布v1.0.1更新于 Oct 24, 2026

MCP server that scans Next.js projects and returns a compact summary

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

本地 MCP 服务器,扫描 Next.js 项目并返回一份精简摘要,涵盖路由、API 端点、ORM 结构与安全问题。

可以做什么
  • 扫描 Next.js 项目根目录并返回一份精简总览
  • 查看路由树,含页面、布局、API、动态、静态、客户端与服务端标记
  • 列出 API 端点及其鉴权与校验状态
  • 梳理 Prisma 或 Drizzle 的模型与关系,包括孤立模型
  • 检查硬编码密钥、环境变量泄漏、缺少鉴权与限流等安全问题
  • 通过 focus 参数将扫描限定为 routes、api、schema 或 security
适用场景
适合在助手需要快速了解陌生的 Next.js 代码库时使用,也适合在不逐个翻阅文件的情况下,对路由、API 端点与数据库结构做一次快速的结构与安全检查。
运行要求
以本地 stdio 进程运行,从 npm 包安装;需要 Node.js 18+ 和兼容 MCP 的客户端。scan 工具需要 Next.js 项目根目录的绝对路径。未声明任何认证、环境变量或请求头。
安装前请注意
扫描会读取本机项目文件,其中可能包含硬编码密钥;结果会返回给助手及其模型提供方。该工具为只读分析,但仍需留意客户端记录或转发了哪些内容。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Nextscan,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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

bash
# Clone and buildcd nextscannpm installnpm run build
# Add to Claude Codeclaude 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

bash
npm installnpm run buildnpm testnpm run test:coverage

Author

Berkay Derin — github.com/berkayderin

License

MIT

来源:README.md,提交 04953fb

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分