@ld338/nextjs-mcp-server
About
# @ld338/nextjs-mcp-server A Model Context Protocol (MCP) server for managing Next.js development servers with comprehensive error monitoring. This tool allows you to start, stop, restart, and monitor multiple Next.js dev servers programmatically or via MCP-compatible clients (e.g., Claude, Copilot, or custom tools)…
Details
- License
- MIT license
Explore
- Server Management: Start, stop, restart Next.js development servers in any directory
- Overview: List all running servers with status, uptime, and performance metrics
- Port Management: Automatic port detection and conflict resolution
- Log Monitoring: Real-time logs and error tracking for all managed servers
- Turbo Support: Full support for Next.js Turbo mode
- Intelligent Error Handling: Detailed error messages for invalid projects, port conflicts, etc.
- Cross-Platform: Works on Windows, macOS, and Linux
---
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
@ld338/nextjs-mcp-serverCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
git clone https://github.com/ld338/nextjs-mcp-server.git
cd nextjs-mcp-server
npm install
bash
npm install @ld338/nextjs-mcp-server
---
Add the following configuration to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
json{
"mcpServers": {
"nextjs-manager": {
"command": "nextjs-mcp-server",
"args": []
}
}
}
json{
"mcp": {
"servers": {
"nextjs-manager": {
"command": "nextjs-mcp-server"
}
}
}
}
---
typescript// Examples for tool usage
const tools = [
{
name: "nextjs_start",
arguments: {
directory: "/path/to/my-app",
port: 3000,
turbo: true,
},
},
{
name: "nextjs_logs",
arguments: {
port: 3000,
lines: 50,
},
},
];
---
npx next --version
MCP connection failed:
- Ensure configuration is correct
- Check paths to executable file
- Restart Claude/Copilot after configuration changes
Logs not available:
- Server must have been started via this tool
- Check file permissions in project directory
---
nextjs_start
Start a Next.js dev server
nextjs_stop
Stop a running server
nextjs_restart
Restart a server
nextjs_list
List all running servers
nextjs_status
Check status and port conflicts
nextjs_logs
Get recent logs from a server
| Tool | Description | Parameters |
| ---------------- | ------------------------------- | ------------------------------ |
| nextjs_start | Start a Next.js dev server | directory, port?, turbo? |
| nextjs_stop | Stop a running server | port or pid |
| nextjs_restart | Restart a server | port or directory |
| nextjs_list | List all running servers | - |
| nextjs_status | Check status and port conflicts | port? |
| nextjs_logs | Get recent logs from a server | port, lines? |
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"@ld338/nextjs-mcp-server": {
"nextjs-mcp-server": {
"command": "npx",
"args": [
"next",
"--version"
]
}
}
}
}
McpServers
{
"nextjs-mcp-server": {
"command": "npx",
"args": [
"next",
"--version"
]
}
}
A Model Context Protocol (MCP) server for managing Next.js development servers with comprehensive error monitoring. This tool allows you to start, stop, restart, and monitor multiple Next.js dev servers programmatically or via MCP-compatible clients (e.g., Claude, Copilot, or custom tools).
---
🚀 Features
- Server Management: Start, stop, restart Next.js development servers in any directory
- Overview: List all running servers with status, uptime, and performance metrics
- Port Management: Automatic port detection and conflict resolution
- Log Monitoring: Real-time logs and error tracking for all managed servers
- Turbo Support: Full support for Next.js Turbo mode
- Intelligent Error Handling: Detailed error messages for invalid projects, port conflicts, etc.
- Cross-Platform: Works on Windows, macOS, and Linux
---
📦 Installation
Global Installation (Recommended)
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



