@openvue/mcp 0.0.1-alpha.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/README.md +322 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +73733 -0
- package/package.json +63 -0
package/README.md
ADDED
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
# @primevue/mcp
|
|
2
|
+
|
|
3
|
+
Model Context Protocol (MCP) server for PrimeVue component library. Provides AI assistants with comprehensive access to PrimeVue component documentation, props, events, slots, theming, and code examples.
|
|
4
|
+
|
|
5
|
+
## What is MCP?
|
|
6
|
+
|
|
7
|
+
[Model Context Protocol (MCP)](https://modelcontextprotocol.io/) is an open standard that enables AI models to connect with external tools and data sources. By installing this MCP server, your AI assistant gains deep knowledge of PrimeVue components and can provide accurate, up-to-date information while helping you build Vue.js applications.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
### Claude Code
|
|
12
|
+
|
|
13
|
+
Add the PrimeVue MCP server using the CLI:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Add to your user config (available in all projects)
|
|
17
|
+
claude mcp add primevue -s user -- npx -y @primevue/mcp
|
|
18
|
+
|
|
19
|
+
# Or add to current project only
|
|
20
|
+
claude mcp add primevue -- npx -y @primevue/mcp
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Alternatively, use the JSON format for more control:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
claude mcp add-json primevue '{"command":"npx","args":["-y","@primevue/mcp"]}' -s user
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Useful commands:**
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
claude mcp list # List all MCP servers
|
|
33
|
+
claude mcp get primevue # Get server details
|
|
34
|
+
claude mcp remove primevue # Remove the server
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
After adding, start a new Claude Code session and use `/mcp` to verify the connection.
|
|
38
|
+
|
|
39
|
+
> **Reference:** [Claude Code MCP Documentation](https://code.claude.com/docs/en/mcp)
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### Cursor
|
|
44
|
+
|
|
45
|
+
**Option 1: Project Configuration**
|
|
46
|
+
|
|
47
|
+
Create `.cursor/mcp.json` in your project:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"mcpServers": {
|
|
52
|
+
"primevue": {
|
|
53
|
+
"command": "npx",
|
|
54
|
+
"args": ["-y", "@primevue/mcp"]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Option 2: Global Configuration**
|
|
61
|
+
|
|
62
|
+
Create or edit `~/.cursor/mcp.json` in your home directory:
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"mcpServers": {
|
|
67
|
+
"primevue": {
|
|
68
|
+
"command": "npx",
|
|
69
|
+
"args": ["-y", "@primevue/mcp"]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Option 3: Via Settings UI**
|
|
76
|
+
|
|
77
|
+
1. Go to **Cursor Settings** > **Tools & Integrations**
|
|
78
|
+
2. Click **New MCP Server**
|
|
79
|
+
3. Add the configuration above
|
|
80
|
+
|
|
81
|
+
After adding, go to **Settings > MCP** and click the refresh button. The Composer Agent will automatically use PrimeVue tools when relevant.
|
|
82
|
+
|
|
83
|
+
> **Reference:** [Cursor MCP Documentation](https://docs.cursor.com/context/model-context-protocol)
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
### VS Code (GitHub Copilot)
|
|
88
|
+
|
|
89
|
+
**Option 1: Project Configuration**
|
|
90
|
+
|
|
91
|
+
Create `.vscode/mcp.json` in your project:
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"servers": {
|
|
96
|
+
"primevue": {
|
|
97
|
+
"command": "npx",
|
|
98
|
+
"args": ["-y", "@primevue/mcp"]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Option 2: User Configuration (Global)**
|
|
105
|
+
|
|
106
|
+
Create or edit the MCP configuration file in your VS Code user data directory:
|
|
107
|
+
|
|
108
|
+
- **macOS**: `~/Library/Application Support/Code/User/mcp.json`
|
|
109
|
+
- **Windows**: `%APPDATA%\Code\User\mcp.json`
|
|
110
|
+
- **Linux**: `~/.config/Code/User/mcp.json`
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"servers": {
|
|
115
|
+
"primevue": {
|
|
116
|
+
"command": "npx",
|
|
117
|
+
"args": ["-y", "@primevue/mcp"]
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Option 3: Via Command Palette**
|
|
124
|
+
|
|
125
|
+
1. Open Command Palette (`Cmd+Shift+P` / `Ctrl+Shift+P`)
|
|
126
|
+
2. Type "MCP: Add Server"
|
|
127
|
+
3. Select "Command (stdio)"
|
|
128
|
+
4. Enter `primevue` as the server ID
|
|
129
|
+
5. Enter `npx` as the command
|
|
130
|
+
6. Enter `-y,@primevue/mcp` as the arguments
|
|
131
|
+
|
|
132
|
+
After adding, use Copilot in **Agent mode** to access PrimeVue tools. The MCP server will be available in GitHub Copilot Chat.
|
|
133
|
+
|
|
134
|
+
> **Reference:** [VS Code MCP Documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers)
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
### OpenAI Codex CLI
|
|
139
|
+
|
|
140
|
+
**Option 1: Using the CLI**
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
codex mcp add primevue -- npx -y @primevue/mcp
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Option 2: Direct Configuration**
|
|
147
|
+
|
|
148
|
+
Edit `~/.codex/config.toml`:
|
|
149
|
+
|
|
150
|
+
```toml
|
|
151
|
+
[mcp_servers.primevue]
|
|
152
|
+
command = "npx"
|
|
153
|
+
args = ["-y", "@primevue/mcp"]
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
After adding, the MCP server will be available in both the Codex CLI and VS Code extension.
|
|
157
|
+
|
|
158
|
+
> **Reference:** [OpenAI Codex MCP Documentation](https://developers.openai.com/codex/mcp/)
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### Windsurf
|
|
163
|
+
|
|
164
|
+
**Option 1: Via Settings UI**
|
|
165
|
+
|
|
166
|
+
1. Click **Windsurf - Settings** (bottom right) or press `Cmd+Shift+P` / `Ctrl+Shift+P`
|
|
167
|
+
2. Type "Open Windsurf Settings"
|
|
168
|
+
3. Navigate to **Cascade** section
|
|
169
|
+
4. Click **Manage MCPs** > **View raw config**
|
|
170
|
+
|
|
171
|
+
**Option 2: Direct Configuration**
|
|
172
|
+
|
|
173
|
+
Edit `~/.codeium/windsurf/mcp_config.json`:
|
|
174
|
+
|
|
175
|
+
```json
|
|
176
|
+
{
|
|
177
|
+
"mcpServers": {
|
|
178
|
+
"primevue": {
|
|
179
|
+
"command": "npx",
|
|
180
|
+
"args": ["-y", "@primevue/mcp"]
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
After adding, the MCP server will be available in Cascade.
|
|
187
|
+
|
|
188
|
+
> **Reference:** [Windsurf MCP Documentation](https://docs.windsurf.com/windsurf/cascade/mcp)
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
### Zed
|
|
193
|
+
|
|
194
|
+
Add to your Zed settings (`~/.config/zed/settings.json` on Linux, `~/Library/Application Support/Zed/settings.json` on macOS):
|
|
195
|
+
|
|
196
|
+
```json
|
|
197
|
+
{
|
|
198
|
+
"context_servers": {
|
|
199
|
+
"primevue": {
|
|
200
|
+
"command": {
|
|
201
|
+
"path": "npx",
|
|
202
|
+
"args": ["-y", "@primevue/mcp"]
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
After adding, restart Zed. Check the Agent Panel's settings view - a green indicator dot next to "primevue" confirms the server is active.
|
|
210
|
+
|
|
211
|
+
> **Reference:** [Zed MCP Documentation](https://zed.dev/docs/ai/mcp)
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Available Tools
|
|
216
|
+
|
|
217
|
+
### Component Information
|
|
218
|
+
|
|
219
|
+
| Tool | Description |
|
|
220
|
+
| ----------------------- | -------------------------------------------- |
|
|
221
|
+
| `list_components` | List all PrimeVue components with categories |
|
|
222
|
+
| `get_component` | Get detailed info about a specific component |
|
|
223
|
+
| `search_components` | Search components by name or description |
|
|
224
|
+
| `get_component_props` | Get all props for a component |
|
|
225
|
+
| `get_component_events` | Get all events for a component |
|
|
226
|
+
| `get_component_methods` | Get all methods for a component |
|
|
227
|
+
| `get_component_slots` | Get all slots for a component |
|
|
228
|
+
| `compare_components` | Compare two components side by side |
|
|
229
|
+
| `get_categories` | Get all component categories |
|
|
230
|
+
|
|
231
|
+
### Code Examples
|
|
232
|
+
|
|
233
|
+
| Tool | Description |
|
|
234
|
+
| ----------------------------- | ----------------------------------------------- |
|
|
235
|
+
| `get_usage_example` | Get code examples for a component |
|
|
236
|
+
| `list_examples` | List all available code examples |
|
|
237
|
+
| `get_example` | Get a specific example by component and section |
|
|
238
|
+
| `generate_component_template` | Generate a basic component template |
|
|
239
|
+
|
|
240
|
+
### Theming & Styling
|
|
241
|
+
|
|
242
|
+
| Tool | Description |
|
|
243
|
+
| ----------------------- | ---------------------------------------------- |
|
|
244
|
+
| `get_component_pt` | Get Pass Through options for DOM customization |
|
|
245
|
+
| `get_component_tokens` | Get design tokens (CSS variables) |
|
|
246
|
+
| `get_component_styles` | Get CSS class names |
|
|
247
|
+
| `get_theming_info` | Get theming information |
|
|
248
|
+
| `get_theming_guide` | Get detailed theming guide |
|
|
249
|
+
| `get_passthrough_guide` | Get Pass Through customization guide |
|
|
250
|
+
| `get_tailwind_guide` | Get Tailwind CSS integration guide |
|
|
251
|
+
|
|
252
|
+
### Documentation & Guides
|
|
253
|
+
|
|
254
|
+
| Tool | Description |
|
|
255
|
+
| ------------------------- | --------------------------------------- |
|
|
256
|
+
| `list_guides` | List all guides and documentation pages |
|
|
257
|
+
| `get_guide` | Get a specific guide by name |
|
|
258
|
+
| `get_configuration` | Get PrimeVue configuration options |
|
|
259
|
+
| `get_installation` | Get installation instructions |
|
|
260
|
+
| `get_icons_guide` | Get icons usage guide |
|
|
261
|
+
| `get_accessibility_guide` | Get accessibility guide |
|
|
262
|
+
| `get_accessibility_info` | Get accessibility info for a component |
|
|
263
|
+
|
|
264
|
+
### Search & Discovery
|
|
265
|
+
|
|
266
|
+
| Tool | Description |
|
|
267
|
+
| ------------------------------ | ------------------------------------------- |
|
|
268
|
+
| `search_all` | Search across components, guides, and props |
|
|
269
|
+
| `suggest_component` | Suggest components based on use case |
|
|
270
|
+
| `find_by_prop` | Find components with a specific prop |
|
|
271
|
+
| `find_by_event` | Find components that emit a specific event |
|
|
272
|
+
| `find_components_with_feature` | Find components supporting a feature |
|
|
273
|
+
| `get_related_components` | Find related components |
|
|
274
|
+
|
|
275
|
+
### Utilities
|
|
276
|
+
|
|
277
|
+
| Tool | Description |
|
|
278
|
+
| ------------------------ | ----------------------------------------- |
|
|
279
|
+
| `get_component_url` | Get the official documentation URL |
|
|
280
|
+
| `get_component_import` | Get the correct import statement |
|
|
281
|
+
| `get_component_sections` | Get all sections/features for a component |
|
|
282
|
+
| `validate_props` | Validate props for a component |
|
|
283
|
+
| `export_component_docs` | Export documentation in markdown |
|
|
284
|
+
| `get_form_components` | Get all form input components |
|
|
285
|
+
| `get_data_components` | Get all data display components |
|
|
286
|
+
| `get_overlay_components` | Get all overlay/popup components |
|
|
287
|
+
| `get_performance_tips` | Get performance optimization tips |
|
|
288
|
+
| `get_version_info` | Get version and compatibility info |
|
|
289
|
+
|
|
290
|
+
### Vue Composables
|
|
291
|
+
|
|
292
|
+
| Tool | Description |
|
|
293
|
+
| ------------------ | --------------------------------------- |
|
|
294
|
+
| `list_composables` | List all PrimeVue composables |
|
|
295
|
+
| `get_composable` | Get details about a specific composable |
|
|
296
|
+
|
|
297
|
+
## Example Prompts
|
|
298
|
+
|
|
299
|
+
Once installed, try asking your AI assistant:
|
|
300
|
+
|
|
301
|
+
- "What are all the props available for the DataTable component?"
|
|
302
|
+
- "Show me how to implement row selection in DataTable"
|
|
303
|
+
- "How do I customize Button styles using Pass Through?"
|
|
304
|
+
- "What design tokens are available for the Card component?"
|
|
305
|
+
- "Find me a component for selecting multiple items from a list"
|
|
306
|
+
- "Compare AutoComplete and Select components"
|
|
307
|
+
|
|
308
|
+
## Requirements
|
|
309
|
+
|
|
310
|
+
- Node.js 18+
|
|
311
|
+
- One of the supported AI tools (Claude Code, VS Code + Copilot, Cursor, Windsurf, Claude Desktop)
|
|
312
|
+
|
|
313
|
+
## Links
|
|
314
|
+
|
|
315
|
+
- [PrimeVue Documentation](https://primevue.org/)
|
|
316
|
+
- [Model Context Protocol](https://modelcontextprotocol.io/)
|
|
317
|
+
- [GitHub Repository](https://github.com/primefaces/primevue)
|
|
318
|
+
- [Report Issues](https://github.com/primefaces/primevue/issues)
|
|
319
|
+
|
|
320
|
+
## License
|
|
321
|
+
|
|
322
|
+
MIT
|
package/dist/index.d.ts
ADDED