myoperator-mcp 0.2.170 → 0.2.172

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 +223 -223
  2. package/dist/index.js +920 -280
  3. package/package.json +42 -42
package/README.md CHANGED
@@ -1,223 +1,223 @@
1
- # myOperator MCP Server
2
-
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
-
5
- [![npm version](https://badge.fury.io/js/myoperator-mcp.svg)](https://www.npmjs.com/package/myoperator-mcp)
6
-
7
- ## Quick Start
8
-
9
- ```bash
10
- npx myoperator-mcp
11
- ```
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
-
20
- ## Installation & Setup
21
-
22
- ### Cursor (One-Click Install)
23
-
24
- [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.png)](cursor://anysphere.cursor-deeplink/mcp/install?name=myoperator&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm15b3BlcmF0b3ItbWNwIl19)
25
-
26
- > **Note:** The button above works when viewing this README locally or in an app that supports `cursor://` links. If it doesn't work, copy this link and paste in your browser:
27
- > ```
28
- > cursor://anysphere.cursor-deeplink/mcp/install?name=myoperator&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm15b3BlcmF0b3ItbWNwIl19
29
- > ```
30
-
31
- Or manually edit `~/.cursor/mcp.json`:
32
-
33
- ```json
34
- {
35
- "mcpServers": {
36
- "myoperator": {
37
- "command": "npx",
38
- "args": ["-y", "myoperator-mcp"]
39
- }
40
- }
41
- }
42
- ```
43
-
44
- ### Claude Code
45
-
46
- Run this command in your terminal:
47
-
48
- ```bash
49
- claude mcp add myoperator -- npx -y myoperator-mcp
50
- ```
51
-
52
- Or manually add to `~/.claude.json`:
53
-
54
- ```json
55
- {
56
- "mcpServers": {
57
- "myoperator": {
58
- "command": "npx",
59
- "args": ["-y", "myoperator-mcp"]
60
- }
61
- }
62
- }
63
- ```
64
-
65
- ### Claude Desktop
66
-
67
- Add to your Claude Desktop config file:
68
-
69
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
70
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
71
-
72
- ```json
73
- {
74
- "mcpServers": {
75
- "myoperator": {
76
- "command": "npx",
77
- "args": ["-y", "myoperator-mcp"]
78
- }
79
- }
80
- }
81
- ```
82
-
83
- ### VSCode (with GitHub Copilot)
84
-
85
- Add to `.vscode/mcp.json` in your project:
86
-
87
- ```json
88
- {
89
- "servers": {
90
- "myoperator": {
91
- "command": "npx",
92
- "args": ["-y", "myoperator-mcp"]
93
- }
94
- }
95
- }
96
- ```
97
-
98
- Or use Command Palette → "MCP: Add Server"
99
-
100
- ---
101
-
102
- ## Available Tools
103
-
104
- | Tool | Description |
105
- |------|-------------|
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** |
110
-
111
- ---
112
-
113
- ## Natural Language Installation
114
-
115
- The `install-component` tool understands natural language. Ask your AI assistant:
116
-
117
- ### Form Components
118
- > "Add a login form"
119
- > → Installs: text-field, button, checkbox
120
-
121
- > "I need a settings form"
122
- > → Installs: text-field, toggle, select-field, button
123
-
124
- > "Add a search form"
125
- > → Installs: input, button
126
-
127
- ### Multiple Components
128
- > "Install button, input, and select"
129
- > → Installs all three components
130
-
131
- > "Add table and badge"
132
- > → Installs both components
133
-
134
- ### Specific Components
135
- > "Add button"
136
- > → Installs: button
137
-
138
- > "Install the dropdown menu"
139
- > → Installs: dropdown-menu
140
-
141
- ### Context-Aware
142
- > "I need a data table with status badges"
143
- > → Installs: table, badge
144
-
145
- > "Add an accordion section"
146
- > → Installs: accordion
147
-
148
- ---
149
-
150
- ## Usage Examples
151
-
152
- ### Browse Components
153
-
154
- > "What components are available in myOperator UI?"
155
-
156
- > "List all the UI components"
157
-
158
- ### Component Details
159
-
160
- > "Show me the Button component props and variants"
161
-
162
- > "What are the size options for TextField?"
163
-
164
- ### Install Components
165
-
166
- > "Initialize my project for myOperator UI"
167
-
168
- > "Add a login form" *(installs text-field, button, checkbox)*
169
-
170
- > "Install the Table component"
171
-
172
- ---
173
-
174
- ## Components
175
-
176
- | Component | Description |
177
- |-----------|-------------|
178
- | **Accordion** | Expandable/collapsible sections with single or multiple mode |
179
- | **Badge** | Status badges (active, failed, disabled, outline, secondary, destructive) with asChild |
180
- | **Button** | 7 variants, 6 sizes (including icon-lg), loading states, icons |
181
- | **Checkbox** | Tri-state checkbox built on Radix UI with labels |
182
- | **DropdownMenu** | Radix-based with keyboard navigation |
183
- | **Input** | Text input with state variants |
184
- | **MultiSelect** | Multi-select with tags and search |
185
- | **Select** | Composable Radix-based dropdown |
186
- | **SelectField** | Form select with label and validation |
187
- | **Switch** | Switch component built on Radix UI for boolean inputs |
188
- | **Table** | Composable table with loading skeleton |
189
- | **Tag** | Event labels with bold prefix, interactive |
190
- | **TextField** | Form input with label, icons, validation |
191
-
192
- ---
193
-
194
- ## Development
195
-
196
- ```bash
197
- # Clone the repository
198
- git clone https://github.com/Ankish8/storybook-npm.git
199
- cd storybook-npm/packages/mcp
200
-
201
- # Install dependencies
202
- npm install
203
-
204
- # Build
205
- npm run build
206
-
207
- # Watch mode for development
208
- npm run dev
209
-
210
- # Test locally
211
- echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | node dist/index.js
212
- ```
213
-
214
- ---
215
-
216
- ## Related
217
-
218
- - [myoperator-ui](https://www.npmjs.com/package/myoperator-ui) - CLI for adding myOperator UI components
219
- - [Model Context Protocol](https://modelcontextprotocol.io/) - Open standard for AI-tool integration
220
-
221
- ## License
222
-
223
- MIT
1
+ # myOperator MCP Server
2
+
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
+
5
+ [![npm version](https://badge.fury.io/js/myoperator-mcp.svg)](https://www.npmjs.com/package/myoperator-mcp)
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ npx myoperator-mcp
11
+ ```
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
+
20
+ ## Installation & Setup
21
+
22
+ ### Cursor (One-Click Install)
23
+
24
+ [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.png)](cursor://anysphere.cursor-deeplink/mcp/install?name=myoperator&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm15b3BlcmF0b3ItbWNwIl19)
25
+
26
+ > **Note:** The button above works when viewing this README locally or in an app that supports `cursor://` links. If it doesn't work, copy this link and paste in your browser:
27
+ > ```
28
+ > cursor://anysphere.cursor-deeplink/mcp/install?name=myoperator&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm15b3BlcmF0b3ItbWNwIl19
29
+ > ```
30
+
31
+ Or manually edit `~/.cursor/mcp.json`:
32
+
33
+ ```json
34
+ {
35
+ "mcpServers": {
36
+ "myoperator": {
37
+ "command": "npx",
38
+ "args": ["-y", "myoperator-mcp"]
39
+ }
40
+ }
41
+ }
42
+ ```
43
+
44
+ ### Claude Code
45
+
46
+ Run this command in your terminal:
47
+
48
+ ```bash
49
+ claude mcp add myoperator -- npx -y myoperator-mcp
50
+ ```
51
+
52
+ Or manually add to `~/.claude.json`:
53
+
54
+ ```json
55
+ {
56
+ "mcpServers": {
57
+ "myoperator": {
58
+ "command": "npx",
59
+ "args": ["-y", "myoperator-mcp"]
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ ### Claude Desktop
66
+
67
+ Add to your Claude Desktop config file:
68
+
69
+ **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
70
+ **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
71
+
72
+ ```json
73
+ {
74
+ "mcpServers": {
75
+ "myoperator": {
76
+ "command": "npx",
77
+ "args": ["-y", "myoperator-mcp"]
78
+ }
79
+ }
80
+ }
81
+ ```
82
+
83
+ ### VSCode (with GitHub Copilot)
84
+
85
+ Add to `.vscode/mcp.json` in your project:
86
+
87
+ ```json
88
+ {
89
+ "servers": {
90
+ "myoperator": {
91
+ "command": "npx",
92
+ "args": ["-y", "myoperator-mcp"]
93
+ }
94
+ }
95
+ }
96
+ ```
97
+
98
+ Or use Command Palette → "MCP: Add Server"
99
+
100
+ ---
101
+
102
+ ## Available Tools
103
+
104
+ | Tool | Description |
105
+ |------|-------------|
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** |
110
+
111
+ ---
112
+
113
+ ## Natural Language Installation
114
+
115
+ The `install-component` tool understands natural language. Ask your AI assistant:
116
+
117
+ ### Form Components
118
+ > "Add a login form"
119
+ > → Installs: text-field, button, checkbox
120
+
121
+ > "I need a settings form"
122
+ > → Installs: text-field, toggle, select-field, button
123
+
124
+ > "Add a search form"
125
+ > → Installs: input, button
126
+
127
+ ### Multiple Components
128
+ > "Install button, input, and select"
129
+ > → Installs all three components
130
+
131
+ > "Add table and badge"
132
+ > → Installs both components
133
+
134
+ ### Specific Components
135
+ > "Add button"
136
+ > → Installs: button
137
+
138
+ > "Install the dropdown menu"
139
+ > → Installs: dropdown-menu
140
+
141
+ ### Context-Aware
142
+ > "I need a data table with status badges"
143
+ > → Installs: table, badge
144
+
145
+ > "Add an accordion section"
146
+ > → Installs: accordion
147
+
148
+ ---
149
+
150
+ ## Usage Examples
151
+
152
+ ### Browse Components
153
+
154
+ > "What components are available in myOperator UI?"
155
+
156
+ > "List all the UI components"
157
+
158
+ ### Component Details
159
+
160
+ > "Show me the Button component props and variants"
161
+
162
+ > "What are the size options for TextField?"
163
+
164
+ ### Install Components
165
+
166
+ > "Initialize my project for myOperator UI"
167
+
168
+ > "Add a login form" *(installs text-field, button, checkbox)*
169
+
170
+ > "Install the Table component"
171
+
172
+ ---
173
+
174
+ ## Components
175
+
176
+ | Component | Description |
177
+ |-----------|-------------|
178
+ | **Accordion** | Expandable/collapsible sections with single or multiple mode |
179
+ | **Badge** | Status badges (active, failed, disabled, outline, secondary, destructive) with asChild |
180
+ | **Button** | 7 variants, 6 sizes (including icon-lg), loading states, icons |
181
+ | **Checkbox** | Tri-state checkbox built on Radix UI with labels |
182
+ | **DropdownMenu** | Radix-based with keyboard navigation |
183
+ | **Input** | Text input with state variants |
184
+ | **MultiSelect** | Multi-select with tags and search |
185
+ | **Select** | Composable Radix-based dropdown |
186
+ | **SelectField** | Form select with label and validation |
187
+ | **Switch** | Switch component built on Radix UI for boolean inputs |
188
+ | **Table** | Composable table with loading skeleton |
189
+ | **Tag** | Event labels with bold prefix, interactive |
190
+ | **TextField** | Form input with label, icons, validation |
191
+
192
+ ---
193
+
194
+ ## Development
195
+
196
+ ```bash
197
+ # Clone the repository
198
+ git clone https://github.com/Ankish8/storybook-npm.git
199
+ cd storybook-npm/packages/mcp
200
+
201
+ # Install dependencies
202
+ npm install
203
+
204
+ # Build
205
+ npm run build
206
+
207
+ # Watch mode for development
208
+ npm run dev
209
+
210
+ # Test locally
211
+ echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | node dist/index.js
212
+ ```
213
+
214
+ ---
215
+
216
+ ## Related
217
+
218
+ - [myoperator-ui](https://www.npmjs.com/package/myoperator-ui) - CLI for adding myOperator UI components
219
+ - [Model Context Protocol](https://modelcontextprotocol.io/) - Open standard for AI-tool integration
220
+
221
+ ## License
222
+
223
+ MIT