@loomweaver/mcp 0.7.2
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 +62 -0
- package/dist/main.mjs +33229 -0
- package/package.json +34 -0
package/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# @loomweaver/mcp
|
|
2
|
+
|
|
3
|
+
An MCP server that exposes LoomWeaver's scaffolding + validation to AI assistants. A thin,
|
|
4
|
+
transport-neutral wrapper over `@loomweaver/devkit`'s pure generation + validation cores — so an agent that
|
|
5
|
+
is not inside this repo (a chat assistant, a remote client) can scaffold and validate over the wire.
|
|
6
|
+
|
|
7
|
+
## Tools
|
|
8
|
+
|
|
9
|
+
- `list_generators` — the available generators.
|
|
10
|
+
- `scaffold_weaver` · `scaffold_frame_plugin` · `scaffold_distribution` · `scaffold_auth_source` ·
|
|
11
|
+
`scaffold_settings_store` · `scaffold_theme` · `scaffold_layout` — return a **file map**
|
|
12
|
+
(`path -> content`); the client writes the files into its project.
|
|
13
|
+
- `validate_manifest` · `validate_i18n` · `validate_catalog` — return structured `Finding[]`.
|
|
14
|
+
|
|
15
|
+
## Consume from npm (product repos)
|
|
16
|
+
|
|
17
|
+
> **Availability:** the `@loomweaver/*` packages are not on the public npm registry yet — the first
|
|
18
|
+
> public release publishes them. Until then they come from LoomWeaver's own package feed, and
|
|
19
|
+
> `npx` needs that registry configured for the `@loomweaver` scope.
|
|
20
|
+
|
|
21
|
+
`@loomweaver/mcp` ships as a self-contained bundle (devkit + the MCP SDK are inlined — no transitive
|
|
22
|
+
install). A product repo that already consumes `@loomweaver/shell` / `@loomweaver/plugin-sdk` just adds the
|
|
23
|
+
server to its `.mcp.json`; `npx` fetches the bundle and starts the stdio server:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"mcpServers": {
|
|
28
|
+
"loomweaver": { "command": "npx", "args": ["-y", "@loomweaver/mcp"] }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The AI assistant in that repo then has `scaffold_*` + `validate_*` — scaffolding LoomWeaver weavers,
|
|
34
|
+
distributions, and integrations without LoomWeaver's Nx workspace or a local devkit checkout.
|
|
35
|
+
|
|
36
|
+
## Run locally (stdio, from source)
|
|
37
|
+
|
|
38
|
+
From the Nx workspace root (`platform/`):
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
nx bundle mcp # bundles a self-contained dist/main.mjs
|
|
42
|
+
node libs/tooling/mcp/dist/main.mjs # start the stdio server
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
To point a client at the local build instead of the published package, use a repo-root-relative path (an MCP
|
|
46
|
+
client resolves `args` from the repo root):
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"mcpServers": {
|
|
51
|
+
"loomweaver": { "command": "node", "args": ["platform/libs/tooling/mcp/dist/main.mjs"] }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Architecture
|
|
57
|
+
|
|
58
|
+
- `src/lib/tools.ts` — transport-neutral tool handlers over `@loomweaver/devkit` (unit-tested; no SDK/zod).
|
|
59
|
+
- `src/lib/server.ts` — the MCP wiring + zod input schemas.
|
|
60
|
+
- `src/main.ts` — the stdio entry (bin `loomweaver-mcp`).
|
|
61
|
+
|
|
62
|
+
A remote/HTTP transport is a thin later addition over the same `createMcpServer()`.
|