mcp-pro-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +116 -0
- package/dist/components-data.d.ts +28 -0
- package/dist/components-data.d.ts.map +1 -0
- package/dist/components-data.js +698 -0
- package/dist/components-data.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +459 -0
- package/dist/index.js.map +1 -0
- package/package.json +47 -0
package/README.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# mcp-pro-ui
|
|
2
|
+
|
|
3
|
+
> MCP server for [@dangbt/pro-ui](https://www.npmjs.com/package/@dangbt/pro-ui) — lets AI agents (Claude Code, Cursor, Copilot, Windsurf) browse components, get API references, and scaffold React pages.
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
When you add `mcp-pro-ui` to your AI coding tool, the AI can:
|
|
8
|
+
|
|
9
|
+
- **Discover** all 40+ components available in `@dangbt/pro-ui`
|
|
10
|
+
- **Get props API** — types, defaults, descriptions for any component
|
|
11
|
+
- **Get code examples** — ready-to-paste TypeScript/React snippets
|
|
12
|
+
- **Search by use case** — "I need a data table with server-side pagination"
|
|
13
|
+
- **Scaffold pages** — generate complete CRUD pages, dashboards, login forms
|
|
14
|
+
|
|
15
|
+
## Setup
|
|
16
|
+
|
|
17
|
+
### Claude Code
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
claude mcp add mcp-pro-ui -- npx -y mcp-pro-ui
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or add to `~/.claude/settings.json`:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"mcpServers": {
|
|
28
|
+
"pro-ui": {
|
|
29
|
+
"command": "npx",
|
|
30
|
+
"args": ["-y", "mcp-pro-ui"]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Cursor
|
|
37
|
+
|
|
38
|
+
Add to `.cursor/mcp.json` in your project:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"pro-ui": {
|
|
44
|
+
"command": "npx",
|
|
45
|
+
"args": ["-y", "mcp-pro-ui"]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Windsurf / Cline
|
|
52
|
+
|
|
53
|
+
Same `npx -y mcp-pro-ui` pattern — refer to your tool's MCP docs.
|
|
54
|
+
|
|
55
|
+
## Available tools
|
|
56
|
+
|
|
57
|
+
| Tool | Description |
|
|
58
|
+
|------|-------------|
|
|
59
|
+
| `list_components` | List all components, optionally filtered by category |
|
|
60
|
+
| `get_component_api` | Full props reference for a component |
|
|
61
|
+
| `get_component_example` | Copy-paste code example |
|
|
62
|
+
| `search_components` | Find components by use case description |
|
|
63
|
+
| `scaffold_page` | Generate a complete page (crud-list, crud-form, dashboard, settings, login) |
|
|
64
|
+
|
|
65
|
+
## Example prompts (after adding MCP)
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
"Show me all form components in pro-ui"
|
|
69
|
+
"Give me the ProTable API with all props"
|
|
70
|
+
"What component should I use for a confirmation dialog?"
|
|
71
|
+
"Scaffold a Users CRUD list page"
|
|
72
|
+
"Generate a settings page using pro-ui"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Quick start (manual install)
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm install @dangbt/pro-ui
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
import { ProTable, ProForm, Layout, Button, Modal, Toast } from '@dangbt/pro-ui'
|
|
83
|
+
import { ThemeProvider, ToastProvider } from '@dangbt/pro-ui'
|
|
84
|
+
|
|
85
|
+
// Wrap your app
|
|
86
|
+
function App() {
|
|
87
|
+
return (
|
|
88
|
+
<ThemeProvider defaultTheme="system">
|
|
89
|
+
<ToastProvider />
|
|
90
|
+
<YourApp />
|
|
91
|
+
</ThemeProvider>
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Components overview
|
|
97
|
+
|
|
98
|
+
| Category | Components |
|
|
99
|
+
|----------|------------|
|
|
100
|
+
| **Data** | ProTable (server/client-side, filtering, sorting, bulk actions) |
|
|
101
|
+
| **Forms** | ProForm, ProFormInput, ProFormSelect, ProFormDatePicker, ProFormTextarea, ProFormSwitch, ProFormCheckbox, ProFormComboBox, ProFormRadioGroup, ProFormAsyncSelect, ProFormNumberField |
|
|
102
|
+
| **Layout** | Layout (sidebar + header shell) |
|
|
103
|
+
| **Overlays** | Modal, Drawer, Popover, Tooltip, Menu |
|
|
104
|
+
| **Feedback** | Toast, Alert, Spinner, Skeleton, ProgressBar, Meter |
|
|
105
|
+
| **Display** | Statistic, Steps, Empty, Card, Badge, Avatar, Tabs, Breadcrumbs |
|
|
106
|
+
| **Theme** | ThemeProvider, useTheme (light/dark/system) |
|
|
107
|
+
|
|
108
|
+
## Links
|
|
109
|
+
|
|
110
|
+
- **npm**: [@dangbt/pro-ui](https://www.npmjs.com/package/@dangbt/pro-ui)
|
|
111
|
+
- **GitHub**: [dangbt/pro-ui](https://github.com/dangbt/pro-ui)
|
|
112
|
+
- **Showcase**: [pro-ui.pages.dev](https://pro-ui.pages.dev)
|
|
113
|
+
|
|
114
|
+
## License
|
|
115
|
+
|
|
116
|
+
MIT
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface ComponentInfo {
|
|
2
|
+
name: string;
|
|
3
|
+
importName: string;
|
|
4
|
+
category: 'data' | 'form' | 'layout' | 'overlay' | 'feedback' | 'display' | 'theme';
|
|
5
|
+
description: string;
|
|
6
|
+
useCases: string[];
|
|
7
|
+
props: PropInfo[];
|
|
8
|
+
example: string;
|
|
9
|
+
notes?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface PropInfo {
|
|
12
|
+
name: string;
|
|
13
|
+
type: string;
|
|
14
|
+
required: boolean;
|
|
15
|
+
default?: string;
|
|
16
|
+
description: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const COMPONENTS: ComponentInfo[];
|
|
19
|
+
export declare const CATEGORIES: {
|
|
20
|
+
readonly data: "Data Display & Tables";
|
|
21
|
+
readonly form: "Forms & Inputs";
|
|
22
|
+
readonly layout: "Layout";
|
|
23
|
+
readonly overlay: "Overlays & Modals";
|
|
24
|
+
readonly feedback: "Feedback & Status";
|
|
25
|
+
readonly display: "Display & Typography";
|
|
26
|
+
readonly theme: "Theming";
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=components-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-data.d.ts","sourceRoot":"","sources":["../src/components-data.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,CAAA;IACnF,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,aAAa,EAysBrC,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;CAQb,CAAA"}
|