untitledui-mcp 0.1.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/.env.example +1 -0
- package/README.md +139 -0
- package/assets/cover.png +0 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +688 -0
- package/package.json +37 -0
- package/src/api/client.test.ts +46 -0
- package/src/api/client.ts +117 -0
- package/src/api/endpoints.ts +12 -0
- package/src/api/types.ts +84 -0
- package/src/cache/memory-cache.test.ts +56 -0
- package/src/cache/memory-cache.ts +64 -0
- package/src/index.ts +96 -0
- package/src/server.ts +374 -0
- package/src/utils/descriptions.ts +65 -0
- package/src/utils/license.test.ts +45 -0
- package/src/utils/license.ts +35 -0
- package/src/utils/search.test.ts +39 -0
- package/src/utils/search.ts +71 -0
- package/tsconfig.json +16 -0
package/.env.example
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
UNTITLEDUI_LICENSE_KEY=your_license_key_here
|
package/README.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# UntitledUI MCP
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
MCP server that lets AI agents fetch real UntitledUI components instead of generating UI from scratch.
|
|
6
|
+
|
|
7
|
+
## Why
|
|
8
|
+
|
|
9
|
+
AI tools can generate functional UI, but the result often lacks the polish and consistency of professionally designed systems. UntitledUI is one of the most refined component libraries available — this MCP gives your AI direct access to it.
|
|
10
|
+
|
|
11
|
+
Instead of generating a modal from patterns it's seen, your AI fetches the actual UntitledUI modal with all its carefully crafted details intact.
|
|
12
|
+
|
|
13
|
+
## Setup
|
|
14
|
+
|
|
15
|
+
### Add MCP to your tool
|
|
16
|
+
|
|
17
|
+
**Claude Code:**
|
|
18
|
+
```bash
|
|
19
|
+
claude mcp add untitledui -- npx untitledui-mcp
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Cursor / VS Code** — add to `.cursor/mcp.json`:
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"untitledui": {
|
|
27
|
+
"command": "npx",
|
|
28
|
+
"args": ["untitledui-mcp"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
This gives you access to **base components** (button, input, select, avatar, badge, etc.) without authentication.
|
|
35
|
+
|
|
36
|
+
### For Pro components (optional)
|
|
37
|
+
|
|
38
|
+
To access application components (modals, sidebars, tables, dashboards) and marketing sections, authenticate with your UntitledUI Pro license:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx untitledui@latest login
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This opens your browser to authenticate and saves your license key to `~/.untitledui/config.json`. The MCP auto-detects this file.
|
|
45
|
+
|
|
46
|
+
Alternatively, set the key manually in your MCP config:
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"mcpServers": {
|
|
50
|
+
"untitledui": {
|
|
51
|
+
"command": "npx",
|
|
52
|
+
"args": ["untitledui-mcp"],
|
|
53
|
+
"env": {
|
|
54
|
+
"UNTITLEDUI_LICENSE_KEY": "<your-key>"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Verify setup
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npx untitledui-mcp --test
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## How It Works
|
|
68
|
+
|
|
69
|
+
Your AI gets these tools:
|
|
70
|
+
|
|
71
|
+
| Tool | What it does |
|
|
72
|
+
|------|--------------|
|
|
73
|
+
| `search_components` | Find components by name or description |
|
|
74
|
+
| `list_components` | Browse a category |
|
|
75
|
+
| `get_component_with_deps` | Fetch component + all dependencies |
|
|
76
|
+
| `get_component` | Fetch component only |
|
|
77
|
+
| `get_example` | Get complete page template |
|
|
78
|
+
|
|
79
|
+
### Example: Add a modal
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
You: "Add a settings modal"
|
|
83
|
+
|
|
84
|
+
AI searches → finds application/modals/settings-modal
|
|
85
|
+
AI fetches → gets modal + button, input, select base components
|
|
86
|
+
AI adds → places files in your project with correct imports
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Example: Browse options
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
You: "What sidebar variants are there?"
|
|
93
|
+
|
|
94
|
+
AI calls list_components { type: "application", subfolder: "sidebars" }
|
|
95
|
+
→ Returns all sidebar options for you to choose from
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Example: Start from template
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
You: "Set up a dashboard layout"
|
|
102
|
+
|
|
103
|
+
AI calls get_example { name: "application" }
|
|
104
|
+
→ Returns complete dashboard with sidebar, header, and sample pages
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Response Format
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"primary": {
|
|
112
|
+
"name": "settings-modal",
|
|
113
|
+
"files": [{ "path": "settings-modal.tsx", "code": "..." }],
|
|
114
|
+
"baseComponents": ["button", "input", "select"]
|
|
115
|
+
},
|
|
116
|
+
"baseComponents": [
|
|
117
|
+
{ "name": "button", "files": [...] },
|
|
118
|
+
{ "name": "input", "files": [...] }
|
|
119
|
+
],
|
|
120
|
+
"allDependencies": ["@headlessui/react", "clsx"]
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Requirements
|
|
125
|
+
|
|
126
|
+
- Node.js 18+
|
|
127
|
+
- UntitledUI Pro license (only for Pro components)
|
|
128
|
+
|
|
129
|
+
## Credits
|
|
130
|
+
|
|
131
|
+
[UntitledUI](https://www.untitledui.com) is created by [Jordan Hughes](https://jordanhughes.co).
|
|
132
|
+
|
|
133
|
+
- [Twitter/X](https://x.com/jordanphughes)
|
|
134
|
+
- [Dribbble](https://dribbble.com/jordanhughes)
|
|
135
|
+
- [UntitledUI on X](https://x.com/UntitledUI)
|
|
136
|
+
|
|
137
|
+
## License
|
|
138
|
+
|
|
139
|
+
MIT
|
package/assets/cover.png
ADDED
|
Binary file
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|