myoperator-mcp 0.0.5 → 0.2.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.
Files changed (3) hide show
  1. package/README.md +62 -142
  2. package/dist/index.js +1098 -1096
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # myOperator MCP Server
2
2
 
3
- Model Context Protocol (MCP) server for the myOperator UI component library. Enables AI assistants like Claude, Cursor, and VSCode Copilot to access component metadata, code examples, and design tokens.
3
+ Model Context Protocol (MCP) server for the myOperator UI component library. Enables AI assistants like Claude, Cursor, and VSCode Copilot to browse and install components using natural language.
4
4
 
5
5
  [![npm version](https://badge.fury.io/js/myoperator-mcp.svg)](https://www.npmjs.com/package/myoperator-mcp)
6
6
 
@@ -10,6 +10,13 @@ Model Context Protocol (MCP) server for the myOperator UI component library. Ena
10
10
  npx myoperator-mcp
11
11
  ```
12
12
 
13
+ ## Features
14
+
15
+ - **Natural Language Installation** - Say "add a login form" and it installs the right components
16
+ - **Component Discovery** - Browse all available components
17
+ - **Metadata & Props** - Get component details, variants, and code examples
18
+ - **shadcn-style CLI** - Uses `npx myoperator-ui add <component>`
19
+
13
20
  ## Installation & Setup
14
21
 
15
22
  ### Cursor (One-Click Install)
@@ -34,8 +41,6 @@ Or manually edit `~/.cursor/mcp.json`:
34
41
  }
35
42
  ```
36
43
 
37
- 3. Restart Cursor
38
-
39
44
  ### Claude Code
40
45
 
41
46
  Run this command in your terminal:
@@ -98,176 +103,91 @@ Or use Command Palette → "MCP: Add Server"
98
103
 
99
104
  | Tool | Description |
100
105
  |------|-------------|
101
- | `list-components` | List all available components with descriptions |
102
- | `get-component-metadata` | Get props, variants, dependencies for a component |
103
- | `get-component-examples` | Get React code examples |
104
- | `get-component-source` | **NEW** Get full source code (copy/paste ready) |
105
- | `list-design-tokens` | List design tokens (colors, spacing, radius, typography) |
106
- | `get-component-accessibility` | Get accessibility guidelines and ARIA attributes |
107
- | `get-installation-info` | **NEW** Get npm package info and setup instructions |
106
+ | `list-components` | Browse all available components |
107
+ | `get-component-metadata` | Get props, variants, and code examples |
108
+ | `init-project` | Initialize project for myOperator UI |
109
+ | `install-component` | **Install components using natural language** |
108
110
 
109
111
  ---
110
112
 
111
- ## Usage Examples
112
-
113
- Once installed, ask your AI assistant:
114
-
115
- ### Component Discovery
116
-
117
- > "What components are available in myOperator UI?"
118
-
119
- > "List all the UI components I can use"
120
-
121
- ### Component Details
113
+ ## Natural Language Installation
122
114
 
123
- > "Show me the Button component props and variants"
115
+ The `install-component` tool understands natural language. Ask your AI assistant:
124
116
 
125
- > "What are the size options for the Badge component?"
117
+ ### Form Components
118
+ > "Add a login form"
119
+ > → Installs: text-field, button, checkbox
126
120
 
127
- > "How do I use the Table component with loading state?"
121
+ > "I need a settings form"
122
+ > → Installs: text-field, toggle, select-field, button
128
123
 
129
- ### Code Examples
124
+ > "Add a search form"
125
+ > → Installs: input, button
130
126
 
131
- > "Give me a code example for a Button with an icon"
127
+ ### Multiple Components
128
+ > "Install button, input, and select"
129
+ > → Installs all three components
132
130
 
133
- > "Show me how to create a dropdown menu"
131
+ > "Add table and badge"
132
+ > → Installs both components
134
133
 
135
- > "How do I make an interactive Tag component?"
134
+ ### Specific Components
135
+ > "Add button"
136
+ > → Installs: button
136
137
 
137
- ### Design Tokens
138
+ > "Install the dropdown menu"
139
+ > → Installs: dropdown-menu
138
140
 
139
- > "What color tokens are available?"
141
+ ### Context-Aware
142
+ > "I need a data table with status badges"
143
+ > → Installs: table, badge
140
144
 
141
- > "List all spacing values in the design system"
145
+ > "Add an accordion section"
146
+ > → Installs: collapsible
142
147
 
143
- > "What's the primary brand color?"
148
+ ---
144
149
 
145
- ### Accessibility
150
+ ## Usage Examples
146
151
 
147
- > "What accessibility features does the DropdownMenu have?"
152
+ ### Browse Components
148
153
 
149
- > "How do I make the Button accessible for screen readers?"
154
+ > "What components are available in myOperator UI?"
150
155
 
151
- > "What keyboard shortcuts does the Table support?"
156
+ > "List all the UI components"
152
157
 
153
- ### Source Code (NEW)
158
+ ### Component Details
154
159
 
155
- > "Give me the full Button component source code"
160
+ > "Show me the Button component props and variants"
156
161
 
157
- > "Get the utils.ts file I need"
162
+ > "What are the size options for TextField?"
158
163
 
159
- > "Get the CSS styles for the design system"
164
+ ### Install Components
160
165
 
161
- ### Installation
166
+ > "Initialize my project for myOperator UI"
162
167
 
163
- > "How do I install myOperator UI?"
168
+ > "Add a login form" *(installs text-field, button, checkbox)*
164
169
 
165
- > "What are the dependencies I need?"
170
+ > "Install the Table component"
166
171
 
167
172
  ---
168
173
 
169
174
  ## Components
170
175
 
171
- The MCP server provides information for these components:
172
-
173
176
  | Component | Description |
174
177
  |-----------|-------------|
175
- | **Button** | Customizable button with 6 variants, 4 sizes, loading states, and icon support |
176
- | **Badge** | Status badges for active, failed, disabled states |
177
- | **Tag** | Event labels with optional bold prefix, interactive and selectable |
178
- | **Table** | Composable table with size variants, loading skeleton, empty state, sticky columns |
179
- | **DropdownMenu** | Radix-based dropdown with full keyboard navigation |
180
-
181
- ---
182
-
183
- ## Tool Reference
184
-
185
- ### `list-components`
186
-
187
- Lists all available components.
188
-
189
- ```
190
- Input: (none)
191
- Output: Array of components with name, id, description, dependencyCount
192
- ```
193
-
194
- ### `get-component-metadata`
195
-
196
- Get detailed metadata for a specific component.
197
-
198
- ```
199
- Input: { componentName: "button" }
200
- Output: {
201
- name, description, dependencies,
202
- props (with types, defaults, descriptions),
203
- variants (with options),
204
- import statement
205
- }
206
- ```
207
-
208
- ### `get-component-examples`
209
-
210
- Get code examples for a component.
211
-
212
- ```
213
- Input: { componentName: "button", exampleType?: "loading" }
214
- Output: {
215
- component, import statement,
216
- examples (with title, description, code)
217
- }
218
- ```
219
-
220
- ### `list-design-tokens`
221
-
222
- List design tokens from the design system.
223
-
224
- ```
225
- Input: { category?: "colors" | "spacing" | "radius" | "typography" }
226
- Output: {
227
- tokens (with name, value, cssVariable, description),
228
- usage instructions
229
- }
230
- ```
231
-
232
- ### `get-component-accessibility`
233
-
234
- Get accessibility guidelines for a component.
235
-
236
- ```
237
- Input: { componentName: "dropdown-menu" }
238
- Output: {
239
- guidelines (semantic, visual, best practices),
240
- ariaAttributes (with usage),
241
- keyboardSupport (key → action mapping)
242
- }
243
- ```
244
-
245
- ### `get-component-source`
246
-
247
- Get full source code for a component (copy/paste ready).
248
-
249
- ```
250
- Input: { componentName: "button" } // or "utils" or "css"
251
- Output: {
252
- component, file path, dependencies,
253
- installCommand,
254
- sourceCode (full implementation)
255
- }
256
- ```
257
-
258
- ### `get-installation-info`
259
-
260
- Get npm package info and setup instructions.
261
-
262
- ```
263
- Input: (none)
264
- Output: {
265
- packageName, npmUrl,
266
- quickStart commands,
267
- manualInstallation steps,
268
- dependencies
269
- }
270
- ```
178
+ | **Button** | 6 variants, 4 sizes, loading states, icons |
179
+ | **Badge** | Status badges (active, failed, disabled) |
180
+ | **Tag** | Event labels with bold prefix, interactive |
181
+ | **Table** | Composable table with loading skeleton |
182
+ | **DropdownMenu** | Radix-based with keyboard navigation |
183
+ | **Input** | Text input with state variants |
184
+ | **TextField** | Form input with label, icons, validation |
185
+ | **Select** | Composable Radix-based dropdown |
186
+ | **SelectField** | Form select with label and validation |
187
+ | **MultiSelect** | Multi-select with tags and search |
188
+ | **Checkbox** | Tri-state checkbox with labels |
189
+ | **Toggle** | Toggle switch for boolean inputs |
190
+ | **Collapsible** | Accordion/expandable sections |
271
191
 
272
192
  ---
273
193
 
@@ -295,7 +215,7 @@ echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | node dist/index.js
295
215
 
296
216
  ## Related
297
217
 
298
- - [myoperator-ui](https://www.npmjs.com/package/myoperator-ui) - CLI for adding myOperator UI components to your project
218
+ - [myoperator-ui](https://www.npmjs.com/package/myoperator-ui) - CLI for adding myOperator UI components
299
219
  - [Model Context Protocol](https://modelcontextprotocol.io/) - Open standard for AI-tool integration
300
220
 
301
221
  ## License