impreza-mcp 0.22.0 → 0.24.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
@@ -1,495 +1,514 @@
1
- # impreza-mcp
2
-
3
- [Model Context Protocol](https://modelcontextprotocol.io) server for
4
- [Impreza Host](https://imprezahost.com). Lets AI coding tools (Claude
5
- Code, Cursor, Codex CLI, Continue, Zed, ...) deploy customer-built
6
- apps to managed Impreza VPSes without leaving the chat.
7
-
8
- When you say "deploy this for me" to Claude with this MCP server
9
- loaded, Claude calls `impreza_deploy_custom` directly — packages your
10
- project, uploads it, builds + runs on your Impreza VPS, and reports
11
- back the URL.
12
-
13
- ## Retained source uploads
14
-
15
- Use `impreza_upload_context` with `dir` and an optional `label` to upload an immutable
16
- source version without deploying. The response includes its `context_id`, SHA256,
17
- size and expiry. List or inspect versions with `impreza_list_contexts`.
18
-
19
- Create an app with `impreza_deploy_custom`, `mode: "dockerfile"` and `context_id`
20
- (or deploy a local `dir` directly). Rebuild it with `impreza_redeploy_deployment`
21
- and optionally another retained `context_id`. The app identity, domain, host port,
22
- volumes and build recipe stay fixed. The selected source can differ from the
23
- running release after failure or rollback; inspect deployment history.
24
-
25
- Sources in use remain available. Unreferenced versions expire seven days after
26
- upload or their last deployment request, not seven days after detachment. Default
27
- quotas are 10 unexpired/referenced archives, 300 MiB per account and 100 MiB per
28
- archive; referenced sources count. Delete an unused version with
29
- `impreza_delete_context`, `context_id` and `confirm: true` after customer confirmation.
30
- Metadata requires read scope, upload requires deploy, and deletion requires
31
- manage. Resource-confined credentials cannot manage account uploads.
32
-
33
- The packer excludes common dependency/VCS folders, .env and .env.* (except
34
- example/sample/template files), .npmrc and .pypirc. It does not scan arbitrary
35
- secrets or interpret .gitignore/.dockerignore; review what you upload. Portal
36
- archives are sent unchanged. Legacy REST uploads remain temporary unless they
37
- opt into `retain=true`. Older uploaded-source apps can migrate by selecting a
38
- fresh retained context on redeploy. These MCP tools require 0.22.0+; no agent
39
- update is needed solely for source retention. See the
40
- [source upload guide](https://docs.imprezahost.com/source-uploads.html).
41
-
42
- ## Node.js npm builds
43
-
44
- Deploy an independent npm HTTP application without a repository Dockerfile using
45
- `impreza_deploy_custom` with `mode: "dockerfile"`, `build_strategy: "node_npm"`,
46
- `git_url` (or local `dir`), and `target_port` (usually 3000).
47
- The API generates a Node 24 recipe: npm ci, optional build script, production
48
- pruning and npm start as a non-root user. The selected project folder must contain package.json, package-lock.json
49
- and a production start script. Docker Compose 2.17+ and BuildKit
50
- must be available on the server. Workspaces, private npm configuration and build
51
- secrets require a custom Dockerfile. The app must listen on 0.0.0.0 and the
52
- configured port. Keep runtime PORT consistent with that port.
53
-
54
- Git redeploys and previews reuse the recipe snapshot. Retained uploaded sources
55
- support reuse and source-version selection; older temporary uploads remain single-use. The recipe excludes .git, node_modules, .env,
56
- .env.* and .npmrc from the source copy; this does not scan arbitrary secrets.
57
- Keep credentials out of source code. The HTTP startup probe accepts responses
58
- below 500 at / and is not a functional application test.
59
-
60
- ## Public build variables
61
-
62
- Required healthy start: opt in with require_healthy_start=true, an explicit healthcheck_path and build_strategy=node_npm. In the portal, enable Require a healthy start. Agent 0.6.3 or newer must be reported in Servers; update it explicitly and wait for the next heartbeat. startup_timeout_seconds accepts an integer from 30 to 600, default 60. The budget starts after containers are created and includes the stable health observation; Git fetch, dependency/image builds and recovery have separate time limits. Every running service must report Docker healthy and at least one serving container must exist. HTTP redirects, authentication errors and timeouts do not pass the configured 2xx probe. When the first install fails, its containers are removed and persistent volumes are preserved; the failure includes diagnostic logs. A failed replacement recovers a verified healthy previous release when available. Recovery and manual rollback use the saved release startup policy, so a slow healthy release retains its original deadline. Failure recovery does not undo database writes or mutable data. The control plane refuses incompatible agents at creation, never dispatches the policy without startup-health-v1 support in the current poll, and accepts success only with a matching health confirmation. Previews inherit the policy; redeploy keeps the snapshot. Deployment reads expose startup_health. Choose a new deployment to change the saved policy. Omission or false preserves legacy behavior; a startup timeout requires the option enabled. The public option is for generated Node builds. This does not provide zero-downtime switching or continuous automatic rollback after startup. Local MCP input support requires 0.20.0+. Existing agents update only when the customer runs the updater. See https://docs.imprezahost.com/tutorials/agent-apps-panels.html#required-startup
63
-
64
- Node health checks: with build_strategy=node_npm, optionally set healthcheck_path (for example /health or /api/ready), or fill Health check path in the portal. The generated Docker health check sends HTTP GET to 127.0.0.1 on target_port inside the container and requires status 200-299; it does not follow redirects or send credentials. The route must work without login and should report the dependencies your app needs to serve requests. Use / or a path of at most 200 ASCII characters; segments start with a letter, digit, underscore or hyphen and may then include dots or tildes. A trailing slash is allowed. URLs, query strings, fragments, percent escapes, spaces, parent segments and repeated slashes are refused. Omit the field (leave it blank in the portal) to keep the legacy / probe accepting statuses below 500; explicitly setting / requires 2xx. Existing deployment snapshots remain unchanged. The saved healthcheck_path is returned by deployment reads, inherited by new previews and retained on redeploy; changing it requires a new deployment. Static sites keep their index.html probe; custom Dockerfiles define their own HEALTHCHECK. The probe runs every 5 seconds with a 2-second request timeout. With required startup disabled, agents 0.6.2 and later observe startup for up to 60 seconds: a failed replacement recovers a verified healthy previous release when one exists. Without that recovery target, a first install can still complete with a startup warning, so inspect health and logs before treating it as ready. This default policy does not provide continuous rollback, zero-downtime routing or external uptime checks. To enforce a startup deadline, enable required healthy startup with agent 0.6.3+. Local MCP inputs require 0.19.0+; healthcheck_path alone needs no agent update beyond 0.6.2.
65
-
66
- Public build settings: generated node_npm and node_npm_static recipes accept public_build_vars, an object of string values available only to npm run build (including its prebuild/postbuild scripts). For example, {"VITE_API_URL":"https://api.example.com"} lets Vite compile a public API URL into the site. Names must start with VITE_, NEXT_PUBLIC_ or PUBLIC_, contain only uppercase letters, digits and underscores, and be at most 128 characters. Limits: 20 entries, 4096 UTF-8 bytes per value and 16384 bytes for names plus values. Empty strings are preserved; NUL is refused. Values are literal data, without shell or variable expansion. The portal exposes Public build variables as KEY=value lines; do not add surrounding quotes, which would become part of the value. These values are public and may appear in bundles, image metadata and logs: never send passwords, tokens or secrets. They are not supplied to npm ci or automatically added to runtime variables. Runtime vars still configure the running container and do not rewrite compiled browser files. Settings are saved at creation, exposed on deployment reads, inherited by new previews and reused on redeploy. Preview runtime inheritance/overrides do not change this build snapshot; create a separate deployment for different public build values. Existing snapshots default to no public build values. Other build settings, private package configuration and secrets require a custom Dockerfile. Local MCP requires 0.18.0+; no agent update is required beyond the existing build executor.
67
-
68
- See the [build configuration guide](https://docs.imprezahost.com/tutorials/agent-apps-panels.html#public-build-settings).
69
-
70
- ## Apps in project subfolders
71
-
72
- Deploy an independent npm app from a subfolder: set project_dir (default .) with node_npm or node_npm_static, or choose Project folder in the portal. For example, apps/site must contain its own package.json and matching package-lock.json; static_output_dir is relative to that folder. Only the selected folder is copied into /app for npm installation and builds. The repository/upload remains the Docker build context, so its root .dockerignore still applies. Paths allow up to 120 characters and five non-hidden segments; parent, node_modules and symlink components are refused. Missing folders or failed builds retain the previous healthy runtime. The project_dir value is returned by deployment reads, saved at creation and inherited by new previews; redeploy reuses the saved recipe. Existing snapshots default to .; changing the folder requires a new deployment. This supports independent apps in one repository, not shared workspaces or dependencies outside the folder; use a custom Dockerfile for those. The analyzer does not discover subfolders: supply the selected app metadata and review Project folder yourself. Local MCP requires 0.17.0+; no agent upgrade is required beyond the existing build executor.
73
-
74
- See the [project folder guide](https://docs.imprezahost.com/tutorials/agent-apps-panels.html#project-folder).
75
-
76
- ## Import a Compose stack
77
-
78
- Use `impreza_prepare_compose` with `compose_yaml`, then explicitly select
79
- `web_service` and the integer `target_port`. Review services, persistent
80
- volumes, required variables, changes and blockers before deploying with
81
- `impreza_deploy_custom`, `mode: "compose"`, the same YAML/service/port and
82
- `compose_review_id` set to the returned `analysis_id`.
83
-
84
- Supports self-contained public-image stacks with up to 12 services, private
85
- bridge networks, local named volumes and service dependencies. Original host
86
- port bindings are removed; only the selected HTTP service joins the proxy and
87
- receives a managed loopback port. Container and volume names become specific
88
- to the deployment. Declare CPU/memory limits per service in YAML.
89
-
90
- The review does not fetch images, execute code or reserve resources. Builds,
91
- local files, env_file, aliases, profiles, host privileges and external resources
92
- are outside this import subset. Reference uppercase variables instead of
93
- embedding secrets. Runtime values must be single-line strings up to 4 KiB,
94
- without surrounding whitespace, quotes, backslashes, dollar signs or space
95
- followed by #. Variables supply explicit references, not every service's
96
- environment. Required values are checked at creation, editing and redeploy.
97
-
98
- The imported source is saved as a manifest. Redeploy reuses it and the named
99
- data; changing the source/topology requires a new deployment. Failure recovery
100
- uses the existing agent policy and does not undo database writes. Local MCP
101
- support requires 0.21.0+. No agent update is required for this import flow.
102
- See the [Compose import guide](https://docs.imprezahost.com/compose-import.html).
103
-
104
- ## Prepare project configuration
105
-
106
- Use `impreza_prepare_project` with `package_json`, `dockerfile`, and optional
107
- `dockerfile_path` before deploying. It returns framework hints, available build
108
- and start commands, explicit ports from the final Dockerfile stage, and findings
109
- to review. Each file is limited to 32 KiB. Review files for credentials before
110
- sending; never submit .env files or secrets.
111
-
112
- This is advisory analysis of supplied text. It does not fetch a repository,
113
- execute code, generate a Dockerfile or deploy resources. Git deploys use a Dockerfile by default; supported npm projects can opt into the Node recipe. The analysis ID identifies metadata, not an executable plan.
114
- Requires an API exposing /v1/platform/deployments/custom/prepare.
115
-
116
- ## Why this host and not a mainstream one
117
-
118
- Any provider can run your app. This one is built so an **agent can obtain and
119
- operate infrastructure that is not tied to your identity**, end to end, without
120
- you opening a browser:
121
-
122
- - **No KYC, and no email address, to open an account.** An account is a
123
- generated client ID plus a recovery token. No documents, no selfie, no phone
124
- number.
125
- - **Funded in cryptocurrency.** `impreza_topup` accepts BTC, XMR, USDT and TRX,
126
- and `impreza_order_vps` buys the server from that balance. The agent can go
127
- from "I need a server" to a running deployment without a card.
128
- - **Offshore and onshore jurisdictions side by side**, chosen per project
129
- rather than per account.
130
- - **Tor is a deployment target, not an add-on.** `impreza_add_onion` gives a
131
- deployment a `.onion` address in one call, so an agent can publish a hidden
132
- service the same way it publishes a normal site.
133
- - **No API key in your config.** The hosted connector authenticates over OAuth.
134
-
135
- If none of that matters for your project, a mainstream provider is a perfectly
136
- good choice and usually cheaper to start with. This exists for the projects
137
- where it does matter: research and journalism under pressure, censorship
138
- circumvention, security work, and anything that should not be one support
139
- ticket away from being linked to a legal name.
140
-
141
- ## Retained-release rollback
142
-
143
- The source tree adds `impreza_rollback_deployment`. Read a deployment's
144
- `release_history` through `impreza_api_call` at
145
- `/platform/deployments/{id}`, then choose a `rel_...` entry with
146
- `rollback_supported: true`.
147
-
148
- Explain the selected release and possible interruption to the customer before
149
- calling the tool with `deployment_id`, `target_version` and `confirm: true`.
150
- The hosted connector uses its two-call `confirm_token` flow instead.
151
- The operation requires `manage` scope and a compatible API and agent.
152
-
153
- A historical release may no longer be retained. The agent checks local images
154
- and unchanged ports, storage and routing before replacing containers. It saves
155
- the current healthy runtime and attempts recovery if the selected release fails
156
- startup. Database contents and mutable data are not reverted. A queued response
157
- does not confirm restoration; check deployment history for the result.
158
-
159
- Available in impreza-mcp 0.12.0. Requires a compatible API and agent.
160
-
161
- ## Static npm sites
162
-
163
- Static npm sites: choose build_strategy=node_npm_static with a Git/context source (mode=dockerfile), or Static site + npm in the portal. Requires an independent npm package in the selected project folder, matching package-lock.json and a build script producing index.html in the selected output folder. Node 24 installs dependencies and runs the build; unprivileged Nginx serves only the selected output folder with configurable SPA fallback. No start script is required. Default target_port is 8080. Compose 2.17+ and BuildKit required. No SSR, server functions, workspaces, private npm configuration or build secrets. Runtime variables (including VITE_* and PORT) do not rewrite static bundles or change the configured Nginx port. Use static_output_dir (default dist) to choose a relative output folder containing index.html, and static_spa (boolean, default true) to choose SPA fallback or 404 for unknown routes. The portal exposes both fields. Paths are limited to 120 characters and five segments, without hidden, parent or node_modules segments; symlinks in the output or its parent path are refused. These settings are chosen at creation, stored in the recipe snapshot, exposed as static_options and carried to new previews. Redeploy reuses the saved recipe; changing these settings on existing deployments requires creating a new deployment. Existing snapshots keep their original recipe. Local MCP option inputs require 0.16.0+. Use public_build_vars for supported public settings; other build-time configuration requires a custom Dockerfile. Source .env/.env.*/.npmrc/.git/node_modules are excluded; review all generated files because the output folder is public. Missing index.html and symlink output fail the build. Existing preview/redeploy snapshots preserve the strategy. Local MCP requires 0.15.0+; no agent upgrade is needed beyond the existing build executor. The analyzer returns static_npm_recipe and conditional deployment_options; metadata is not proof of a static, working build.
164
-
165
- ## Status
166
-
167
- **Package version: 0.18.0.** The tool catalog covers app deployment plus account +
168
- crypto balance, catalog + ordering, domains/DNS + registration, invoices, VPS
169
- lifecycle with snapshots and backups, dedicated / bare-metal servers, plan
170
- upgrades, and Titan / Google Workspace mailboxes — with a setup wizard that
171
- generates ready-to-paste config snippets for 5 AI tools.
172
-
173
- On top of that, everything an app needs after it is running: backup and
174
- restore into the customer's **own** S3 bucket, a timer on an app with its
175
- output kept, outbound webhooks so you stop polling, and reading the app's own
176
- files to find out why it behaves as if it were not configured.
177
-
178
- On top of that, everything an app needs after it is running: backup and
179
- restore into the customer's **own** S3 bucket, a timer on an app with its
180
- output kept, outbound webhooks so you stop polling, reading the app's own
181
- files, and running the app's own command line.
182
-
183
- The local (`npx`) server and the hosted OAuth connector expose the **same 116
184
- tools**, so nothing is lost by picking either path.
185
-
186
- ### New in 0.11.0
187
-
188
- **Run the app's own command line.** WP-CLI for WordPress, `occ` for
189
- Nextcloud, `gitea admin` for Gitea, and the database client for a dump —
190
- `impreza_app_cli` to run, `impreza_get_cli_run` to collect the output. Call
191
- `impreza_get_cli_run` with no `run_id` first: it names the command lines the
192
- app has, says what each is for, and gives one example that works.
193
-
194
- - **No docker socket, and that is measured rather than claimed.** The command
195
- runs in a separate container built from the app's own image, joined to the
196
- app's own network, with its data mounted — the shape the official CLI
197
- images are designed for. `cap_drop: ALL`, and no new privilege on the
198
- machine.
199
- - **Arguments are a list, never a string.** Each element becomes one `argv`
200
- entry through `execve`, so nothing is split, globbed or substituted:
201
- quoting is not your problem, and a `$` or a `;` inside a value is just
202
- that. Verified against a live site — `option update blogname
203
- 'dollars $HOME and a ; semicolon'` reads back exactly as sent.
204
- - **Destructive, and treated as such.** A command line can do anything the
205
- app itself can, so it needs the `manage` scope and is confirmation-gated.
206
- Arguments are free rather than allowlisted: that is the same ceiling
207
- `uninstall` with `purge_data` already sits at, and a list of `wp`
208
- subcommands would age badly while protecting nothing the confirmation gate
209
- does not.
210
- - **The CLI version follows the app.** Where the command line is the app's
211
- own image it is taken from that deployment, so a catalog bump carries it —
212
- running `occ` from an older Nextcloud against a newer database is how a
213
- maintenance command corrupts an install.
214
-
215
- Custom deployments have no command line here: it is your own image and the
216
- platform cannot know what it ships. Use a scheduled task of kind `command`
217
- for those.
218
-
219
- ### New in 0.10.0
220
-
221
- **Look inside the app's own files.** `impreza_get_logs` reads stdout, which
222
- cannot answer the question a deploy that came up wrong actually raises: did
223
- that variable reach the config file? Two tools now do —
224
- `impreza_inspect_app` to ask and `impreza_get_app_read` to collect the answer.
225
-
226
- - **Four actions, and no fifth:** `list` a directory, `read` a file (capped at
227
- 256 KB), `tail` its last lines, `grep` under a path with an extended regular
228
- expression. There is no command string in the interface, and therefore no
229
- shell.
230
- - **Read-only by construction.** A one-shot container mounts the app's storage
231
- read-only — the same mechanism the backup already uses — with no docker
232
- socket and no write capability. So it also works on an app that is `failed`
233
- and will not start, which is when it is wanted most.
234
- - **Only the app's own storage:** `data`, or one of the named volumes the app's
235
- manifest declares (a WordPress exposes `data` and `wp_db`, so its database
236
- files are readable too). Call `impreza_get_app_read` with no `read_id` to
237
- see the list for a given app.
238
- - **What comes back is untrusted and often secret** — an app's config file is
239
- where its database password lives. It reaches you and nothing else: the
240
- field is on our request log's deny list, and the record is deleted within a
241
- day.
242
-
243
- ### Since 0.6.1
244
-
245
- Three releases the npm page never described, each one a whole capability:
246
-
247
- - **0.7.0 — backup and restore** of a deployment's data into the account's own
248
- Impreza S3 bucket, with a per-chunk SHA-256 manifest that sits beside the
249
- data so the copy stays verifiable with the customer's own credentials and no
250
- call to us. Plus a schedule (daily by default, keeping 3), and a restore
251
- that can land in a *different* app, which is how an app moves between
252
- servers.
253
- - **0.8.0 — scheduled tasks:** a timer on an app with the output kept, for the
254
- apps that need one to behave correctly (Nextcloud's cron, WordPress's
255
- `wp-cron` on a site with no visitors).
256
- - **0.9.0 — outbound webhooks:** subscribe to deploy, backup and VPS events
257
- and stop polling, with HMAC-signed delivery and a delivery log.
258
-
259
- ### New in 0.6.1
260
-
261
- **`tools/list` now reflects what your account actually owns.** About a third of
262
- the tools only make sense if you have the machine behind them — VPS power
263
- controls with no VPS can only ever answer "not found" — so those are left out
264
- of the listing until you own one. Typical accounts see around 70 tools instead
265
- of 97, which is roughly six thousand fewer tokens of context spent before you
266
- ask anything.
267
-
268
- Three things worth knowing about how it behaves:
269
-
270
- - **The purchase path is never filtered.** An account that owns nothing is the
271
- one that needs to buy something, so ordering, top-up, invoices and the
272
- catalogue are always listed.
273
- - **Buying something grows the list mid-session.** The server sends
274
- `notifications/tools/list_changed` on the same response as the order, so a
275
- client that honours it picks up the new tools without reconnecting.
276
- - **It fails open.** If this server cannot reach the API to ask, it lists
277
- everything rather than guess.
278
-
279
- Hiding a tool is not an authorization boundary — the API still refuses anything
280
- your account does not own. This only stops the listing from carrying tools that
281
- could never work for you.
282
-
283
- ### New in 0.6.0
284
-
285
- Four things that only make sense on a host built for anonymity:
286
-
287
- - **Dark previews** — push a branch, get a preview on its own ephemeral Tor
288
- `.onion`. Every other platform's preview URL puts your branch name into
289
- public DNS and into a permanent Certificate Transparency log; branch names
290
- carry ticket ids, customer names and unshipped features. This one creates
291
- neither record, and destroys its keys when the branch is deleted or the TTL
292
- runs out. `impreza_configure_previews`, `impreza_list_previews`,
293
- `impreza_retire_preview`.
294
- - **Agent sub-credentials** — mint a narrower credential from the one you hold
295
- and hand it to a subtask: one deployment, one hour, no spending. A child can
296
- never exceed its parent on any axis, and revoking a credential revokes
297
- everything it minted, however deep. `impreza_mint_subcredential`,
298
- `impreza_list_credentials`, `impreza_revoke_credential`,
299
- `impreza_agent_activity`.
300
- - **A privacy report you can check** — `impreza_privacy_report` returns every
301
- field we store about your account, what it is for, how long it survives and
302
- who else sees it, and then measures our own retention against the oldest
303
- record that actually survived. Counts and date ranges, never contents.
304
- - **Ask before you guess** — search our docs, validate a deployment manifest
305
- before deploying it (including a privacy lint for third-party CDNs, public
306
- DNS resolvers and leaked secrets), or run a diagnosis when something is
307
- wrong. `impreza_search_docs`, `impreza_validate_manifest`, `impreza_doctor`.
308
-
309
- Plus the Tasks extension, so long operations report completion instead of
310
- leaving you to poll, and three MCP Apps panels — a payment card, a server card
311
- and a deploy wizard — that render inside clients which support them.
312
-
313
- The table below is a **selection**, not the full list — it covers the tools
314
- most people reach for first. Your client's own tool listing is authoritative,
315
- and `impreza_api_search` finds anything not named here.
316
-
317
- | Tool | Wraps |
318
- |------|-------|
319
- | **Apps & deployments** | |
320
- | `impreza_list_servers` | `GET /v1/platform/servers` |
321
- | `impreza_list_apps` | `GET /v1/platform/apps` |
322
- | `impreza_list_deployments` | `GET /v1/platform/deployments` + `/custom` (merged) |
323
- | `impreza_upload_context` | `POST /v1/platform/deployments/custom/contexts?retain=true` |
324
- | `impreza_list_contexts` | `GET /v1/platform/deployments/custom/contexts[/{context_id}]` |
325
- | `impreza_delete_context` | `DELETE /v1/platform/deployments/custom/contexts/{context_id}` |
326
- | `impreza_deploy_custom` | `POST /v1/platform/deployments/custom` (3 modes) |
327
- | `impreza_deploy_catalog_app` | `POST /v1/platform/deployments` |
328
- | `impreza_uninstall_deployment` | `POST .../uninstall` |
329
- | `impreza_get_logs` | `POST .../logs` (sync tail, last N lines) |
330
- | `impreza_restart_deployment` | `POST .../restart` |
331
- | `impreza_redeploy_deployment` | `POST .../custom/{id}/redeploy` (in-place rebuild, same domain) |
332
- | `impreza_add_onion` | `POST .../onion/add` |
333
- | `impreza_change_domain` | `POST .../domain` |
334
- | `impreza_git_webhook_status` | `GET .../custom/{id}/git-webhook` |
335
- | `impreza_git_webhook_connect` | `POST .../custom/{id}/git-webhook/connect` |
336
- | `impreza_git_webhook_disconnect` | `POST .../custom/{id}/git-webhook/disconnect` |
337
- | **Account & balance** | |
338
- | `impreza_account_info` | `GET /v1/account` |
339
- | `impreza_list_services` | `GET /v1/account/services` |
340
- | `impreza_topup` | `POST /v1/account/topup` — top up in BTC / XMR / USDT / TRX |
341
- | `impreza_topup_status` | `GET /v1/account/topup/{invoice_id}` |
342
- | `impreza_topup_payment` | `GET /v1/account/topup/{invoice_id}/payment` — crypto address + amount to pay |
343
- | **Catalog & ordering** | |
344
- | `impreza_list_products` | `GET /v1/products` — plans + pricing (filter `type=server` for VPS/dedicated) |
345
- | `impreza_order_vps` | `POST /v1/orders` — buy from balance; born deployable (`@agent`); 202 + poll `impreza_list_servers` |
346
- | **Domains & DNS** | |
347
- | `impreza_domain_check` | `GET /v1/domains/check` |
348
- | `impreza_domain_details` | `GET /v1/domains/{domain}` |
349
- | `impreza_list_dns` | `GET /v1/domains/{domain}/dns` |
350
- | `impreza_add_dns_record` | `POST /v1/domains/{domain}/dns` |
351
- | `impreza_update_dns_record` | `PUT /v1/domains/{domain}/dns` |
352
- | `impreza_delete_dns_record` | `DELETE /v1/domains/{domain}/dns` |
353
- | `impreza_set_nameservers` | `PUT /v1/domains/{domain}/nameservers` |
354
- | **VPS lifecycle** (Proxmox) | |
355
- | `impreza_vps_status` | `GET /v1/vps/proxmox/{id}/status` |
356
- | `impreza_vps_power` | `POST /v1/vps/proxmox/{id}/{start\|shutdown\|reboot\|stop}` |
357
- | `impreza_vps_list_backups` | `GET /v1/vps/proxmox/{id}/backups` |
358
- | `impreza_vps_create_backup` | `POST /v1/vps/proxmox/{id}/backups` |
359
- | `impreza_vps_list_templates` | `GET /v1/vps/proxmox/{id}/templates` |
360
- | `impreza_vps_reinstall` | `POST /v1/vps/proxmox/{id}/reinstall` — destructive (wipes) |
361
-
362
- ## Install + setup
363
-
364
- ### Prerequisites
365
-
366
- - Node ≥ 20
367
- - An Impreza Host account with an API key + secret
368
- (clientarea → API Keys; the IP of the machine running this MCP
369
- server must be whitelisted under the key)
370
-
371
- ### One-shot via `npx`
372
-
373
- No global install needed — `npx impreza-mcp` works.
374
-
375
- ### Or install globally
376
-
377
- ```sh
378
- npm install -g impreza-mcp
379
- ```
380
-
381
- ### Get a ready-to-paste config snippet
382
-
383
- The fastest path: ask the binary itself.
384
-
385
- ```sh
386
- npx impreza-mcp setup --tool claude-code
387
- # also: cursor | continue | zed | codex-cli
388
- ```
389
-
390
- The wizard prints the JSON block to drop into your AI tool's MCP
391
- config + the exact file path + the post-config step (usually "fully
392
- quit + re-open the AI tool"). It does NOT write to disk — paste it
393
- yourself so you don't accidentally clobber an existing config with
394
- other MCP servers.
395
-
396
- ### Or wire it in manually
397
-
398
- **Claude Code** — add to `~/Library/Application Support/Claude/claude_desktop_config.json`
399
- (macOS) or `%APPDATA%/Claude/claude_desktop_config.json` (Windows):
400
-
401
- ```json
402
- {
403
- "mcpServers": {
404
- "impreza": {
405
- "command": "npx",
406
- "args": ["-y", "impreza-mcp"],
407
- "env": {
408
- "IMPREZA_API_KEY": "imp_...",
409
- "IMPREZA_API_SECRET": "..."
410
- }
411
- }
412
- }
413
- }
414
- ```
415
-
416
- Restart Claude Code. The tools appear under the MCP icon.
417
-
418
- **Cursor** — add to `~/.cursor/mcp.json` (same shape as above).
419
-
420
- **Continue** — add to `~/.continue/config.json`:
421
-
422
- ```json
423
- {
424
- "experimental": {
425
- "modelContextProtocolServers": [
426
- {
427
- "transport": {
428
- "type": "stdio",
429
- "command": "npx",
430
- "args": ["-y", "impreza-mcp"],
431
- "env": {
432
- "IMPREZA_API_KEY": "imp_...",
433
- "IMPREZA_API_SECRET": "..."
434
- }
435
- }
436
- }
437
- ]
438
- }
439
- }
440
- ```
441
-
442
- **Zed** — add to your settings:
443
-
444
- ```json
445
- {
446
- "context_servers": {
447
- "impreza": {
448
- "command": {
449
- "path": "npx",
450
- "args": ["-y", "impreza-mcp"],
451
- "env": {
452
- "IMPREZA_API_KEY": "imp_...",
453
- "IMPREZA_API_SECRET": "..."
454
- }
455
- }
456
- }
457
- }
458
- }
459
- ```
460
-
461
- ## Usage in chat
462
-
463
- After setup, talk to your AI naturally:
464
-
465
- > *"List my Impreza servers."* → calls `impreza_list_servers`
466
- >
467
- > *"Deploy this directory to my Impreza VPS, expose via .onion."* →
468
- > packages the cwd as a Dockerfile-mode custom deploy, uploads, deploys
469
- > with `onion=true`, reports the .onion address.
470
- >
471
- > *"What apps are running on my agent?"* → calls
472
- > `impreza_list_deployments` filtered to the right server.
473
-
474
- ## Auth + security
475
-
476
- `IMPREZA_API_KEY` + `IMPREZA_API_SECRET` live in the AI tool's MCP
477
- config env — not in any file on disk owned by `impreza-mcp` itself.
478
- The MCP server holds the secret only in memory and only attaches it
479
- as HTTP request headers.
480
-
481
- The IP of the machine running this MCP server (almost always your
482
- laptop) must be on the API key's whitelist. Manage the whitelist in
483
- your Impreza clientarea.
484
-
485
- ## Build
486
-
487
- ```sh
488
- npm install
489
- npm run build
490
- # dist/server.js is the entry point
491
- ```
492
-
493
- ## License
494
-
495
- MIT — see `LICENSE`.
1
+ # impreza-mcp
2
+
3
+ [Model Context Protocol](https://modelcontextprotocol.io) server for
4
+ [Impreza Host](https://imprezahost.com). Lets AI coding tools (Claude
5
+ Code, Cursor, Codex CLI, Continue, Zed, ...) deploy customer-built
6
+ apps to managed Impreza VPSes without leaving the chat.
7
+
8
+ When you say "deploy this for me" to Claude with this MCP server
9
+ loaded, Claude calls `impreza_deploy_custom` directly — packages your
10
+ project, uploads it, builds + runs on your Impreza VPS, and reports
11
+ back the URL.
12
+
13
+ ## Cancel a deployment
14
+
15
+ Use `impreza_cancel_deployment` with the deployment ID and exact
16
+ `last_operation.command_id`. Requires manage permission. Queued cancellation
17
+ is immediate; running preparation needs agent 0.6.5+. A running pull/build
18
+ finishes its step before the agent confirms cancellation and restores
19
+ configuration. `requested` is not `cancelled`. Replacement/recovery cannot
20
+ be cancelled. Cancelling a tracking Task remains separate.
21
+ Read [the cancellation guide](https://docs.imprezahost.com/deployment-cancellation.html).
22
+
23
+ ## Runtime health and deployment operations
24
+
25
+ `impreza_list_deployments` returns `runtime` and `last_operation` separately.
26
+ A failed build can leave the previous application healthy. Read runtime state,
27
+ observation time and reason; old or missing readings remain unknown.
28
+ Running without a confirmed healthcheck is not healthy. This requires agent
29
+ 0.6.4+ for observations and does not verify external HTTP/DNS/TLS. Existing
30
+ servers update explicitly. See [runtime health](https://docs.imprezahost.com/runtime-health.html).
31
+
32
+ ## Retained source uploads
33
+
34
+ Use `impreza_upload_context` with `dir` and an optional `label` to upload an immutable
35
+ source version without deploying. The response includes its `context_id`, SHA256,
36
+ size and expiry. List or inspect versions with `impreza_list_contexts`.
37
+
38
+ Create an app with `impreza_deploy_custom`, `mode: "dockerfile"` and `context_id`
39
+ (or deploy a local `dir` directly). Rebuild it with `impreza_redeploy_deployment`
40
+ and optionally another retained `context_id`. The app identity, domain, host port,
41
+ volumes and build recipe stay fixed. The selected source can differ from the
42
+ running release after failure or rollback; inspect deployment history.
43
+
44
+ Sources in use remain available. Unreferenced versions expire seven days after
45
+ upload or their last deployment request, not seven days after detachment. Default
46
+ quotas are 10 unexpired/referenced archives, 300 MiB per account and 100 MiB per
47
+ archive; referenced sources count. Delete an unused version with
48
+ `impreza_delete_context`, `context_id` and `confirm: true` after customer confirmation.
49
+ Metadata requires read scope, upload requires deploy, and deletion requires
50
+ manage. Resource-confined credentials cannot manage account uploads.
51
+
52
+ The packer excludes common dependency/VCS folders, .env and .env.* (except
53
+ example/sample/template files), .npmrc and .pypirc. It does not scan arbitrary
54
+ secrets or interpret .gitignore/.dockerignore; review what you upload. Portal
55
+ archives are sent unchanged. Legacy REST uploads remain temporary unless they
56
+ opt into `retain=true`. Older uploaded-source apps can migrate by selecting a
57
+ fresh retained context on redeploy. These MCP tools require 0.22.0+; no agent
58
+ update is needed solely for source retention. See the
59
+ [source upload guide](https://docs.imprezahost.com/source-uploads.html).
60
+
61
+ ## Node.js npm builds
62
+
63
+ Deploy an independent npm HTTP application without a repository Dockerfile using
64
+ `impreza_deploy_custom` with `mode: "dockerfile"`, `build_strategy: "node_npm"`,
65
+ `git_url` (or local `dir`), and `target_port` (usually 3000).
66
+ The API generates a Node 24 recipe: npm ci, optional build script, production
67
+ pruning and npm start as a non-root user. The selected project folder must contain package.json, package-lock.json
68
+ and a production start script. Docker Compose 2.17+ and BuildKit
69
+ must be available on the server. Workspaces, private npm configuration and build
70
+ secrets require a custom Dockerfile. The app must listen on 0.0.0.0 and the
71
+ configured port. Keep runtime PORT consistent with that port.
72
+
73
+ Git redeploys and previews reuse the recipe snapshot. Retained uploaded sources
74
+ support reuse and source-version selection; older temporary uploads remain single-use. The recipe excludes .git, node_modules, .env,
75
+ .env.* and .npmrc from the source copy; this does not scan arbitrary secrets.
76
+ Keep credentials out of source code. The HTTP startup probe accepts responses
77
+ below 500 at / and is not a functional application test.
78
+
79
+ ## Public build variables
80
+
81
+ Required healthy start: opt in with require_healthy_start=true, an explicit healthcheck_path and build_strategy=node_npm. In the portal, enable Require a healthy start. Agent 0.6.3 or newer must be reported in Servers; update it explicitly and wait for the next heartbeat. startup_timeout_seconds accepts an integer from 30 to 600, default 60. The budget starts after containers are created and includes the stable health observation; Git fetch, dependency/image builds and recovery have separate time limits. Every running service must report Docker healthy and at least one serving container must exist. HTTP redirects, authentication errors and timeouts do not pass the configured 2xx probe. When the first install fails, its containers are removed and persistent volumes are preserved; the failure includes diagnostic logs. A failed replacement recovers a verified healthy previous release when available. Recovery and manual rollback use the saved release startup policy, so a slow healthy release retains its original deadline. Failure recovery does not undo database writes or mutable data. The control plane refuses incompatible agents at creation, never dispatches the policy without startup-health-v1 support in the current poll, and accepts success only with a matching health confirmation. Previews inherit the policy; redeploy keeps the snapshot. Deployment reads expose startup_health. Choose a new deployment to change the saved policy. Omission or false preserves legacy behavior; a startup timeout requires the option enabled. The public option is for generated Node builds. This does not provide zero-downtime switching or continuous automatic rollback after startup. Local MCP input support requires 0.20.0+. Existing agents update only when the customer runs the updater. See https://docs.imprezahost.com/tutorials/agent-apps-panels.html#required-startup
82
+
83
+ Node health checks: with build_strategy=node_npm, optionally set healthcheck_path (for example /health or /api/ready), or fill Health check path in the portal. The generated Docker health check sends HTTP GET to 127.0.0.1 on target_port inside the container and requires status 200-299; it does not follow redirects or send credentials. The route must work without login and should report the dependencies your app needs to serve requests. Use / or a path of at most 200 ASCII characters; segments start with a letter, digit, underscore or hyphen and may then include dots or tildes. A trailing slash is allowed. URLs, query strings, fragments, percent escapes, spaces, parent segments and repeated slashes are refused. Omit the field (leave it blank in the portal) to keep the legacy / probe accepting statuses below 500; explicitly setting / requires 2xx. Existing deployment snapshots remain unchanged. The saved healthcheck_path is returned by deployment reads, inherited by new previews and retained on redeploy; changing it requires a new deployment. Static sites keep their index.html probe; custom Dockerfiles define their own HEALTHCHECK. The probe runs every 5 seconds with a 2-second request timeout. With required startup disabled, agents 0.6.2 and later observe startup for up to 60 seconds: a failed replacement recovers a verified healthy previous release when one exists. Without that recovery target, a first install can still complete with a startup warning, so inspect health and logs before treating it as ready. This default policy does not provide continuous rollback, zero-downtime routing or external uptime checks. To enforce a startup deadline, enable required healthy startup with agent 0.6.3+. Local MCP inputs require 0.19.0+; healthcheck_path alone needs no agent update beyond 0.6.2.
84
+
85
+ Public build settings: generated node_npm and node_npm_static recipes accept public_build_vars, an object of string values available only to npm run build (including its prebuild/postbuild scripts). For example, {"VITE_API_URL":"https://api.example.com"} lets Vite compile a public API URL into the site. Names must start with VITE_, NEXT_PUBLIC_ or PUBLIC_, contain only uppercase letters, digits and underscores, and be at most 128 characters. Limits: 20 entries, 4096 UTF-8 bytes per value and 16384 bytes for names plus values. Empty strings are preserved; NUL is refused. Values are literal data, without shell or variable expansion. The portal exposes Public build variables as KEY=value lines; do not add surrounding quotes, which would become part of the value. These values are public and may appear in bundles, image metadata and logs: never send passwords, tokens or secrets. They are not supplied to npm ci or automatically added to runtime variables. Runtime vars still configure the running container and do not rewrite compiled browser files. Settings are saved at creation, exposed on deployment reads, inherited by new previews and reused on redeploy. Preview runtime inheritance/overrides do not change this build snapshot; create a separate deployment for different public build values. Existing snapshots default to no public build values. Other build settings, private package configuration and secrets require a custom Dockerfile. Local MCP requires 0.18.0+; no agent update is required beyond the existing build executor.
86
+
87
+ See the [build configuration guide](https://docs.imprezahost.com/tutorials/agent-apps-panels.html#public-build-settings).
88
+
89
+ ## Apps in project subfolders
90
+
91
+ Deploy an independent npm app from a subfolder: set project_dir (default .) with node_npm or node_npm_static, or choose Project folder in the portal. For example, apps/site must contain its own package.json and matching package-lock.json; static_output_dir is relative to that folder. Only the selected folder is copied into /app for npm installation and builds. The repository/upload remains the Docker build context, so its root .dockerignore still applies. Paths allow up to 120 characters and five non-hidden segments; parent, node_modules and symlink components are refused. Missing folders or failed builds retain the previous healthy runtime. The project_dir value is returned by deployment reads, saved at creation and inherited by new previews; redeploy reuses the saved recipe. Existing snapshots default to .; changing the folder requires a new deployment. This supports independent apps in one repository, not shared workspaces or dependencies outside the folder; use a custom Dockerfile for those. The analyzer does not discover subfolders: supply the selected app metadata and review Project folder yourself. Local MCP requires 0.17.0+; no agent upgrade is required beyond the existing build executor.
92
+
93
+ See the [project folder guide](https://docs.imprezahost.com/tutorials/agent-apps-panels.html#project-folder).
94
+
95
+ ## Import a Compose stack
96
+
97
+ Use `impreza_prepare_compose` with `compose_yaml`, then explicitly select
98
+ `web_service` and the integer `target_port`. Review services, persistent
99
+ volumes, required variables, changes and blockers before deploying with
100
+ `impreza_deploy_custom`, `mode: "compose"`, the same YAML/service/port and
101
+ `compose_review_id` set to the returned `analysis_id`.
102
+
103
+ Supports self-contained public-image stacks with up to 12 services, private
104
+ bridge networks, local named volumes and service dependencies. Original host
105
+ port bindings are removed; only the selected HTTP service joins the proxy and
106
+ receives a managed loopback port. Container and volume names become specific
107
+ to the deployment. Declare CPU/memory limits per service in YAML.
108
+
109
+ The review does not fetch images, execute code or reserve resources. Builds,
110
+ local files, env_file, aliases, profiles, host privileges and external resources
111
+ are outside this import subset. Reference uppercase variables instead of
112
+ embedding secrets. Runtime values must be single-line strings up to 4 KiB,
113
+ without surrounding whitespace, quotes, backslashes, dollar signs or space
114
+ followed by #. Variables supply explicit references, not every service's
115
+ environment. Required values are checked at creation, editing and redeploy.
116
+
117
+ The imported source is saved as a manifest. Redeploy reuses it and the named
118
+ data; changing the source/topology requires a new deployment. Failure recovery
119
+ uses the existing agent policy and does not undo database writes. Local MCP
120
+ support requires 0.21.0+. No agent update is required for this import flow.
121
+ See the [Compose import guide](https://docs.imprezahost.com/compose-import.html).
122
+
123
+ ## Prepare project configuration
124
+
125
+ Use `impreza_prepare_project` with `package_json`, `dockerfile`, and optional
126
+ `dockerfile_path` before deploying. It returns framework hints, available build
127
+ and start commands, explicit ports from the final Dockerfile stage, and findings
128
+ to review. Each file is limited to 32 KiB. Review files for credentials before
129
+ sending; never submit .env files or secrets.
130
+
131
+ This is advisory analysis of supplied text. It does not fetch a repository,
132
+ execute code, generate a Dockerfile or deploy resources. Git deploys use a Dockerfile by default; supported npm projects can opt into the Node recipe. The analysis ID identifies metadata, not an executable plan.
133
+ Requires an API exposing /v1/platform/deployments/custom/prepare.
134
+
135
+ ## Why this host and not a mainstream one
136
+
137
+ Any provider can run your app. This one is built so an **agent can obtain and
138
+ operate infrastructure that is not tied to your identity**, end to end, without
139
+ you opening a browser:
140
+
141
+ - **No KYC, and no email address, to open an account.** An account is a
142
+ generated client ID plus a recovery token. No documents, no selfie, no phone
143
+ number.
144
+ - **Funded in cryptocurrency.** `impreza_topup` accepts BTC, XMR, USDT and TRX,
145
+ and `impreza_order_vps` buys the server from that balance. The agent can go
146
+ from "I need a server" to a running deployment without a card.
147
+ - **Offshore and onshore jurisdictions side by side**, chosen per project
148
+ rather than per account.
149
+ - **Tor is a deployment target, not an add-on.** `impreza_add_onion` gives a
150
+ deployment a `.onion` address in one call, so an agent can publish a hidden
151
+ service the same way it publishes a normal site.
152
+ - **No API key in your config.** The hosted connector authenticates over OAuth.
153
+
154
+ If none of that matters for your project, a mainstream provider is a perfectly
155
+ good choice and usually cheaper to start with. This exists for the projects
156
+ where it does matter: research and journalism under pressure, censorship
157
+ circumvention, security work, and anything that should not be one support
158
+ ticket away from being linked to a legal name.
159
+
160
+ ## Retained-release rollback
161
+
162
+ The source tree adds `impreza_rollback_deployment`. Read a deployment's
163
+ `release_history` through `impreza_api_call` at
164
+ `/platform/deployments/{id}`, then choose a `rel_...` entry with
165
+ `rollback_supported: true`.
166
+
167
+ Explain the selected release and possible interruption to the customer before
168
+ calling the tool with `deployment_id`, `target_version` and `confirm: true`.
169
+ The hosted connector uses its two-call `confirm_token` flow instead.
170
+ The operation requires `manage` scope and a compatible API and agent.
171
+
172
+ A historical release may no longer be retained. The agent checks local images
173
+ and unchanged ports, storage and routing before replacing containers. It saves
174
+ the current healthy runtime and attempts recovery if the selected release fails
175
+ startup. Database contents and mutable data are not reverted. A queued response
176
+ does not confirm restoration; check deployment history for the result.
177
+
178
+ Available in impreza-mcp 0.12.0. Requires a compatible API and agent.
179
+
180
+ ## Static npm sites
181
+
182
+ Static npm sites: choose build_strategy=node_npm_static with a Git/context source (mode=dockerfile), or Static site + npm in the portal. Requires an independent npm package in the selected project folder, matching package-lock.json and a build script producing index.html in the selected output folder. Node 24 installs dependencies and runs the build; unprivileged Nginx serves only the selected output folder with configurable SPA fallback. No start script is required. Default target_port is 8080. Compose 2.17+ and BuildKit required. No SSR, server functions, workspaces, private npm configuration or build secrets. Runtime variables (including VITE_* and PORT) do not rewrite static bundles or change the configured Nginx port. Use static_output_dir (default dist) to choose a relative output folder containing index.html, and static_spa (boolean, default true) to choose SPA fallback or 404 for unknown routes. The portal exposes both fields. Paths are limited to 120 characters and five segments, without hidden, parent or node_modules segments; symlinks in the output or its parent path are refused. These settings are chosen at creation, stored in the recipe snapshot, exposed as static_options and carried to new previews. Redeploy reuses the saved recipe; changing these settings on existing deployments requires creating a new deployment. Existing snapshots keep their original recipe. Local MCP option inputs require 0.16.0+. Use public_build_vars for supported public settings; other build-time configuration requires a custom Dockerfile. Source .env/.env.*/.npmrc/.git/node_modules are excluded; review all generated files because the output folder is public. Missing index.html and symlink output fail the build. Existing preview/redeploy snapshots preserve the strategy. Local MCP requires 0.15.0+; no agent upgrade is needed beyond the existing build executor. The analyzer returns static_npm_recipe and conditional deployment_options; metadata is not proof of a static, working build.
183
+
184
+ ## Status
185
+
186
+ **Package version: 0.18.0.** The tool catalog covers app deployment plus account +
187
+ crypto balance, catalog + ordering, domains/DNS + registration, invoices, VPS
188
+ lifecycle with snapshots and backups, dedicated / bare-metal servers, plan
189
+ upgrades, and Titan / Google Workspace mailboxes — with a setup wizard that
190
+ generates ready-to-paste config snippets for 5 AI tools.
191
+
192
+ On top of that, everything an app needs after it is running: backup and
193
+ restore into the customer's **own** S3 bucket, a timer on an app with its
194
+ output kept, outbound webhooks so you stop polling, and reading the app's own
195
+ files to find out why it behaves as if it were not configured.
196
+
197
+ On top of that, everything an app needs after it is running: backup and
198
+ restore into the customer's **own** S3 bucket, a timer on an app with its
199
+ output kept, outbound webhooks so you stop polling, reading the app's own
200
+ files, and running the app's own command line.
201
+
202
+ The local (`npx`) server and the hosted OAuth connector expose the **same 116
203
+ tools**, so nothing is lost by picking either path.
204
+
205
+ ### New in 0.11.0
206
+
207
+ **Run the app's own command line.** WP-CLI for WordPress, `occ` for
208
+ Nextcloud, `gitea admin` for Gitea, and the database client for a dump —
209
+ `impreza_app_cli` to run, `impreza_get_cli_run` to collect the output. Call
210
+ `impreza_get_cli_run` with no `run_id` first: it names the command lines the
211
+ app has, says what each is for, and gives one example that works.
212
+
213
+ - **No docker socket, and that is measured rather than claimed.** The command
214
+ runs in a separate container built from the app's own image, joined to the
215
+ app's own network, with its data mounted — the shape the official CLI
216
+ images are designed for. `cap_drop: ALL`, and no new privilege on the
217
+ machine.
218
+ - **Arguments are a list, never a string.** Each element becomes one `argv`
219
+ entry through `execve`, so nothing is split, globbed or substituted:
220
+ quoting is not your problem, and a `$` or a `;` inside a value is just
221
+ that. Verified against a live site — `option update blogname
222
+ 'dollars $HOME and a ; semicolon'` reads back exactly as sent.
223
+ - **Destructive, and treated as such.** A command line can do anything the
224
+ app itself can, so it needs the `manage` scope and is confirmation-gated.
225
+ Arguments are free rather than allowlisted: that is the same ceiling
226
+ `uninstall` with `purge_data` already sits at, and a list of `wp`
227
+ subcommands would age badly while protecting nothing the confirmation gate
228
+ does not.
229
+ - **The CLI version follows the app.** Where the command line is the app's
230
+ own image it is taken from that deployment, so a catalog bump carries it —
231
+ running `occ` from an older Nextcloud against a newer database is how a
232
+ maintenance command corrupts an install.
233
+
234
+ Custom deployments have no command line here: it is your own image and the
235
+ platform cannot know what it ships. Use a scheduled task of kind `command`
236
+ for those.
237
+
238
+ ### New in 0.10.0
239
+
240
+ **Look inside the app's own files.** `impreza_get_logs` reads stdout, which
241
+ cannot answer the question a deploy that came up wrong actually raises: did
242
+ that variable reach the config file? Two tools now do —
243
+ `impreza_inspect_app` to ask and `impreza_get_app_read` to collect the answer.
244
+
245
+ - **Four actions, and no fifth:** `list` a directory, `read` a file (capped at
246
+ 256 KB), `tail` its last lines, `grep` under a path with an extended regular
247
+ expression. There is no command string in the interface, and therefore no
248
+ shell.
249
+ - **Read-only by construction.** A one-shot container mounts the app's storage
250
+ read-only — the same mechanism the backup already uses — with no docker
251
+ socket and no write capability. So it also works on an app that is `failed`
252
+ and will not start, which is when it is wanted most.
253
+ - **Only the app's own storage:** `data`, or one of the named volumes the app's
254
+ manifest declares (a WordPress exposes `data` and `wp_db`, so its database
255
+ files are readable too). Call `impreza_get_app_read` with no `read_id` to
256
+ see the list for a given app.
257
+ - **What comes back is untrusted and often secret** — an app's config file is
258
+ where its database password lives. It reaches you and nothing else: the
259
+ field is on our request log's deny list, and the record is deleted within a
260
+ day.
261
+
262
+ ### Since 0.6.1
263
+
264
+ Three releases the npm page never described, each one a whole capability:
265
+
266
+ - **0.7.0 — backup and restore** of a deployment's data into the account's own
267
+ Impreza S3 bucket, with a per-chunk SHA-256 manifest that sits beside the
268
+ data so the copy stays verifiable with the customer's own credentials and no
269
+ call to us. Plus a schedule (daily by default, keeping 3), and a restore
270
+ that can land in a *different* app, which is how an app moves between
271
+ servers.
272
+ - **0.8.0 — scheduled tasks:** a timer on an app with the output kept, for the
273
+ apps that need one to behave correctly (Nextcloud's cron, WordPress's
274
+ `wp-cron` on a site with no visitors).
275
+ - **0.9.0 — outbound webhooks:** subscribe to deploy, backup and VPS events
276
+ and stop polling, with HMAC-signed delivery and a delivery log.
277
+
278
+ ### New in 0.6.1
279
+
280
+ **`tools/list` now reflects what your account actually owns.** About a third of
281
+ the tools only make sense if you have the machine behind them — VPS power
282
+ controls with no VPS can only ever answer "not found" — so those are left out
283
+ of the listing until you own one. Typical accounts see around 70 tools instead
284
+ of 97, which is roughly six thousand fewer tokens of context spent before you
285
+ ask anything.
286
+
287
+ Three things worth knowing about how it behaves:
288
+
289
+ - **The purchase path is never filtered.** An account that owns nothing is the
290
+ one that needs to buy something, so ordering, top-up, invoices and the
291
+ catalogue are always listed.
292
+ - **Buying something grows the list mid-session.** The server sends
293
+ `notifications/tools/list_changed` on the same response as the order, so a
294
+ client that honours it picks up the new tools without reconnecting.
295
+ - **It fails open.** If this server cannot reach the API to ask, it lists
296
+ everything rather than guess.
297
+
298
+ Hiding a tool is not an authorization boundary — the API still refuses anything
299
+ your account does not own. This only stops the listing from carrying tools that
300
+ could never work for you.
301
+
302
+ ### New in 0.6.0
303
+
304
+ Four things that only make sense on a host built for anonymity:
305
+
306
+ - **Dark previews** — push a branch, get a preview on its own ephemeral Tor
307
+ `.onion`. Every other platform's preview URL puts your branch name into
308
+ public DNS and into a permanent Certificate Transparency log; branch names
309
+ carry ticket ids, customer names and unshipped features. This one creates
310
+ neither record, and destroys its keys when the branch is deleted or the TTL
311
+ runs out. `impreza_configure_previews`, `impreza_list_previews`,
312
+ `impreza_retire_preview`.
313
+ - **Agent sub-credentials** — mint a narrower credential from the one you hold
314
+ and hand it to a subtask: one deployment, one hour, no spending. A child can
315
+ never exceed its parent on any axis, and revoking a credential revokes
316
+ everything it minted, however deep. `impreza_mint_subcredential`,
317
+ `impreza_list_credentials`, `impreza_revoke_credential`,
318
+ `impreza_agent_activity`.
319
+ - **A privacy report you can check** — `impreza_privacy_report` returns every
320
+ field we store about your account, what it is for, how long it survives and
321
+ who else sees it, and then measures our own retention against the oldest
322
+ record that actually survived. Counts and date ranges, never contents.
323
+ - **Ask before you guess** — search our docs, validate a deployment manifest
324
+ before deploying it (including a privacy lint for third-party CDNs, public
325
+ DNS resolvers and leaked secrets), or run a diagnosis when something is
326
+ wrong. `impreza_search_docs`, `impreza_validate_manifest`, `impreza_doctor`.
327
+
328
+ Plus the Tasks extension, so long operations report completion instead of
329
+ leaving you to poll, and three MCP Apps panels — a payment card, a server card
330
+ and a deploy wizard — that render inside clients which support them.
331
+
332
+ The table below is a **selection**, not the full list — it covers the tools
333
+ most people reach for first. Your client's own tool listing is authoritative,
334
+ and `impreza_api_search` finds anything not named here.
335
+
336
+ | Tool | Wraps |
337
+ |------|-------|
338
+ | **Apps & deployments** | |
339
+ | `impreza_list_servers` | `GET /v1/platform/servers` |
340
+ | `impreza_list_apps` | `GET /v1/platform/apps` |
341
+ | `impreza_list_deployments` | `GET /v1/platform/deployments` + `/custom` (merged) |
342
+ | `impreza_upload_context` | `POST /v1/platform/deployments/custom/contexts?retain=true` |
343
+ | `impreza_list_contexts` | `GET /v1/platform/deployments/custom/contexts[/{context_id}]` |
344
+ | `impreza_delete_context` | `DELETE /v1/platform/deployments/custom/contexts/{context_id}` |
345
+ | `impreza_deploy_custom` | `POST /v1/platform/deployments/custom` (3 modes) |
346
+ | `impreza_deploy_catalog_app` | `POST /v1/platform/deployments` |
347
+ | `impreza_uninstall_deployment` | `POST .../uninstall` |
348
+ | `impreza_get_logs` | `POST .../logs` (sync tail, last N lines) |
349
+ | `impreza_restart_deployment` | `POST .../restart` |
350
+ | `impreza_redeploy_deployment` | `POST .../custom/{id}/redeploy` (in-place rebuild, same domain) |
351
+ | `impreza_add_onion` | `POST .../onion/add` |
352
+ | `impreza_change_domain` | `POST .../domain` |
353
+ | `impreza_git_webhook_status` | `GET .../custom/{id}/git-webhook` |
354
+ | `impreza_git_webhook_connect` | `POST .../custom/{id}/git-webhook/connect` |
355
+ | `impreza_git_webhook_disconnect` | `POST .../custom/{id}/git-webhook/disconnect` |
356
+ | **Account & balance** | |
357
+ | `impreza_account_info` | `GET /v1/account` |
358
+ | `impreza_list_services` | `GET /v1/account/services` |
359
+ | `impreza_topup` | `POST /v1/account/topup` — top up in BTC / XMR / USDT / TRX |
360
+ | `impreza_topup_status` | `GET /v1/account/topup/{invoice_id}` |
361
+ | `impreza_topup_payment` | `GET /v1/account/topup/{invoice_id}/payment` — crypto address + amount to pay |
362
+ | **Catalog & ordering** | |
363
+ | `impreza_list_products` | `GET /v1/products` — plans + pricing (filter `type=server` for VPS/dedicated) |
364
+ | `impreza_order_vps` | `POST /v1/orders` — buy from balance; born deployable (`@agent`); 202 + poll `impreza_list_servers` |
365
+ | **Domains & DNS** | |
366
+ | `impreza_domain_check` | `GET /v1/domains/check` |
367
+ | `impreza_domain_details` | `GET /v1/domains/{domain}` |
368
+ | `impreza_list_dns` | `GET /v1/domains/{domain}/dns` |
369
+ | `impreza_add_dns_record` | `POST /v1/domains/{domain}/dns` |
370
+ | `impreza_update_dns_record` | `PUT /v1/domains/{domain}/dns` |
371
+ | `impreza_delete_dns_record` | `DELETE /v1/domains/{domain}/dns` |
372
+ | `impreza_set_nameservers` | `PUT /v1/domains/{domain}/nameservers` |
373
+ | **VPS lifecycle** (Proxmox) | |
374
+ | `impreza_vps_status` | `GET /v1/vps/proxmox/{id}/status` |
375
+ | `impreza_vps_power` | `POST /v1/vps/proxmox/{id}/{start\|shutdown\|reboot\|stop}` |
376
+ | `impreza_vps_list_backups` | `GET /v1/vps/proxmox/{id}/backups` |
377
+ | `impreza_vps_create_backup` | `POST /v1/vps/proxmox/{id}/backups` |
378
+ | `impreza_vps_list_templates` | `GET /v1/vps/proxmox/{id}/templates` |
379
+ | `impreza_vps_reinstall` | `POST /v1/vps/proxmox/{id}/reinstall` — destructive (wipes) |
380
+
381
+ ## Install + setup
382
+
383
+ ### Prerequisites
384
+
385
+ - Node ≥ 20
386
+ - An Impreza Host account with an API key + secret
387
+ (clientarea → API Keys; the IP of the machine running this MCP
388
+ server must be whitelisted under the key)
389
+
390
+ ### One-shot via `npx`
391
+
392
+ No global install needed — `npx impreza-mcp` works.
393
+
394
+ ### Or install globally
395
+
396
+ ```sh
397
+ npm install -g impreza-mcp
398
+ ```
399
+
400
+ ### Get a ready-to-paste config snippet
401
+
402
+ The fastest path: ask the binary itself.
403
+
404
+ ```sh
405
+ npx impreza-mcp setup --tool claude-code
406
+ # also: cursor | continue | zed | codex-cli
407
+ ```
408
+
409
+ The wizard prints the JSON block to drop into your AI tool's MCP
410
+ config + the exact file path + the post-config step (usually "fully
411
+ quit + re-open the AI tool"). It does NOT write to disk — paste it
412
+ yourself so you don't accidentally clobber an existing config with
413
+ other MCP servers.
414
+
415
+ ### Or wire it in manually
416
+
417
+ **Claude Code** — add to `~/Library/Application Support/Claude/claude_desktop_config.json`
418
+ (macOS) or `%APPDATA%/Claude/claude_desktop_config.json` (Windows):
419
+
420
+ ```json
421
+ {
422
+ "mcpServers": {
423
+ "impreza": {
424
+ "command": "npx",
425
+ "args": ["-y", "impreza-mcp"],
426
+ "env": {
427
+ "IMPREZA_API_KEY": "imp_...",
428
+ "IMPREZA_API_SECRET": "..."
429
+ }
430
+ }
431
+ }
432
+ }
433
+ ```
434
+
435
+ Restart Claude Code. The tools appear under the MCP icon.
436
+
437
+ **Cursor** — add to `~/.cursor/mcp.json` (same shape as above).
438
+
439
+ **Continue** — add to `~/.continue/config.json`:
440
+
441
+ ```json
442
+ {
443
+ "experimental": {
444
+ "modelContextProtocolServers": [
445
+ {
446
+ "transport": {
447
+ "type": "stdio",
448
+ "command": "npx",
449
+ "args": ["-y", "impreza-mcp"],
450
+ "env": {
451
+ "IMPREZA_API_KEY": "imp_...",
452
+ "IMPREZA_API_SECRET": "..."
453
+ }
454
+ }
455
+ }
456
+ ]
457
+ }
458
+ }
459
+ ```
460
+
461
+ **Zed** — add to your settings:
462
+
463
+ ```json
464
+ {
465
+ "context_servers": {
466
+ "impreza": {
467
+ "command": {
468
+ "path": "npx",
469
+ "args": ["-y", "impreza-mcp"],
470
+ "env": {
471
+ "IMPREZA_API_KEY": "imp_...",
472
+ "IMPREZA_API_SECRET": "..."
473
+ }
474
+ }
475
+ }
476
+ }
477
+ }
478
+ ```
479
+
480
+ ## Usage in chat
481
+
482
+ After setup, talk to your AI naturally:
483
+
484
+ > *"List my Impreza servers."* → calls `impreza_list_servers`
485
+ >
486
+ > *"Deploy this directory to my Impreza VPS, expose via .onion."* →
487
+ > packages the cwd as a Dockerfile-mode custom deploy, uploads, deploys
488
+ > with `onion=true`, reports the .onion address.
489
+ >
490
+ > *"What apps are running on my agent?"* → calls
491
+ > `impreza_list_deployments` filtered to the right server.
492
+
493
+ ## Auth + security
494
+
495
+ `IMPREZA_API_KEY` + `IMPREZA_API_SECRET` live in the AI tool's MCP
496
+ config env — not in any file on disk owned by `impreza-mcp` itself.
497
+ The MCP server holds the secret only in memory and only attaches it
498
+ as HTTP request headers.
499
+
500
+ The IP of the machine running this MCP server (almost always your
501
+ laptop) must be on the API key's whitelist. Manage the whitelist in
502
+ your Impreza clientarea.
503
+
504
+ ## Build
505
+
506
+ ```sh
507
+ npm install
508
+ npm run build
509
+ # dist/server.js is the entry point
510
+ ```
511
+
512
+ ## License
513
+
514
+ MIT — see `LICENSE`.