next.js api scanner.com
next.js api scanner.com logo

Next.js API Scanner

Scans Next.js project directories to extract API route information, validation schemas, and type definitions for automat...

Created byApr 22, 2025

Next.js MCP Server

Demo

Router analysis demo

Features

  • get-routers-infoThe Router Analyzer scans your Next.js app directory structure and extracts information about all API routes, including:

Installation

Or if you're using pnpm:

Usage

Command Line

You can run the mcp server directly:

Docker

For cursor usage, define a mcp.json under ~/.cursor or [projectDir]/.cursor
The url here could vary based on your .env settings within the project.

Output

The tool generates detailed information about each route:

Development

To run tests:
To run the mcp server locally:
To run it from node_modules after npm i:
To run the playground:

How It Works

The tool:
  1. Scans your Next.js app directory structure for route files
  1. Analyzes each route file to extract HTTP methods, paths, parameters, etc.
  1. Extracts documentation from comments
  1. Returns a structured representation of all your API routes

Restrictions

  1. Due to the nature of accessing filesystem directory by path, it will not work if hosted over network
  1. Only supports Next.js App router projects

License

MIT

Next.js MCP Server

Demo

Router analysis demo

Features

  • get-routers-infoThe Router Analyzer scans your Next.js app directory structure and extracts information about all API routes, including:

Installation

Or if you're using pnpm:

Usage

Command Line

You can run the mcp server directly:

Docker

For cursor usage, define a mcp.json under ~/.cursor or [projectDir]/.cursor
The url here could vary based on your .env settings within the project.

Output

The tool generates detailed information about each route:

Development

To run tests:
To run the mcp server locally:
To run it from node_modules after npm i:
To run the playground:

How It Works

The tool:
  1. Scans your Next.js app directory structure for route files
  1. Analyzes each route file to extract HTTP methods, paths, parameters, etc.
  1. Extracts documentation from comments
  1. Returns a structured representation of all your API routes

Restrictions

  1. Due to the nature of accessing filesystem directory by path, it will not work if hosted over network
  1. Only supports Next.js App router projects

License

MIT