@senvenli/mcp 0.0.0-stage → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Senvenli
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,42 @@
1
- # Temporary Holding Version
1
+ # @senvenli/mcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ An MCP server for building with Senvenli UI from AI coding agents. It answers from data bundled with the package:
4
+ every component's page, manifest and example code, the docs, and the theme engine. It is read-only: no file writes,
5
+ no network calls.
6
+
7
+ ## Tools
8
+
9
+ | Tool | What it returns |
10
+ | --- | --- |
11
+ | `search_components` | Components for a purpose ("date range", "confirm a delete") or an export name, best match first, with the import. |
12
+ | `list_components` | Every component, or one family, with a one-line description. |
13
+ | `get_component` | A component's page as Markdown: import, example code, guidelines, accessibility, props. `sections` picks parts. |
14
+ | `get_component_manifest` | The manifest as JSON. `props`: `own`, `own+aria` (default) or `all`; `minified` (default true). |
15
+ | `get_doc` | A doc: getting started, theming, dark mode, languages and RTL, native apps, agents, design rules, accessibility. |
16
+ | `create_theme` | A theme from up to three colors: the WCAG AA report, a preset code and the CLI command (default), or the CSS / native hex. |
17
+ | `validate_theme` | The WCAG AA report for a `theme.css`: failing pairs and missing tokens, light and dark. |
18
+
19
+ Prompts: `build_form`, `theme_app`. Resources: `senvenli://components/<name>`, `senvenli://docs/<name>`.
20
+
21
+ Colors are `#rrggbb`, `#rgb` or `oklch(L C H)`; anything else is an error, never silently ignored. Every component
22
+ answer stays under 20,000 characters (a test holds it there).
23
+
24
+ ## Local (stdio)
25
+
26
+ ```sh
27
+ claude mcp add senvenli-ui -- npx -y @senvenli/mcp
28
+ ```
29
+
30
+ Other clients (Cursor, VS Code, Windsurf): see https://design.senvenli.com/docs/agents.
31
+
32
+ ## Hosted (Streamable HTTP)
33
+
34
+ `node dist/http.js` serves `POST /mcp`, stateless, on `HOST:PORT` (default `127.0.0.1:8787`). Put a proxy in front
35
+ for public use; `HOST=0.0.0.0` listens on every interface.
36
+
37
+ ## Development
38
+
39
+ ```sh
40
+ pnpm --filter @senvenli/mcp build # bundles data/registry.json, then compiles
41
+ pnpm vitest run packages/mcp # rebuilds the data, then tests the tools
42
+ ```