@primevue/mcp 0.0.1-alpha.1
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/LICENSE.md +21 -0
- package/README.md +279 -0
- package/data/components.json +40160 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +129 -0
- package/package.json +60 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018-2025 PrimeTek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
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
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
The easiest way to use this MCP server is with `npx` - no installation required:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @primevue/mcp
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
### Claude Code
|
|
20
|
+
|
|
21
|
+
Add the PrimeVue MCP server using the CLI:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Add to your user config (available in all projects)
|
|
25
|
+
claude mcp add primevue -s user -- npx -y @primevue/mcp
|
|
26
|
+
|
|
27
|
+
# Or add to current project only
|
|
28
|
+
claude mcp add primevue -- npx -y @primevue/mcp
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Alternatively, use the JSON format for more control:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
claude mcp add-json primevue '{"command":"npx","args":["-y","@primevue/mcp"]}' -s user
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Useful commands:**
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
claude mcp list # List all MCP servers
|
|
41
|
+
claude mcp get primevue # Get server details
|
|
42
|
+
claude mcp remove primevue # Remove the server
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
After adding, start a new Claude Code session and use `/mcp` to verify the connection.
|
|
46
|
+
|
|
47
|
+
> **Reference:** [Claude Code MCP Documentation](https://code.claude.com/docs/en/mcp)
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
### Cursor
|
|
52
|
+
|
|
53
|
+
**Option 1: Project Configuration**
|
|
54
|
+
|
|
55
|
+
Create `.cursor/mcp.json` in your project:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"mcpServers": {
|
|
60
|
+
"primevue": {
|
|
61
|
+
"command": "npx",
|
|
62
|
+
"args": ["-y", "@primevue/mcp"]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Option 2: Global Configuration**
|
|
69
|
+
|
|
70
|
+
Create or edit `~/.cursor/mcp.json` in your home directory:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"mcpServers": {
|
|
75
|
+
"primevue": {
|
|
76
|
+
"command": "npx",
|
|
77
|
+
"args": ["-y", "@primevue/mcp"]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Option 3: Via Settings UI**
|
|
84
|
+
|
|
85
|
+
1. Go to **Cursor Settings** > **Tools & Integrations**
|
|
86
|
+
2. Click **New MCP Server**
|
|
87
|
+
3. Add the configuration above
|
|
88
|
+
|
|
89
|
+
After adding, go to **Settings > MCP** and click the refresh button. The Composer Agent will automatically use PrimeVue tools when relevant.
|
|
90
|
+
|
|
91
|
+
> **Reference:** [Cursor MCP Documentation](https://docs.cursor.com/context/model-context-protocol)
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
### OpenAI Codex CLI
|
|
96
|
+
|
|
97
|
+
**Option 1: Using the CLI**
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
codex mcp add primevue -- npx -y @primevue/mcp
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Option 2: Direct Configuration**
|
|
104
|
+
|
|
105
|
+
Edit `~/.codex/config.toml`:
|
|
106
|
+
|
|
107
|
+
```toml
|
|
108
|
+
[mcp_servers.primevue]
|
|
109
|
+
command = "npx"
|
|
110
|
+
args = ["-y", "@primevue/mcp"]
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
After adding, the MCP server will be available in both the Codex CLI and VS Code extension.
|
|
114
|
+
|
|
115
|
+
> **Reference:** [OpenAI Codex MCP Documentation](https://developers.openai.com/codex/mcp/)
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
### Windsurf
|
|
120
|
+
|
|
121
|
+
**Option 1: Via Settings UI**
|
|
122
|
+
|
|
123
|
+
1. Click **Windsurf - Settings** (bottom right) or press `Cmd+Shift+P` / `Ctrl+Shift+P`
|
|
124
|
+
2. Type "Open Windsurf Settings"
|
|
125
|
+
3. Navigate to **Cascade** section
|
|
126
|
+
4. Click **Manage MCPs** > **View raw config**
|
|
127
|
+
|
|
128
|
+
**Option 2: Direct Configuration**
|
|
129
|
+
|
|
130
|
+
Edit `~/.codeium/windsurf/mcp_config.json`:
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"mcpServers": {
|
|
135
|
+
"primevue": {
|
|
136
|
+
"command": "npx",
|
|
137
|
+
"args": ["-y", "@primevue/mcp"]
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
After adding, the MCP server will be available in Cascade.
|
|
144
|
+
|
|
145
|
+
> **Reference:** [Windsurf MCP Documentation](https://docs.windsurf.com/windsurf/cascade/mcp)
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
### Zed
|
|
150
|
+
|
|
151
|
+
Add to your Zed settings (`~/.config/zed/settings.json` on Linux, `~/Library/Application Support/Zed/settings.json` on macOS):
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"context_servers": {
|
|
156
|
+
"primevue": {
|
|
157
|
+
"command": {
|
|
158
|
+
"path": "npx",
|
|
159
|
+
"args": ["-y", "@primevue/mcp"]
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
After adding, restart Zed. Check the Agent Panel's settings view - a green indicator dot next to "primevue" confirms the server is active.
|
|
167
|
+
|
|
168
|
+
> **Reference:** [Zed MCP Documentation](https://zed.dev/docs/ai/mcp)
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Available Tools
|
|
173
|
+
|
|
174
|
+
### Component Information
|
|
175
|
+
|
|
176
|
+
| Tool | Description |
|
|
177
|
+
| ----------------------- | -------------------------------------------- |
|
|
178
|
+
| `list_components` | List all PrimeVue components with categories |
|
|
179
|
+
| `get_component` | Get detailed info about a specific component |
|
|
180
|
+
| `search_components` | Search components by name or description |
|
|
181
|
+
| `get_component_props` | Get all props for a component |
|
|
182
|
+
| `get_component_events` | Get all events for a component |
|
|
183
|
+
| `get_component_methods` | Get all methods for a component |
|
|
184
|
+
| `get_component_slots` | Get all slots for a component |
|
|
185
|
+
| `compare_components` | Compare two components side by side |
|
|
186
|
+
| `get_categories` | Get all component categories |
|
|
187
|
+
|
|
188
|
+
### Code Examples
|
|
189
|
+
|
|
190
|
+
| Tool | Description |
|
|
191
|
+
| ----------------------------- | ----------------------------------------------- |
|
|
192
|
+
| `get_usage_example` | Get code examples for a component |
|
|
193
|
+
| `list_examples` | List all available code examples |
|
|
194
|
+
| `get_example` | Get a specific example by component and section |
|
|
195
|
+
| `generate_component_template` | Generate a basic component template |
|
|
196
|
+
|
|
197
|
+
### Theming & Styling
|
|
198
|
+
|
|
199
|
+
| Tool | Description |
|
|
200
|
+
| ----------------------- | ---------------------------------------------- |
|
|
201
|
+
| `get_component_pt` | Get Pass Through options for DOM customization |
|
|
202
|
+
| `get_component_tokens` | Get design tokens (CSS variables) |
|
|
203
|
+
| `get_component_styles` | Get CSS class names |
|
|
204
|
+
| `get_theming_info` | Get theming information |
|
|
205
|
+
| `get_theming_guide` | Get detailed theming guide |
|
|
206
|
+
| `get_passthrough_guide` | Get Pass Through customization guide |
|
|
207
|
+
| `get_tailwind_guide` | Get Tailwind CSS integration guide |
|
|
208
|
+
|
|
209
|
+
### Documentation & Guides
|
|
210
|
+
|
|
211
|
+
| Tool | Description |
|
|
212
|
+
| ------------------------- | --------------------------------------- |
|
|
213
|
+
| `list_guides` | List all guides and documentation pages |
|
|
214
|
+
| `get_guide` | Get a specific guide by name |
|
|
215
|
+
| `get_configuration` | Get PrimeVue configuration options |
|
|
216
|
+
| `get_installation` | Get installation instructions |
|
|
217
|
+
| `get_icons_guide` | Get icons usage guide |
|
|
218
|
+
| `get_accessibility_guide` | Get accessibility guide |
|
|
219
|
+
| `get_accessibility_info` | Get accessibility info for a component |
|
|
220
|
+
|
|
221
|
+
### Search & Discovery
|
|
222
|
+
|
|
223
|
+
| Tool | Description |
|
|
224
|
+
| ------------------------------ | ------------------------------------------- |
|
|
225
|
+
| `search_all` | Search across components, guides, and props |
|
|
226
|
+
| `suggest_component` | Suggest components based on use case |
|
|
227
|
+
| `find_by_prop` | Find components with a specific prop |
|
|
228
|
+
| `find_by_event` | Find components that emit a specific event |
|
|
229
|
+
| `find_components_with_feature` | Find components supporting a feature |
|
|
230
|
+
| `get_related_components` | Find related components |
|
|
231
|
+
|
|
232
|
+
### Utilities
|
|
233
|
+
|
|
234
|
+
| Tool | Description |
|
|
235
|
+
| ------------------------ | ----------------------------------------- |
|
|
236
|
+
| `get_component_url` | Get the official documentation URL |
|
|
237
|
+
| `get_component_import` | Get the correct import statement |
|
|
238
|
+
| `get_component_sections` | Get all sections/features for a component |
|
|
239
|
+
| `validate_props` | Validate props for a component |
|
|
240
|
+
| `export_component_docs` | Export documentation in markdown |
|
|
241
|
+
| `get_form_components` | Get all form input components |
|
|
242
|
+
| `get_data_components` | Get all data display components |
|
|
243
|
+
| `get_overlay_components` | Get all overlay/popup components |
|
|
244
|
+
| `get_performance_tips` | Get performance optimization tips |
|
|
245
|
+
| `get_version_info` | Get version and compatibility info |
|
|
246
|
+
|
|
247
|
+
### Vue Composables
|
|
248
|
+
|
|
249
|
+
| Tool | Description |
|
|
250
|
+
| ------------------ | --------------------------------------- |
|
|
251
|
+
| `list_composables` | List all PrimeVue composables |
|
|
252
|
+
| `get_composable` | Get details about a specific composable |
|
|
253
|
+
|
|
254
|
+
## Example Prompts
|
|
255
|
+
|
|
256
|
+
Once installed, try asking your AI assistant:
|
|
257
|
+
|
|
258
|
+
- "Show me how to use the DataTable component with sorting and filtering"
|
|
259
|
+
- "What props does the Button component have?"
|
|
260
|
+
- "How do I customize the Dialog component styling with Pass Through?"
|
|
261
|
+
- "Compare the Select and Listbox components"
|
|
262
|
+
- "What's the best component for a date picker?"
|
|
263
|
+
- "Show me examples of the Toast composable"
|
|
264
|
+
|
|
265
|
+
## Requirements
|
|
266
|
+
|
|
267
|
+
- Node.js 18+
|
|
268
|
+
- One of the supported AI tools (Claude Code, VS Code + Copilot, Cursor, Windsurf, Claude Desktop)
|
|
269
|
+
|
|
270
|
+
## Links
|
|
271
|
+
|
|
272
|
+
- [PrimeVue Documentation](https://primevue.org/)
|
|
273
|
+
- [Model Context Protocol](https://modelcontextprotocol.io/)
|
|
274
|
+
- [GitHub Repository](https://github.com/primefaces/primevue)
|
|
275
|
+
- [Report Issues](https://github.com/primefaces/primevue/issues)
|
|
276
|
+
|
|
277
|
+
## License
|
|
278
|
+
|
|
279
|
+
MIT
|