@ld338/nextjs-mcp-server

by ld338

243 downloads Not rated yet MIT license
GitHub

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:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name @ld338/nextjs-mcp-server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. 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).

npm version
License: MIT

---

🚀 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

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.