@punica/components-mcp 0.0.0-stage → 0.1.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 +21 -0
- package/README.md +48 -2
- package/dist/bundled.json +1 -0
- package/dist/custom-elements.json +38745 -0
- package/dist/guide.md +118 -0
- package/dist/server.mjs +779 -0
- package/package.json +45 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2026 PunicaLab
|
|
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 all
|
|
13
|
+
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 THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,49 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @punica/components-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An [MCP](https://modelcontextprotocol.io) server that lets an AI assistant
|
|
4
|
+
use [@punica/components](https://components.punicalab.com) correctly: find an
|
|
5
|
+
element, read its exact API and examples, and check the markup it wrote.
|
|
6
|
+
|
|
7
|
+
Version 2.0 of the library is newer than most models' training data, so
|
|
8
|
+
without it a model guesses tags, attributes and events. With it, the model
|
|
9
|
+
looks them up and validates its answer.
|
|
10
|
+
|
|
11
|
+
## Tools
|
|
12
|
+
|
|
13
|
+
| Tool | What it does |
|
|
14
|
+
|---|---|
|
|
15
|
+
| `search_components` | Finds elements by what they are for: "date range", "side navigation", "confirm dialog" |
|
|
16
|
+
| `get_component` | One or more elements' whole API: attributes and their values, properties, methods, events, slots, parts, CSS properties, states |
|
|
17
|
+
| `get_examples` | An element's documentation page as Markdown, with working HTML examples (fetched from the docs site) |
|
|
18
|
+
| `validate_markup` | Checks HTML, JSX, Vue or script: unknown tags and 1.x names, attributes, values, slots, events, icon names; each problem with a fix |
|
|
19
|
+
| `get_guide` | The rules every element follows, or a guide page (theme, forms, frameworks, migration, accessibility, …) |
|
|
20
|
+
|
|
21
|
+
Resources: `punica://guide` and `punica://component/<tag>`.
|
|
22
|
+
|
|
23
|
+
The server answers for the `@punica/components` installed in the project it
|
|
24
|
+
is started in; without one, for the version it was built with.
|
|
25
|
+
|
|
26
|
+
## Set up
|
|
27
|
+
|
|
28
|
+
**Claude Code**
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
claude mcp add punica -- npx -y @punica/components-mcp
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Cursor** (`.cursor/mcp.json`), **VS Code** (`.vscode/mcp.json`, key `servers`), **Claude Desktop** and others:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"mcpServers": {
|
|
39
|
+
"punica": { "command": "npx", "args": ["-y", "@punica/components-mcp"] }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Without MCP
|
|
45
|
+
|
|
46
|
+
The library itself ships the same knowledge:
|
|
47
|
+
`npx punica-components search|info|validate`, an agent skill in
|
|
48
|
+
`node_modules/@punica/components/skills/punica-components/`, and
|
|
49
|
+
`dist/llms.txt` / `dist/llms-full.txt`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"2.1.1"}
|