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.
Files changed (2) hide show
  1. package/README.md +188 -37
  2. 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
- ## Available Tools
5
+ [![npm version](https://badge.fury.io/js/myoperator-mcp.svg)](https://www.npmjs.com/package/myoperator-mcp)
6
6
 
7
- | Tool | Description |
8
- |------|-------------|
9
- | `list-components` | List all available components with descriptions |
10
- | `get-component-metadata` | Get props, variants, dependencies for a component |
11
- | `get-component-examples` | Get React code examples |
12
- | `list-design-tokens` | List design tokens (colors, spacing, radius) |
13
- | `get-component-accessibility` | Get accessibility guidelines |
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
- ## Installation
34
+ ### Claude Code
16
35
 
17
- ### For Cursor
36
+ Run this command in your terminal:
18
37
 
19
- Add to `~/.cursor/mcp.json`:
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
- ### For Claude Code / Claude Desktop
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
- ### For VSCode
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
- ### Ask your AI assistant:
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
- - "What components are available in myOperator UI?"
67
- - "Show me how to use the Button component with loading state"
68
- - "What props does the Table component accept?"
69
- - "What are the accessibility requirements for the DropdownMenu?"
70
- - "List all the color tokens in the design system"
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
- - **Button** - Customizable button with variants, sizes, and icons
77
- - **Badge** - Status badges (active, failed, disabled)
78
- - **Tag** - Event labels with optional bold prefix
79
- - **Table** - Composable table with loading/empty states
80
- - **DropdownMenu** - Radix-based dropdown with keyboard navigation
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
- ## Publishing
246
+ ---
99
247
 
100
- ```bash
101
- npm publish
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
- Then users can run via `npx myoperator-mcp`.
255
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-mcp",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "MCP server for myOperator UI components - enables AI assistants to access component metadata, examples, and design tokens",
5
5
  "type": "module",
6
6
  "bin": "./dist/index.js",