Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Nextjs Devtools Mcp Skill

ASecurity

next-devtools-mcp reference — Next.js 16+ runtime diagnosis via MCP (get_errors, get_logs, get_routes, server actions); config and workflows.

6 stars
0 votes
0 copies
0 views
Added 9/20/2026
developmenttypescriptgonextjsdebuggingdocumentation

Works with

climcp

Security Analysis

A100/100

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add darellchua2/opencode-config-template --skill nextjs-devtools-mcp-skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nextjs Devtools Mcp Skill?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Nextjs Devtools Mcp Skill
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/darellchua2-nextjs-devtools-mcp-skill/badge)](https://www.skillsdirectory.com/skills/darellchua2-nextjs-devtools-mcp-skill)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: nextjs-devtools-mcp-skill
description: >-
  next-devtools-mcp reference — Next.js 16+ runtime diagnosis via MCP
  (get_errors, get_logs, get_routes, server actions); config and workflows.
license: Apache-2.0
compatibility: opencode
metadata:
  pattern: mcp-diagnosis
category: Framework-Specific
---

## What this skill does

- Documents the `next-devtools-mcp` server and its 6 tools
- Provides `opencode.json` configuration (the `mcp.servers` entry and `permissions` rule)
- Prescribes workflows for error diagnosis, route analysis, page debugging, server action debugging, and project audits
- Covers common MCP connection issues and fallback strategies

**Reference:** https://nextjs.org/docs/app/guides/mcp

## Requirements & Honesty Note

| Requirement                                             | Status                                     |
| ------------------------------------------------------- | ------------------------------------------ |
| Next.js 16+ (for built-in `/_next/mcp` endpoint)          | Project dependency                         |
| Running Next.js dev server (`npm run dev`)                | Required for live features                 |
| `next-devtools` server in `opencode.json` `mcp.servers` block     | Required for MCP tool access               |
| `permissions` rule `{ "action": "next-devtools*", "resource": "*", "effect": "allow" }` | **No rule by default** — user must opt in |

If any requirement is unmet, MCP tools will return connection errors. Fall back to file-based inspection (`glob`/`grep`/`read`) and `webfetch` to Next.js docs.

## opencode.json Configuration

Add the `next-devtools` MCP server to your project `opencode.json`:

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "servers": {
      "next-devtools": {
        "type": "local",
        "command": ["npx", "-y", "next-devtools-mcp@latest"],
        "disabled": false
      }
    }
  },
  "permissions": [
    { "action": "next-devtools*", "resource": "*", "effect": "allow" }
  ]
}
```

**Notes:**
- OpenCode uses `opencode.json` with the `mcp` key, NOT `.mcp.json` with `mcpServers`.
- Command is array format `["npx", "-y", "pkg"]`, not separate `command` + `args` fields.
- Both `mcp.servers.next-devtools.disabled: false` AND the `permissions` rule `{ "action": "next-devtools*", "resource": "*", "effect": "allow" }` are required.
- MCP endpoint URL (when dev server runs): `http://localhost:3000/_next/mcp`

## Available MCP Tools

| Tool                    | Description                             | Use Case                                |
| ----------------------- | --------------------------------------- | --------------------------------------- |
| `get_errors`              | Build, runtime, and type errors         | Debug compilation and runtime issues    |
| `get_logs`                | Path to dev log file (browser + server) | Access browser console + server output  |
| `get_page_metadata`       | Metadata about specific pages           | Understand page structure and rendering |
| `get_project_metadata`    | Project structure and configuration     | Analyze project setup                   |
| `get_routes`              | All routes grouped by router type       | Map application routing                 |
| `get_server_action_by_id` | Look up Server Actions by ID            | Debug Server Action references          |

## Tool Reference

### get_errors
Retrieves all current errors from the dev server. Use for: build failures, TypeScript errors, runtime errors, hydration mismatches.

### get_logs
Returns the path to the development log file. Use for: browser console errors, SSR/SSG issues, request/response tracing.

### get_page_metadata
Returns metadata about a specific page — route info, component structure, rendering method. Use for: component hierarchy checks, Server vs Client Component verification, route parameter analysis.

### get_project_metadata
Returns overall project structure, Next.js configuration, and dev server URL. Use for: verify configuration, check Next.js version, confirm dev server status.

### get_routes
Returns all routes grouped by router type (App Router, Pages Router). Use for: route mapping, conflict identification, migration planning.

### get_server_action_by_id
Looks up a Server Action by ID to find source file and function name. Use for: debug Server Action references, trace form submissions, verify 'use server' configuration.

## Workflows

### 1. Initial Project Assessment
1. `get_project_metadata` → understand structure
2. `get_routes` → map all routes
3. `get_errors` → identify existing issues

### 2. Error Diagnosis
1. `get_errors` → retrieve current errors
2. Analyze error types (build/runtime/type)
3. Provide specific guidance
4. Suggest fixes following Next.js best practices

### 3. Route Analysis
1. `get_routes` → all routes
2. Identify patterns and conventions
3. Check App Router vs Pages Router usage
4. Suggest route organization improvements

### 4. Page Debugging
1. `get_page_metadata` for specific pages
2. Analyze component structure and rendering
3. Identify Server vs Client Component usage
4. Suggest optimizations

### 5. Server Action Debugging
1. Get Server Action ID from error or form
2. `get_server_action_by_id` → locate implementation
3. Review code for issues
4. Suggest fixes following best practices

## Common Issues & Solutions

### MCP Server Not Connecting
Symptoms: Tools return connection errors.
Solutions: (1) Ensure dev server running (`npm run dev`); (2) Verify `mcp.servers.next-devtools.disabled: false`; (3) Verify the `permissions` rule `{ "action": "next-devtools*", "resource": "*", "effect": "allow" }`; (4) Confirm Next.js 16+; (5) Confirm `next-devtools-mcp@latest`.

### No Errors Returned
Symptoms: `get_errors` returns empty but errors exist.
Solutions: (1) Ensure errors are in running dev server; (2) Check browser console; (3) Use `get_logs` directly.

### Routes Not Showing
Symptoms: `get_routes` returns incomplete list.
Solutions: (1) Verify pages in correct directories; (2) Check for syntax errors; (3) Verify App Router structure.

### Server Action Not Found
Symptoms: `get_server_action_by_id` returns no results.
Solutions: (1) Verify 'use server' directive; (2) Ensure properly exported; (3) Check for typos in action ID.

## Best Practices Guidance

### Server vs Client Components
Use `get_page_metadata` to verify: `'use client'` on interactive components, Server Components for data fetching, proper boundary placement.

### Route Organization
Use `get_routes` to ensure: logical grouping, proper dynamic segments, consistent naming.

### Error Handling
Use `get_errors` to: identify patterns, fix root causes, implement error boundaries.

### Server Actions
Use `get_server_action_by_id` to: verify `'use server'`, check form integration, ensure error handling.

## Documentation References

- Next.js MCP Guide: https://nextjs.org/docs/app/guides/mcp
- Next.js App Router: https://nextjs.org/docs/app
- Server Components: https://nextjs.org/docs/app/building-your-application/rendering/server-components
- Server Actions: https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations
- Routing: https://nextjs.org/docs/app/building-your-application/routing

## Fallback Strategy (No MCP)

If `next-devtools-mcp` is not configured or the dev server is not running, this skill degrades gracefully to file-based inspection:
- **Routes:** Glob `app/**/page.{tsx,ts,jsx,js}` and `app/**/route.{tsx,ts,jsx,js}` + `pages/**/*.{tsx,ts,jsx,js}` for Pages Router
- **Page metadata:** Read page files directly to detect `'use client'` directives and `export const metadata`
- **Server Actions:** Grep for `'use server'` to locate action files
- **Errors:** Cannot replicate — instruct user to share error output or enable MCP

Attribution

darellchua2darellchua2
View sourceMore from darellchua2 →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

281612 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2132 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

9881 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →