Supports containerized deployment of the MCP server through Docker, allowing for isolated and portable execution of the route analysis functionality.
Analyzes Next.js application routes and provides detailed information about API endpoints, including paths, HTTP methods, parameters, status codes, and request/response schemas. Useful for documentation, testing, and API management.
Next.js MCP Server
Demo
Features
get-routers-info
The Router Analyzer scans your Next.js app directory structure and extracts information about all API routes, including:- API paths
- HTTP methods (GET, POST, PUT, DELETE, etc.)
- Request parameters
- Status codes
- Request and response schemas
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:
- Scans your Next.js app directory structure for route files
- Analyzes each route file to extract HTTP methods, paths, parameters, etc.
- Extracts documentation from comments
- Returns a structured representation of all your API routes
Restrictions
- Due to the nature of accessing filesystem directory by path, it will not work if hosted over network
- Only supports Next.js App router projects
License
MIT
This server cannot be installed
A utility tool that analyzes Next.js application routes and provides detailed information about API paths, HTTP methods, parameters, status codes, and request/response schemas.
Related MCP Servers
- -securityFlicense-qualityEnables real-time communication between applications and AI models using the Model Context Protocol, supporting features like custom tools and multiple transport options for Next.js applications.Last updated -25,958
- -securityFlicense-qualityRoutes requests to multiple downstream Model Context Protocol servers and provides a LangGraph.js-based agent with RAG capabilities for development assistance.Last updated -
- AsecurityFlicenseAqualityEnables AI assistants to access Ramp's developer documentation and API schemas through natural language queries. Provides contextual answers about API endpoints, authentication methods, data relationships, and implementation patterns for developers building on Ramp's platform.Last updated -4
- AsecurityFlicenseAqualityEnables efficient extraction of specific data from JSON APIs using JSONPath patterns, reducing token usage by up to 99% compared to fetching entire responses. Supports single and batch operations for both JSON extraction and raw text retrieval from URLs.Last updated -41