@umbraco-automate/mcp 17.6.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Umbraco HQ
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,218 @@
1
+ # @umbraco-automate/mcp
2
+
3
+ An [MCP](https://modelcontextprotocol.io) server for **Umbraco Automate**. Point it at an Umbraco
4
+ instance and your AI assistant can build and publish automations, wire up their steps and
5
+ triggers, manage connections and workspaces, inspect and control runs, handle approvals, and roll
6
+ back to earlier versions — 62 Automate tools across 8 collections, plus a server-info tool.
7
+
8
+ Built on [`@umbraco-cms/mcp-server-sdk`](https://www.npmjs.com/package/@umbraco-cms/mcp-server-sdk).
9
+
10
+ > **Renamed:** this package was previously published as `@umbraco-automate/mcp-dev`. If your MCP
11
+ > client config still names it, change it to `@umbraco-automate/mcp` (Umbraco 18) or
12
+ > `@umbraco-automate/mcp@lts-17` (Umbraco 17). The command (`automate-mcp-server`) is unchanged.
13
+
14
+ ## Requirements
15
+
16
+ - **Node.js 22.23.4+, 24.22.1+ or 26.12.1+**. Earlier releases are affected by [CVE-2026-111497](https://nodejs.org/en/blog/vulnerability/october-2026-security-releases) (Brotli decoder out-of-bounds write), which Node's built-in `fetch` reaches when it decompresses a Brotli response from Umbraco. Upgrading Node.js is the only fix.
17
+ - An **Umbraco instance with Umbraco Automate installed**, reachable over HTTP(S)
18
+ - An **API user** on that instance (see below)
19
+
20
+ This version targets **Umbraco 17** with Umbraco Automate 17.x. Connecting to a different major
21
+ version warns and blocks the first tool call; set `UMBRACO_EXPECTED_MAJOR` to override if you know
22
+ what you're doing.
23
+
24
+ ### Which version for which Umbraco
25
+
26
+ | Umbraco | Umbraco Automate | Package |
27
+ |---------|------------------|---------|
28
+ | 18 | 18.x | `@umbraco-automate/mcp` (18.x) |
29
+ | **17** | **17.x** | **`@umbraco-automate/mcp@lts-17`** |
30
+
31
+ Install the version that matches your site's Umbraco major — the API client and the version check
32
+ differ between them.
33
+
34
+ The Umbraco 17 line is published under its own `lts-17` dist-tags, so it never takes over `latest`
35
+ or `beta` from the Umbraco 18 line. Install `@lts-17`.
36
+
37
+ Every Automate 17.x release works. A few features arrived partway through the line (17.N ships the
38
+ same features as 18.N); on older versions the tools refuse them with a clear message, or fall back:
39
+
40
+ | Feature | Automate 17.x | Automate 18.x | Older versions |
41
+ |---------|---------------|---------------|----------------|
42
+ | Request Approval `approved`/`rejected` outputs | 17.2+ | 18.2+ | One output that runs on approval; `rejected` refused |
43
+ | Container (While/ForEach/Parallel) `done` output | 17.3+ | 18.3+ | `done` refused; connect steps inside the `body` |
44
+ | `get-automation-webhook-url` reported by Umbraco | 17.4+ | 18.4+ | URL derived from `UMBRACO_BASE_URL`, with a note |
45
+ | Trigger `supportsManualRun` | 17.4+ | 18.4+ | Field omitted from `list-catalogue-triggers` |
46
+
47
+ ## 1. Create an API user in Umbraco
48
+
49
+ In the Umbraco backoffice:
50
+
51
+ 1. Go to **Settings → Users**
52
+ 2. Create a new **API user**
53
+ 3. Note its **Client ID** and **Client Secret**
54
+ 4. Grant it permissions for the Automate sections you want the assistant to reach
55
+
56
+ The server authenticates with those credentials via OAuth client credentials.
57
+
58
+ ## 2. Add it to your MCP client
59
+
60
+ ### Claude Code / Claude Desktop
61
+
62
+ Add to your `.mcp.json` (or `claude_desktop_config.json`):
63
+
64
+ ```json
65
+ {
66
+ "mcpServers": {
67
+ "umbraco-automate": {
68
+ "command": "npx",
69
+ "args": ["-y", "@umbraco-automate/mcp@lts-17"],
70
+ "env": {
71
+ "UMBRACO_BASE_URL": "https://your-site.example.com",
72
+ "UMBRACO_CLIENT_ID": "your-client-id",
73
+ "UMBRACO_CLIENT_SECRET": "your-client-secret"
74
+ }
75
+ }
76
+ }
77
+ }
78
+ ```
79
+
80
+ Restart your client and the tools appear.
81
+
82
+ ### Any other MCP client
83
+
84
+ The server speaks MCP over stdio. Run it however your client spawns servers:
85
+
86
+ ```bash
87
+ UMBRACO_BASE_URL=https://your-site.example.com \
88
+ UMBRACO_CLIENT_ID=your-client-id \
89
+ UMBRACO_CLIENT_SECRET=your-client-secret \
90
+ npx -y @umbraco-automate/mcp@lts-17
91
+ ```
92
+
93
+ ### Local Umbraco with a self-signed certificate
94
+
95
+ Add `"NODE_TLS_REJECT_UNAUTHORIZED": "0"` to `env`. Only do this against local development
96
+ instances — it disables certificate verification process-wide.
97
+
98
+ ## 3. Check it works
99
+
100
+ Without wiring up a client:
101
+
102
+ ```bash
103
+ # List every tool this server exposes
104
+ npx -y @umbraco-automate/mcp@lts-17 --list-tools
105
+
106
+ # Show resolved configuration and where each value came from
107
+ npx -y @umbraco-automate/mcp@lts-17 --debug-config
108
+
109
+ # Call a tool directly
110
+ UMBRACO_BASE_URL=... UMBRACO_CLIENT_ID=... UMBRACO_CLIENT_SECRET=... \
111
+ npx -y @umbraco-automate/mcp@lts-17 --call list-automations --call-args '{}'
112
+ ```
113
+
114
+ `--describe-tool <name>` prints a single tool's full input schema.
115
+
116
+ ## Configuration
117
+
118
+ Every option is an environment variable, and most also have a CLI flag (`--help` lists them).
119
+
120
+ CLI flags win over environment variables, and environment variables (including your MCP
121
+ client's `env` block) win over a `.env` file in the working directory. A file passed with
122
+ `--env <path>` overrides both the environment and `./.env`.
123
+
124
+ ### Connection
125
+
126
+ | Variable | Required | Purpose |
127
+ |----------|----------|---------|
128
+ | `UMBRACO_BASE_URL` | yes | Base URL of your Umbraco instance |
129
+ | `UMBRACO_CLIENT_ID` | yes | API user's client ID |
130
+ | `UMBRACO_CLIENT_SECRET` | yes | API user's client secret |
131
+ | `UMBRACO_EXPECTED_MAJOR` | no | Override the expected Umbraco major version |
132
+
133
+ ### Limiting the tool surface
134
+
135
+ 63 tools is a lot of context. Narrow it down:
136
+
137
+ | Variable | Purpose |
138
+ |----------|---------|
139
+ | `UMBRACO_TOOL_MODES` | Enable named groups of collections (see below) |
140
+ | `UMBRACO_INCLUDE_TOOL_COLLECTIONS` | Only these collections |
141
+ | `UMBRACO_EXCLUDE_TOOL_COLLECTIONS` | Everything except these |
142
+ | `UMBRACO_INCLUDE_TOOLS` / `UMBRACO_EXCLUDE_TOOLS` | Individual tools by name |
143
+ | `UMBRACO_INCLUDE_SLICES` / `UMBRACO_EXCLUDE_SLICES` | By operation type, e.g. `delete` |
144
+ | `UMBRACO_READONLY` | Block every write operation |
145
+ | `UMBRACO_DRY_RUN` | Log writes instead of performing them; write tools return a preview instead of their normal result |
146
+
147
+ Available modes:
148
+
149
+ | Mode | Includes |
150
+ |------|----------|
151
+ | `automate` | All 8 Automate collections |
152
+ | `umbraco-server` | Server information only |
153
+
154
+ ```json
155
+ "env": {
156
+ "UMBRACO_INCLUDE_TOOL_COLLECTIONS": "automations,catalogue,runs",
157
+ "UMBRACO_READONLY": "true"
158
+ }
159
+ ```
160
+
161
+ ## What you get
162
+
163
+ | Collection | Tools | What it covers |
164
+ |------------|-------|----------------|
165
+ | `automations` | 23 | Create, publish, trigger, import/export and delete automations; add, connect and configure steps; set triggers |
166
+ | `workspaces` | 10 | Workspaces and the groups (folders) that organise automations |
167
+ | `catalogue` | 8 | Available triggers, actions, control flows, connection types, notification channels and webhook authenticators |
168
+ | `connections` | 6 | Stored credentials/endpoints that steps use, including a connection test |
169
+ | `runs` | 6 | Run history and detail; replay, resume, suspend and terminate runs |
170
+ | `version-history` | 5 | Past versions of an entity — list, inspect, compare and roll back |
171
+ | `approvals` | 2 | Runs paused on an approval step, and approving/rejecting them |
172
+ | `metrics` | 2 | Run metrics overall and per automation |
173
+ | `umbraco-server` | 1 | Umbraco server information (version, runtime) |
174
+
175
+ Run `--list-tools` for the full list with descriptions.
176
+
177
+ ### Building an automation
178
+
179
+ The usual order:
180
+
181
+ 1. **`list-catalogue-triggers`** / **`list-catalogue-step-types`** — see what's available.
182
+ 2. **`create-automation`** — creates an empty draft in a workspace.
183
+ 3. **`set-automation-trigger`**, then **`add-automation-step`** and **`connect-automation-steps`**
184
+ — build the graph one piece at a time.
185
+ 4. **`publish-automation`** — make it live. **`trigger-automation`** starts a run by hand.
186
+
187
+ To copy an existing automation, use **`export-automation`** and then **`import-automation`**
188
+ (check the payload first with **`validate-automation-import`**).
189
+
190
+ ## Umbraco CMS tools
191
+
192
+ By default this server also chains to [`@umbraco-cms/mcp-dev`](https://www.npmjs.com/package/@umbraco-cms/mcp-dev)
193
+ (`@17` on this line, the CMS MCP's Umbraco 17 releases),
194
+ exposing CMS tools (documents, media, members) alongside the Automate ones, prefixed `cms--`
195
+ (e.g. `cms--get-document-by-id`). It reuses the same credentials. The chained server is
196
+ configured in `src/config/mcp-servers.ts`.
197
+
198
+ Set `DISABLE_MCP_CHAINING=true` to turn this off and run Automate tools only.
199
+
200
+ ## Troubleshooting
201
+
202
+ | Symptom | Likely cause |
203
+ |---------|--------------|
204
+ | `401` on every tool | Wrong `UMBRACO_CLIENT_ID` / `UMBRACO_CLIENT_SECRET`, or the API user lacks permissions |
205
+ | Self-signed certificate errors | Local HTTPS instance — set `NODE_TLS_REJECT_UNAUTHORIZED=0` |
206
+ | Version mismatch warning, first tool call blocked | Instance isn't Umbraco 17 — use `@umbraco-automate/mcp` 18.x for Umbraco 18, or set `UMBRACO_EXPECTED_MAJOR` |
207
+ | `404` on Automate tools | Umbraco Automate isn't installed on the instance |
208
+ | A tool you expected isn't listed | Check `UMBRACO_TOOL_MODES` and the include/exclude variables with `--debug-config` |
209
+ | A value in `.env` seems to be ignored | The same variable is also set in your MCP client's `env` block or your shell, and that wins over `./.env`. Remove one of them, or pass the file with `--env <path>` |
210
+
211
+ ## Contributing
212
+
213
+ Setting up the repo, running the demo Umbraco site and the test suites: see
214
+ [CONTRIBUTING.md](CONTRIBUTING.md).
215
+
216
+ ## License
217
+
218
+ MIT