@llui/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 +65 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,13 +1,75 @@
1
1
  # @llui/mcp
2
2
 
3
- [Model Context Protocol](https://spec.modelcontextprotocol.io/) server for [LLui](https://github.com/fponticelli/llui).
4
-
5
- Exposes LLui debug tools as MCP resources for LLM-assisted development.
3
+ [Model Context Protocol](https://spec.modelcontextprotocol.io/) server for [LLui](https://github.com/fponticelli/llui). Exposes debug tools for LLM-assisted development.
6
4
 
7
5
  ```bash
8
6
  pnpm add -D @llui/mcp
9
7
  ```
10
8
 
9
+ ## Usage
10
+
11
+ The MCP server auto-connects to running LLui apps via the vite-plugin's `mcpPort` bridge (default port 5200). No manual setup needed -- just enable the plugin and point your MCP client at the server.
12
+
13
+ ```ts
14
+ // vite.config.ts -- MCP is enabled by default
15
+ import llui from '@llui/vite-plugin'
16
+ export default defineConfig({ plugins: [llui({ mcpPort: 5200 })] })
17
+ ```
18
+
19
+ ## Tools
20
+
21
+ ### State Inspection
22
+
23
+ | Tool | Description |
24
+ | ---------------- | ---------------------------------- |
25
+ | `get_state` | Get current component state |
26
+ | `describe_state` | Describe state shape and types |
27
+ | `search_state` | Search state tree by path or value |
28
+
29
+ ### Messaging
30
+
31
+ | Tool | Description |
32
+ | ------------------ | ---------------------------------------- |
33
+ | `send_message` | Dispatch a message to the component |
34
+ | `validate_message` | Check if a message matches the Msg union |
35
+
36
+ ### History and Replay
37
+
38
+ | Tool | Description |
39
+ | --------------------- | -------------------------------------- |
40
+ | `get_message_history` | List all dispatched messages |
41
+ | `export_trace` | Export message trace for `replayTrace` |
42
+ | `replay_trace` | Replay a trace and compare states |
43
+
44
+ ### Bindings and DOM
45
+
46
+ | Tool | Description |
47
+ | ---------------- | ---------------------------------------------- |
48
+ | `get_bindings` | List all active bindings and their masks |
49
+ | `why_did_update` | Explain which state change triggered a binding |
50
+ | `trace_element` | Trace a DOM element back to its binding |
51
+
52
+ ### Bitmask Debugging
53
+
54
+ | Tool | Description |
55
+ | ------------- | -------------------------------------- |
56
+ | `decode_mask` | Decode a bitmask into state path names |
57
+ | `mask_legend` | Show the full bit-to-path mapping |
58
+
59
+ ### Snapshots
60
+
61
+ | Tool | Description |
62
+ | ---------------- | ----------------------------------- |
63
+ | `snapshot_state` | Save a named state snapshot |
64
+ | `restore_state` | Restore a previously saved snapshot |
65
+
66
+ ### Multi-Mount
67
+
68
+ | Tool | Description |
69
+ | ------------------ | ------------------------------------------ |
70
+ | `list_components` | List all mounted component instances |
71
+ | `select_component` | Select a component for subsequent commands |
72
+
11
73
  ## License
12
74
 
13
75
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llui/mcp",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "bin": {