Get the FREE Ultimate OpenClaw Setup Guide →

nextjs-devtools

Scanned
npx machina-cli add skill aiskillstore/marketplace/nextjs-devtools --openclaw
Files (1)
SKILL.md
2.2 KB

Next.js DevTools

Inspect and debug Next.js applications via MCP server.

Quick Start

# Start server (spawns on-demand)
bash scripts/start-server.sh

# Or use directly via mcp-client
python3 scripts/mcp-client.py call \
  -s "npx next-devtools-mcp@latest" \
  -t list-routes

Available Tools

ToolDescription
list-routesGet all app routes
get-route-infoDetails for specific route
list-componentsReact components in app
get-build-infoBuild configuration
get-confignext.config.js settings

Workflow Patterns

Pattern 1: Route Inspection

# List all routes
python3 scripts/mcp-client.py call \
  -s "npx next-devtools-mcp@latest" \
  -t list-routes

# Get specific route details
python3 scripts/mcp-client.py call \
  -s "npx next-devtools-mcp@latest" \
  -t get-route-info \
  -p '{"route": "/api/auth"}'

Pattern 2: Debug Build Issues

# Check build config
python3 scripts/mcp-client.py call \
  -s "npx next-devtools-mcp@latest" \
  -t get-build-info

# Check next.config.js
python3 scripts/mcp-client.py call \
  -s "npx next-devtools-mcp@latest" \
  -t get-config

Pattern 3: Component Discovery

python3 scripts/mcp-client.py call \
  -s "npx next-devtools-mcp@latest" \
  -t list-components

Scripts

start-server.sh

For persistent server (multiple calls):

bash scripts/start-server.sh
# Server runs on default port
# Use mcp-client.py with -u flag instead of -s

On-Demand (Recommended)

For single calls, use -s flag which spawns server per-call:

python3 scripts/mcp-client.py call \
  -s "npx next-devtools-mcp@latest" \
  -t <tool-name>

Troubleshooting

IssueSolution
Server not startingCheck npx next-devtools-mcp@latest works manually
No routes foundEnsure running from Next.js project root
Build info emptyRun next build first

Source

git clone https://github.com/aiskillstore/marketplace/blob/main/skills/92bilal26/nextjs-devtools/SKILL.mdView on GitHub

Overview

This skill provides Next.js development tooling through an MCP server to inspect routes, components, build configuration, and next.config.js settings. It helps you debug routing and understand app structure directly from the server.

How This Skill Works

An MCP server is run that exposes tools such as list-routes, get-route-info, list-components, get-build-info, and get-config. You can start it on demand with a Python mcp-client call to npx next-devtools-mcp@latest, or run a persistent server using start-server.sh.

When to Use It

  • Inspect all app routes to map navigation and page structure
  • Retrieve details for a specific route with get-route-info
  • Discover React components used in the Next.js app
  • Diagnose build issues by checking get-build-info and running next build if needed
  • Review next.config.js settings to verify deployment behavior

Quick Start

  1. Step 1: Start the MCP server with bash scripts/start-server.sh or run on-demand with -s
  2. Step 2: Call an MCP tool, e.g., python3 scripts/mcp-client.py call -s npx next-devtools-mcp@latest -t list-routes
  3. Step 3: Retrieve details with get-route-info or other tools as needed

Best Practices

  • Run from the Next.js project root to ensure accurate routing data
  • Choose on demand calls for single checks or start-server.sh for reuse
  • Cross-reference list-routes with list-components to map structure
  • Use get-build-info before configuring builds or migrations
  • Limit exposure by using get-config and get-route-info only on trusted environments

Example Use Cases

  • List all routes in a Next.js app to plan navigation
  • Get details for a route like /api/auth to inspect handlers
  • List components to audit component usage and reusability
  • Check build info after a change to confirm build configuration
  • Verify next.config.js settings such as rewrites and image domains

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers