# shadcn/ui Dependency Resolver Alternative MCP for AI Agents MCP

> shadcn/ui Dependency Resolver Alternative MCP for identifying missing React component packages and sub-components directly from your JSX or TSX code snippets.

## Overview
- **Category:** development
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_U9irMWgXv28cwSXxmqiAgD6Vnm7Obd7lVDbcbdVU/mcp
- **Tags:** shadcn, ui, react, jsx, dependencies

## Description

You've seen it happen. Your AI agent writes a perfect piece of React code using a beautiful new UI component, but when you try to run it, everything breaks. The code is fine, but the actual package isn't in your project yet. It's frustratingly easy for an agent to forget that a specific dialog or dropdown needs its own set of sub-components installed in your registry. This MCP fixes that gap by letting your agent check exactly what's missing before you even hit save. You can connect it through the Vinkius catalog and immediately stop chasing broken imports. It turns your coding agent from a blind code generator into a context-aware developer that knows your project's actual state.

## Tools

### extract_dependencies
Scans your JSX to find every required shadcn/ui package and identifies any missing sub-components. It tells you exactly what needs to be installed.

### list_all_registry_components
Provides a full list of all shadcn/ui components that can be resolved. Use this to see what's supported in the registry.

### validate_component_registry_entry
Checks if a specific string is a valid part of the shadcn/ui component tree. It confirms if a sub-component belongs to a base package.

## Prompt Examples

**Prompt:** 
```
Check this JSX for any missing shadcn components: <Dialog><DialogContent>Hello</DialogContent></Dialog>
```

**Response:** 
```
I've analyzed your snippet. You have the `dialog` component structure, but you need to ensure the `dialog` package is installed in your project to support `DialogContent`.
```

**Prompt:** 
```
Is DialogTrigger a valid part of the shadcn/ui registry?
```

**Response:** 
```
Yes, `DialogTrigger` is a recognized sub-component that belongs to the base `dialog` package.
```

**Prompt:** 
```
What components do I need to install for this code: <Button variant='outline'>Click</Button>?
```

**Response:** 
```
| Component | Status |
| :--- | :--- |
| **button** | Required |
```

## Capabilities

### Identify missing React packages
Scans your JSX to find any shadcn/ui components that aren't installed in your project.

### Detect uninstalled sub-components
Finds nested tags like DialogContent that require specific base packages to function.

### Verify component registry strings
Confirms if a specific string matches a known part of the shadcn/ui component tree.

### List supported UI components
Provides a complete list of all components that can be resolved by this MCP.

## Use Cases

### Fixing broken AI-generated dialogs
Your agent writes a beautiful Dialog component, but the app crashes because you forgot to install the underlying dialog package. This MCP identifies the missing dependency instantly.

### Verifying complex JSX snippets
You paste a large block of TSX from a chat and need to know if your current shadcn/ui setup can handle it without extra installs.

### Auditing component usage
Check a new feature branch to see which specific shadcn/ui components are being introduced to the project.

## Benefits

- Eliminate dependency blindness by catching uninstalled UI packages before you run your code.
- Stop manually checking which sub-components like DialogContent belong to which base package.
- Speed up UI prototyping by ensuring AI-generated JSX is immediately runnable.
- Reduce build errors in your React project caused by missing shadcn/ui registry entries.
- Keep your component registry clean and synchronized with your actual code usage.

## How It Works

The bottom line is you stop debugging broken UI imports caused by incomplete component installations.

1. Paste your JSX or TSX snippet into your AI client.
2. The MCP scans the code for shadcn/ui patterns and registry entries.
3. You receive a clear list of exactly which packages to install or which tags are missing.

## Frequently Asked Questions

**How does shadcn/ui Dependency Resolver Alternative fix broken imports?**
It scans your code snippets to find any UI components that aren't currently in your project's registry, giving you a clear list of what to install.

**Can I use this MCP with Cursor or Windsurf?**
Yes, you can connect it to any compatible client like Cursor, Windsurf, or VS Code via the Vinkius catalog to check your React components.

**Does this work for all shadcn/ui components?**
It works for any component currently in the supported registry, which you can view at any time using the list tool.

**Will this help me find missing sub-components like DialogContent?**
Absolutely. The tool specifically looks for these nested tags to ensure your entire component tree is properly installed.

**Do I need to manually update the registry?**
No, the MCP uses the existing registry data to identify what's valid and what's missing from your current implementation.

**What does the `extract_dependencies` tool return?**
It returns a unique list of required components, the total count of detected components, and a list of any missing sub-components found in your snippet.

**How does it identify components?**
The tool scans your JSX for tags starting with an uppercase letter and matches them against a strict registry of shadcn/ui component families.

**Can I verify a specific tag name?**
Yes, you can use the `validate_component_registry_entry` tool to check if a specific string like 'AccordionItem' is recognized as a valid shadcn/ui component.