@a2uicatalog/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 +93 -0
- package/data/a2ui-state-v1.json +731 -0
- package/data/artemis-roadmap.json +341 -0
- package/data/atoms-index.json +4612 -0
- package/data/expenses-demo.json +140 -0
- package/data/spec.json +14644 -0
- package/demo.mjs +63 -0
- package/package.json +25 -0
- package/scripts/sync-data.mjs +47 -0
- package/server.mjs +235 -0
- package/test.mjs +70 -0
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# a2uicatalog-mcp — build live Google Apps Script web apps from your agent
|
|
2
|
+
|
|
3
|
+
**A2UI over MCP. Author, validate, deploy — no code.**
|
|
4
|
+
|
|
5
|
+
A local MCP server that gives any MCP-capable agent (Claude Desktop, Cursor, …)
|
|
6
|
+
a first-class Apps Script dev loop: browse the A2UI vocabulary, validate a wired
|
|
7
|
+
payload, and **deploy it to a live Google Apps Script web app** — returning a URL.
|
|
8
|
+
|
|
9
|
+
It's the agent-native way to build living, stateful GAS web apps: the agent
|
|
10
|
+
speaks the vocabulary, the parser catches mistakes (a hallucinated atom is a
|
|
11
|
+
parse error, not a broken screen), and `build_app` ships it.
|
|
12
|
+
|
|
13
|
+
## Tools
|
|
14
|
+
|
|
15
|
+
| Tool | What it does |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `list_atoms` | Browse the atom vocabulary (`a2ui-atoms-v1`, compact descriptions) |
|
|
18
|
+
| `validate_payload` | Structural validation against **both** catalogs — atoms (`a2ui-atoms-v1`) + state primitives (`a2ui-state-v1`). No execution. |
|
|
19
|
+
| `encode_url` | gzip+base64url a payload into a renderer `?p=` preview URL |
|
|
20
|
+
| `get_ui` | Serve a reference wired A2UI surface as an `EmbeddedResource` (`application/a2ui+json`) |
|
|
21
|
+
| **`build_app`** | **Deploy a `training.md` to YOUR Apps Script → live GAS web app URL** |
|
|
22
|
+
|
|
23
|
+
Plus MCP **Resources** (`a2ui://<name>`) exposing reference wired UIs.
|
|
24
|
+
|
|
25
|
+
## Security — BYO, local, no shared secret
|
|
26
|
+
|
|
27
|
+
This is a **local dev tool**. It deploys to **your own** Apps Script using
|
|
28
|
+
**your own** token, read from your environment — never bundled, never a shared
|
|
29
|
+
hosted server. Nothing leaves your machine except the authenticated call to your
|
|
30
|
+
own Build API.
|
|
31
|
+
|
|
32
|
+
- `validate_payload` / `list_atoms` / `encode_url` are pure-local (no network, no secret).
|
|
33
|
+
- `build_app` requires two env vars **you** set, pointing at **your** deployment.
|
|
34
|
+
|
|
35
|
+
## Install
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install -g @a2uicatalog/mcp
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`list_atoms` / `get_atom_schema` / `validate_payload` / `encode_url` / `get_ui`
|
|
42
|
+
work immediately — no setup, no account. `build_app` (deploy to your own
|
|
43
|
+
Apps Script) needs the two env vars below.
|
|
44
|
+
|
|
45
|
+
Add to Claude Desktop (`claude_desktop_config.json`):
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"mcpServers": {
|
|
50
|
+
"a2ui": {
|
|
51
|
+
"command": "npx",
|
|
52
|
+
"args": ["-y", "@a2uicatalog/mcp"],
|
|
53
|
+
"env": {
|
|
54
|
+
"BUILD_API_URL": "https://script.google.com/macros/s/<your-api-deployment>/exec",
|
|
55
|
+
"BUILD_API_TOKEN": "<your token>"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Set your Build API endpoint + token (from your own A2UI Apps Script deployment,
|
|
63
|
+
only needed for `build_app`):
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
export BUILD_API_URL="https://script.google.com/macros/s/<your-api-deployment>/exec"
|
|
67
|
+
export BUILD_API_TOKEN="<your A2UI_API_TOKEN>" # minted via ?api_setup=1 on your deployment
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Developing from a checkout of this repo
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cd mcp && npm install
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Then point `claude_desktop_config.json`'s `command`/`args` at
|
|
77
|
+
`node /absolute/path/to/mcp/server.mjs` instead of the `npx` form above.
|
|
78
|
+
|
|
79
|
+
## The loop
|
|
80
|
+
|
|
81
|
+
1. `list_atoms` — the agent learns the vocabulary
|
|
82
|
+
2. compose a `training.md` (or a wired payload)
|
|
83
|
+
3. `validate_payload` — catch atom/wire errors before deploying
|
|
84
|
+
4. `build_app` — **live Apps Script URL back**
|
|
85
|
+
|
|
86
|
+
Start with the GAS surface; the same payloads render across web, Meet, email,
|
|
87
|
+
and PDF — portability is the expansion, not a rewrite.
|
|
88
|
+
|
|
89
|
+
## Status
|
|
90
|
+
|
|
91
|
+
v0.1.0 — first public release. GAS-first, local stdio, fully self-contained
|
|
92
|
+
(bundles its own catalog snapshot, no network for the read-only tools).
|
|
93
|
+
Catalogs: `a2ui-atoms-v1` (474 atoms) + `a2ui-state-v1` (25 primitives).
|