@treeui/mcp 0.4.0 → 0.5.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 CHANGED
@@ -5,13 +5,37 @@ TreeUI ships a local Model Context Protocol server so coding agents can:
5
5
  - search the TreeUI component catalog
6
6
  - retrieve setup guidance for consumers
7
7
  - compare similar components such as `TSelect` vs `TCombobox`
8
+ - look up `--tree-*` design tokens before hardcoding a value
8
9
  - read normalized machine-oriented metadata generated from `docs/ai`
9
10
 
10
11
  ## What it serves
11
12
 
12
- - a generated catalog built from `docs/ai/*.yaml`
13
- - MCP resources for catalog, setup, selection, recipes, and per-component metadata
14
- - MCP tools for search, recommendation, setup lookup, and recipe search
13
+ - a generated catalog built from `docs/ai/*.yaml` and `@treeui/tokens`
14
+ - MCP resources for catalog, setup, selection, recipes, tokens, and per-component metadata
15
+ - MCP tools for search, recommendation, setup lookup, recipe search, and token search
16
+
17
+ ## Token search
18
+
19
+ `search_tokens` matches a query against the CSS variable, the token
20
+ category/path, and the value the token actually ships, so a literal found in
21
+ consumer code resolves back to the token that already provides it:
22
+
23
+ ```
24
+ search_tokens("space") -> --tree-space-0 … --tree-space-16
25
+ search_tokens("status") -> --tree-color-status-success | warning | error | info
26
+ search_tokens("#0969da") -> --tree-color-brand-primary (light #0969da | dark #539bf5)
27
+ search_tokens("64rem") -> --tree-breakpoint-lg (1024px)
28
+ search_tokens("--tree-gradient-brand") -> --tree-gradient-brand
29
+ ```
30
+
31
+ Themed tokens report every theme value, and `rem`/`px` length queries are
32
+ matched in both units.
33
+
34
+ The token entries are derived from `treeTokens`/`treeThemes` in
35
+ `@treeui/tokens` using the same path-to-variable-name rule as
36
+ `packages/tokens/src/css.ts`, so they cannot drift from the shipped stylesheet.
37
+ `catalog.test.ts` enforces that by diffing the emitted variables and values
38
+ against `createFoundationCss()` and `createThemeCss()`.
15
39
 
16
40
  ## Local usage in this repository
17
41