UI Hierarchy
Parses Next.js App Router projects to generate a structured UI component hierarchy, enabling AI coding agents to precisely locate and edit components.
This Model Context Protocol (MCP) server provides AI coding agents with a detailed, structured map of a Next.js App Router project's UI component tree. By performing static analysis on the codebase, it returns the hierarchy as both a markdown tree and JSON, complete with exact file and line locations, layout hints, and text content. This functionality empowers AI agents to confidently perform UI edits by grounding image or natural language descriptions in precise code modifications, ensuring they interact with the correct components in the right files instead of guessing.
Key Features
010 GitHub stars
02Parses Next.js App Router projects via static analysis
03Generates structured UI component hierarchy as Markdown tree and JSON
04Maps components to exact file and line locations
05Provides tools to query hierarchy by route, component name, text content, or style
06Supports dynamic Next.js App Router segments (e.g., `[slug]`, `[[...optional]]`)
Use Cases
01Debug and verify AI agent actions on user interface elements by pinpointing component sources.
02Enable AI coding agents to ground UI edits in precise code locations within a Next.js project.
03Provide a structured map of UI components for AI-driven development and refactoring.