myoperator-mcp 0.0.1 → 0.0.3
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 +188 -37
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,104 +1,255 @@
|
|
|
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, 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 access component metadata, code examples, and design tokens.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/myoperator-mcp)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx myoperator-mcp
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Installation & Setup
|
|
14
|
+
|
|
15
|
+
### Cursor (One-Click Install)
|
|
16
|
+
|
|
17
|
+
[**Install in Cursor**](cursor://anysphere.cursor-deeplink/mcp/install?name=myoperator&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm15b3BlcmF0b3ItbWNwIl19)
|
|
18
|
+
|
|
19
|
+
Or manually edit `~/.cursor/mcp.json`:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"myoperator": {
|
|
25
|
+
"command": "npx",
|
|
26
|
+
"args": ["-y", "myoperator-mcp"]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
3. Restart Cursor
|
|
14
33
|
|
|
15
|
-
|
|
34
|
+
### Claude Code
|
|
16
35
|
|
|
17
|
-
|
|
36
|
+
Run this command in your terminal:
|
|
18
37
|
|
|
19
|
-
|
|
38
|
+
```bash
|
|
39
|
+
claude mcp add myoperator -- npx -y myoperator-mcp
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Or manually add to `~/.claude.json`:
|
|
20
43
|
|
|
21
44
|
```json
|
|
22
45
|
{
|
|
23
46
|
"mcpServers": {
|
|
24
47
|
"myoperator": {
|
|
25
48
|
"command": "npx",
|
|
26
|
-
"args": ["myoperator-mcp"]
|
|
49
|
+
"args": ["-y", "myoperator-mcp"]
|
|
27
50
|
}
|
|
28
51
|
}
|
|
29
52
|
}
|
|
30
53
|
```
|
|
31
54
|
|
|
32
|
-
###
|
|
55
|
+
### Claude Desktop
|
|
33
56
|
|
|
34
|
-
Add to your Claude config:
|
|
57
|
+
Add to your Claude Desktop config file:
|
|
58
|
+
|
|
59
|
+
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
60
|
+
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
35
61
|
|
|
36
62
|
```json
|
|
37
63
|
{
|
|
38
64
|
"mcpServers": {
|
|
39
65
|
"myoperator": {
|
|
40
66
|
"command": "npx",
|
|
41
|
-
"args": ["myoperator-mcp"]
|
|
67
|
+
"args": ["-y", "myoperator-mcp"]
|
|
42
68
|
}
|
|
43
69
|
}
|
|
44
70
|
}
|
|
45
71
|
```
|
|
46
72
|
|
|
47
|
-
###
|
|
73
|
+
### VSCode (with GitHub Copilot)
|
|
48
74
|
|
|
49
|
-
Add to `.vscode/mcp.json
|
|
75
|
+
Add to `.vscode/mcp.json` in your project:
|
|
50
76
|
|
|
51
77
|
```json
|
|
52
78
|
{
|
|
53
79
|
"servers": {
|
|
54
80
|
"myoperator": {
|
|
55
81
|
"command": "npx",
|
|
56
|
-
"args": ["myoperator-mcp"]
|
|
82
|
+
"args": ["-y", "myoperator-mcp"]
|
|
57
83
|
}
|
|
58
84
|
}
|
|
59
85
|
}
|
|
60
86
|
```
|
|
61
87
|
|
|
88
|
+
Or use Command Palette → "MCP: Add Server"
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Available Tools
|
|
93
|
+
|
|
94
|
+
| Tool | Description |
|
|
95
|
+
|------|-------------|
|
|
96
|
+
| `list-components` | List all available components with descriptions |
|
|
97
|
+
| `get-component-metadata` | Get props, variants, dependencies for a component |
|
|
98
|
+
| `get-component-examples` | Get React code examples |
|
|
99
|
+
| `list-design-tokens` | List design tokens (colors, spacing, radius, typography) |
|
|
100
|
+
| `get-component-accessibility` | Get accessibility guidelines and ARIA attributes |
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
62
104
|
## Usage Examples
|
|
63
105
|
|
|
64
|
-
|
|
106
|
+
Once installed, ask your AI assistant:
|
|
107
|
+
|
|
108
|
+
### Component Discovery
|
|
109
|
+
|
|
110
|
+
> "What components are available in myOperator UI?"
|
|
111
|
+
|
|
112
|
+
> "List all the UI components I can use"
|
|
113
|
+
|
|
114
|
+
### Component Details
|
|
115
|
+
|
|
116
|
+
> "Show me the Button component props and variants"
|
|
117
|
+
|
|
118
|
+
> "What are the size options for the Badge component?"
|
|
119
|
+
|
|
120
|
+
> "How do I use the Table component with loading state?"
|
|
121
|
+
|
|
122
|
+
### Code Examples
|
|
123
|
+
|
|
124
|
+
> "Give me a code example for a Button with an icon"
|
|
65
125
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
126
|
+
> "Show me how to create a dropdown menu"
|
|
127
|
+
|
|
128
|
+
> "How do I make an interactive Tag component?"
|
|
129
|
+
|
|
130
|
+
### Design Tokens
|
|
131
|
+
|
|
132
|
+
> "What color tokens are available?"
|
|
133
|
+
|
|
134
|
+
> "List all spacing values in the design system"
|
|
135
|
+
|
|
136
|
+
> "What's the primary brand color?"
|
|
137
|
+
|
|
138
|
+
### Accessibility
|
|
139
|
+
|
|
140
|
+
> "What accessibility features does the DropdownMenu have?"
|
|
141
|
+
|
|
142
|
+
> "How do I make the Button accessible for screen readers?"
|
|
143
|
+
|
|
144
|
+
> "What keyboard shortcuts does the Table support?"
|
|
145
|
+
|
|
146
|
+
---
|
|
71
147
|
|
|
72
148
|
## Components
|
|
73
149
|
|
|
74
|
-
The MCP server provides information for:
|
|
150
|
+
The MCP server provides information for these components:
|
|
151
|
+
|
|
152
|
+
| Component | Description |
|
|
153
|
+
|-----------|-------------|
|
|
154
|
+
| **Button** | Customizable button with 6 variants, 4 sizes, loading states, and icon support |
|
|
155
|
+
| **Badge** | Status badges for active, failed, disabled states |
|
|
156
|
+
| **Tag** | Event labels with optional bold prefix, interactive and selectable |
|
|
157
|
+
| **Table** | Composable table with size variants, loading skeleton, empty state, sticky columns |
|
|
158
|
+
| **DropdownMenu** | Radix-based dropdown with full keyboard navigation |
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Tool Reference
|
|
163
|
+
|
|
164
|
+
### `list-components`
|
|
165
|
+
|
|
166
|
+
Lists all available components.
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
Input: (none)
|
|
170
|
+
Output: Array of components with name, id, description, dependencyCount
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### `get-component-metadata`
|
|
174
|
+
|
|
175
|
+
Get detailed metadata for a specific component.
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
Input: { componentName: "button" }
|
|
179
|
+
Output: {
|
|
180
|
+
name, description, dependencies,
|
|
181
|
+
props (with types, defaults, descriptions),
|
|
182
|
+
variants (with options),
|
|
183
|
+
import statement
|
|
184
|
+
}
|
|
185
|
+
```
|
|
75
186
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
187
|
+
### `get-component-examples`
|
|
188
|
+
|
|
189
|
+
Get code examples for a component.
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
Input: { componentName: "button", exampleType?: "loading" }
|
|
193
|
+
Output: {
|
|
194
|
+
component, import statement,
|
|
195
|
+
examples (with title, description, code)
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### `list-design-tokens`
|
|
200
|
+
|
|
201
|
+
List design tokens from the design system.
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
Input: { category?: "colors" | "spacing" | "radius" | "typography" }
|
|
205
|
+
Output: {
|
|
206
|
+
tokens (with name, value, cssVariable, description),
|
|
207
|
+
usage instructions
|
|
208
|
+
}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### `get-component-accessibility`
|
|
212
|
+
|
|
213
|
+
Get accessibility guidelines for a component.
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
Input: { componentName: "dropdown-menu" }
|
|
217
|
+
Output: {
|
|
218
|
+
guidelines (semantic, visual, best practices),
|
|
219
|
+
ariaAttributes (with usage),
|
|
220
|
+
keyboardSupport (key → action mapping)
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
---
|
|
81
225
|
|
|
82
226
|
## Development
|
|
83
227
|
|
|
84
228
|
```bash
|
|
229
|
+
# Clone the repository
|
|
230
|
+
git clone https://github.com/Ankish8/storybook-npm.git
|
|
231
|
+
cd storybook-npm/packages/mcp
|
|
232
|
+
|
|
85
233
|
# Install dependencies
|
|
86
234
|
npm install
|
|
87
235
|
|
|
88
236
|
# Build
|
|
89
237
|
npm run build
|
|
90
238
|
|
|
91
|
-
# Watch mode
|
|
239
|
+
# Watch mode for development
|
|
92
240
|
npm run dev
|
|
93
241
|
|
|
94
242
|
# Test locally
|
|
95
243
|
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | node dist/index.js
|
|
96
244
|
```
|
|
97
245
|
|
|
98
|
-
|
|
246
|
+
---
|
|
99
247
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
248
|
+
## Related
|
|
249
|
+
|
|
250
|
+
- [myoperator-ui](https://www.npmjs.com/package/myoperator-ui) - CLI for adding myOperator UI components to your project
|
|
251
|
+
- [Model Context Protocol](https://modelcontextprotocol.io/) - Open standard for AI-tool integration
|
|
252
|
+
|
|
253
|
+
## License
|
|
103
254
|
|
|
104
|
-
|
|
255
|
+
MIT
|
package/package.json
CHANGED