@treeui/mcp 0.1.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 ADDED
@@ -0,0 +1,56 @@
1
+ # @treeui/mcp
2
+
3
+ TreeUI ships a local Model Context Protocol server so coding agents can:
4
+
5
+ - search the TreeUI component catalog
6
+ - retrieve setup guidance for consumers
7
+ - compare similar components such as `TSelect` vs `TCombobox`
8
+ - read normalized machine-oriented metadata generated from `docs/ai`
9
+
10
+ ## What it serves
11
+
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
15
+
16
+ ## Local usage in this repository
17
+
18
+ ```bash
19
+ pnpm --filter @treeui/mcp start
20
+ ```
21
+
22
+ Claude Code can also pick it up automatically through the repository `.mcp.json`.
23
+
24
+ ## Build
25
+
26
+ ```bash
27
+ pnpm --filter @treeui/mcp build
28
+ ```
29
+
30
+ That command regenerates:
31
+
32
+ - `docs/ai/treeui.catalog.json`
33
+ - `packages/mcp/src/generated/treeui.catalog.json`
34
+
35
+ ## Tests
36
+
37
+ ```bash
38
+ pnpm --filter @treeui/mcp test
39
+ ```
40
+
41
+ The MCP integration test uses the SDK in-memory transport to validate the
42
+ protocol surface itself: tool listing, resource listing, tool calls, and
43
+ resource reads.
44
+
45
+ For release validation, also run a quick stdio smoke test against the compiled
46
+ CLI with `pnpm --filter @treeui/mcp build` followed by `node packages/mcp/dist/cli.js`.
47
+
48
+ ## Published package usage
49
+
50
+ Once published, consumers can add it as a stdio MCP server, for example:
51
+
52
+ ```bash
53
+ claude mcp add --transport stdio treeui -- npx -y @treeui/mcp
54
+ ```
55
+
56
+ Exact commands differ by client, but the package is intended to be usable as a local stdio server across coding agents that support MCP.