Impreza Host
Tutorials/Connect an AI tool (MCP)
πŸ€– Tutorial 1

Connect an AI tool to Impreza Host

Talk to your infrastructure in plain language: "what do I have running?", "deploy this project to my Impreza server and give me the URL". Impreza speaks MCP (Model Context Protocol β€” the "USB standard" AI tools use to gain new abilities), so the AI can act for you without leaving the chat. There are two ways to connect β€” start with the easy one.

The idea in one sentence #

Impreza exposes your whole account through MCP β€” the deploy platform (servers, app catalog, custom apps, domains, Tor, git-push auto-deploy) plus domains & DNS, VPS lifecycle (power, backups, reinstall) and crypto balance top-ups. Connect once and your AI gains Impreza tools it can call on its own, mid-conversation. How you connect depends on whether you just want to look (any AI client, zero setup) or also act (a coding agent with the full toolset).

Two ways to connect #

 A Β· Remote connector + OAuthB Β· Local impreza-mcp
Best forAny AI client with remote connectors (Claude, incl. the web app). Zero install.Coding agents (Claude Code, Cursor, Codex CLI, Continue, Zed). Shipping local code.
SetupPaste a URL, click Authorize. No install.One npx command + an API key.
CredentialsNone to copy β€” OAuth, signed in your clientarea.X-API-Key + secret (or pair with a code).
ToolsFull toolset, gated by the scopes you grant (read / deploy / manage).Full toolset β€” plus uploading a local project folder.
Runs whereOur server (mcp.imprezahost.com).Your machine (next to the AI tool).
Both work side by side, and nothing was removed. The classic key + secret + IP whitelist setup keeps working exactly as before β€” these are just easier on-ramps. Both can do the full job; pick A for the fastest setup (any MCP client, no install), B for coding agents (and the only path that uploads a local project folder).

A Β· Remote connector + one-click OAuth easiest #

If your AI client supports remote MCP connectors (Claude does), this is the fastest path: no install, no API key, no IP whitelist. You paste one URL, the AI sends you to your Impreza clientarea to sign in and approve, and you're connected. Authorization happens entirely inside your own account β€” the AI never sees a password or a secret.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” add connector β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” sign in β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Claude / β”‚ ───────────────▢ β”‚ mcp.imprezahost β”‚ ────────▢ β”‚ portal.imprezahost β”‚ β”‚ MCP clientβ”‚ paste URL + β”‚ .com/mcp (remote)β”‚ approve β”‚ .com (your account) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ◀─────────────── β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ◀──────── β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ tool calls "Authorize" access token consent screen (you pick scope)

Connect in 4 steps

  1. In your AI client, open the connector settings. In Claude: Settings β†’ Connectors β†’ Add custom connector. (Other MCP-capable clients have an equivalent "add remote MCP server" option.)
  2. Give it a name (e.g. Impreza) and paste the server URL:
    https://mcp.imprezahost.com/mcp
  3. Click Connect. The client registers itself automatically and opens an Impreza page β€” sign in to your clientarea if you aren't already.
  4. You land on a consent screen showing the app name and what it's allowed to do. Click Authorize. Done β€” the AI now has the Impreza tools.
Why this is safe even though it's so quick. You approve the connection inside your own clientarea, after logging in β€” the AI client only receives a scoped, revocable token, never your password or API secret. The consent screen lets you pick exactly what to grant β€” Read and Deploy are offered, Manage (destructive, e.g. uninstall) is opt-in β€” and you can revoke it any time (below). Third-party AI clients register themselves, so the consent screen marks them "unverified" β€” that's expected; verify the app name and the redirect target look right before approving.

What you can ask

Anything the scopes you granted allow β€” the same toolset as the local server. For example:

Scope-gated. The connector can reach every tool, but each call is checked against what you approved on consent β€” read (see), deploy (create & operate), manage (destructive, opt-in). A call beyond your grant comes back with a clear "scope does not permit" message; re-authorize to widen or narrow it. The one thing only the local path does: upload a project folder straight from your machine β€” the hosted connector builds from a git URL or a public image instead.

Manage & disconnect

Every app you authorize shows up in clientarea β†’ Impreza API β†’ Connected Apps, with its scope and last-used time. Click Disconnect to revoke its token instantly (the AI client loses access on its next call). You can also remove the connector from the AI client's own settings.

.onion / Tor users: the OAuth sign-in is a normal browser flow over clearnet. If you operate Tor-only, use the local impreza-mcp path (Method B) with a key β€” it never needs a browser.

B Β· Local impreza-mcp β€” the full deploy toolset #

For coding agents β€” Claude Code, Cursor, Codex CLI, Continue, Zed β€” install the impreza-mcp server next to the tool. It runs on your machine (not the VPS) and gives the AI all 31 tools, including deploy. This is the AI-native path for shipping code.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” tool calls β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” HTTPS β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” poll β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Claude / β”‚ ──────────────▢ β”‚ impreza-mcp β”‚ ────────▢ β”‚ api.imprezahostβ”‚ ◀──────── β”‚ agent β”‚ β”‚ Codex / … β”‚ "do the deploy" β”‚ (your laptop)β”‚ X-API-* β”‚ .com (control) β”‚ ────────▢ β”‚ your VPS β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ◀────────────── β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ◀──────── β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ commands β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ "done: URL X"
The part that confuses people: impreza-mcp runs on your machine (next to Claude Code), not on the VPS. It is only the bridge between the AI and our API. The thing that actually runs your apps is the agent inside the VPS, covered in Tutorial 2.

The 3 prerequisites (read this first)

Most beginner problems come from skipping one of these three. The AI will complain with "no servers on your account" or 403 IP_NOT_WHITELISTED, and it is always one of them:

#PrerequisiteHow to know you have it
1A server (VPS / dedicated, Impreza or BYO)Shows under My Apps
2The agent running on itstatus: online in My Apps
3An API key (IP whitelist optional β€” see below)Created under Impreza API

1 β€” A server

Three ways to get one:

At checkout, pick what to install. The cart shows a tile picker:
  • Impreza Agent β€” just the agent.
  • Agent + MCP for AI tools β€” the agent plus a post-purchase email with the MCP quickstart. Best pick for the AI flow in this tutorial.
  • A catalog app (WordPress, n8n, Vaultwarden…) β€” the agent plus that app.
  • No app β€” bare server, no agent (install later).
  • A control panel β€” exclusive mode, no agent and no Docker catalog. Not for the AI flow; see Tutorial 2.

2 β€” The agent running on the server

If you bought from Impreza and chose "Impreza Agent" / "Agent + MCP" / a catalog app, the agent is already installed β€” skip to the API key. Otherwise:

  1. Sign in to portal.imprezahost.com β†’ My Apps.
  2. Click + Add another server (or the Custom App tile, shown when you have a server but no online agent). The panel mints a 10-minute bootstrap token and prints a one-liner:
    curl -fsSL https://raw.githubusercontent.com/imprezahost/agent-public/main/install.sh \
      | IMPREZA_BOOTSTRAP=<token-from-panel> sh
  3. Run it on the VPS as root. Either SSH in yourself and paste it, or grant the AI SSH access and let it run the one-liner for you.
  4. Within ~10 seconds the agent appears in My Apps as status: online. Done.
The token expires in 10 minutes. Past that, the curl fails with BOOTSTRAP_EXPIRED β€” just click + Add another server again for a fresh one.

3 β€” API key (IP whitelist is now optional)

This is the credential the local MCP uses (different from the agent's own credential, issued automatically at bootstrap).

  1. Portal β†’ Impreza API.
  2. Give it a label (laptop, claude, ci…), pick an IP mode (next paragraph), and click Generate New Key.
  3. Copy the secret immediately. It is shown once; if you close the modal you cannot retrieve it (delete + recreate). The imp_… prefix stays visible. (Or skip the copy entirely β€” pair with a code.)

Choose how the key's second factor (IP) works β€” per key:

IP modeWhat it doesUse when
Whitelist defaultYou add the allowed IP(s); calls from anywhere else get 403 IP_NOT_WHITELISTED. The original behaviour.Static IP, maximum control.
Trust on first useThe first successful call pins that IP automatically; later calls must match. No manual whitelist step.You don't know the IP up front but it's stable (laptop, one server).
Key onlySkips the IP factor entirely β€” the key + secret alone authenticate. (Availability is set by the operator.)The caller's IP changes (CI, dynamic egress) and the secret is kept safe.
So the 403 is opt-out now. Pick Trust on first use or Key only and there is no whitelist step at all. Staying on Whitelist? Open the IP Whitelist tab and add the public IP of the machine running the AI tool (find it with curl https://api.ipify.org) β€” or just click Add my current IP. You can change a key's mode any time, and reset a trust-on-first-use binding to re-pin from a new location.

Install the local MCP (one command)

npx -y impreza-mcp setup --tool claude-code
# also supported: cursor | codex-cli | continue | zed

The wizard writes the MCP config for that tool, prints the exact config file path, and tells you to restart the tool.

Manual config (same shape for Claude Code, Cursor, Codex CLI)

{
  "mcpServers": {
    "impreza": {
      "command": "npx",
      "args": ["-y", "impreza-mcp"],
      "env": {
        "IMPREZA_API_KEY": "imp_...",
        "IMPREZA_API_SECRET": "..."
      }
    }
  }
}

Fill IMPREZA_API_KEY / IMPREZA_API_SECRET with the key/secret from the step above and restart the AI tool. The only machine prerequisite is Node.js (it ships with npx).

Pair with a code (no secret to copy)

Don't want to copy-paste a secret into a config file? Pair the tool instead:

  1. Clientarea β†’ Impreza API β†’ Connect an AI assistant. Pick what the assistant may do (read / deploy / manage) and generate a one-time pairing code (valid 10 minutes).
  2. On the machine running the tool:
    npx -y impreza-mcp login --code <code-from-clientarea>
  3. The CLI exchanges the code for a key and stores it in ~/.impreza/credentials.json (permissions 0600). The secret is never printed. The MCP server reads it automatically β€” no env vars to set.
Paired keys come pre-scoped to what you picked and default to an IP mode that "just works" from the paired machine, so there's no whitelist step. Revoke a paired key any time from Impreza API like any other key.

The 31 tools the AI gains #

You never have to memorize these β€” just talk in plain language and the AI picks the right one. The remote connector exposes the same set; each call is gated by the scope you granted β€” β€’ needs only read, unmarked needs deploy, and ⚠ needs manage (destructive or financial β€” opt-in on the consent screen):

ToolDoes
Apps & deployments
impreza_list_servers β€’List the account's VPSes + agents
impreza_list_apps β€’Browse the catalog
impreza_list_deployments β€’What is currently running
impreza_deploy_customDeploy code from cwd (image / dockerfile / manifest)
impreza_deploy_catalog_appInstall a catalog app
impreza_uninstall_deployment ⚠Tear down a deployment
impreza_restart_deploymentRestart a deployment's containers
impreza_redeploy_deploymentRebuild a custom deployment in place (domain + URL preserved)
impreza_get_logsTail the last N lines of container logs
impreza_change_domainRe-route a running deployment to a new hostname
impreza_add_onionProvision a Tor .onion mirror for a deployment
impreza_git_webhook_status β€’Inspect the auto-deploy connection of a git-backed deployment
impreza_git_webhook_connectInstall a GitHub push webhook (every commit re-deploys)
impreza_git_webhook_disconnectDisable auto-deploy (optionally delete the hook on GitHub)
Account & balance
impreza_account_info β€’Profile, account status, currency + current balance
impreza_list_services β€’List billable services (VPS / hosting / domains) + their IDs
impreza_topup ⚠Create a balance top-up invoice in BTC / XMR / USDT / TRX
impreza_topup_status β€’Poll a top-up invoice until it's paid
Domains & DNS
impreza_domain_check β€’Check availability + price for one or more domains
impreza_domain_details β€’Status, expiry, nameservers, registrar-lock state
impreza_list_dns β€’List a domain's DNS records
impreza_add_dns_recordAdd an A / AAAA / CNAME / MX / TXT / … record
impreza_update_dns_recordChange an existing DNS record
impreza_delete_dns_recordRemove a DNS record
impreza_set_nameserversReplace a domain's authoritative nameservers
VPS lifecycle (Proxmox)
impreza_vps_status β€’Power state + live CPU / memory / disk / uptime
impreza_vps_list_backups β€’List available backups
impreza_vps_list_templates β€’List OS templates (to pick one for reinstall)
impreza_vps_powerStart / shutdown / reboot / stop
impreza_vps_create_backupTrigger an on-demand backup
impreza_vps_reinstall ⚠Wipe + reinstall from an OS template (erases all data)

Using it in practice #

Some prompts that work well (the AI understands plain English):

Flow tip: you never copy IDs (agt_…, dpl_…) by hand. Ask "list my servers" / "list my deployments" and the AI discovers the IDs before acting.

Troubleshooting #

SymptomCauseFix
Connector says "automatic client registration isn't supported"Old cached connector entryRemove the connector and re-add https://mcp.imprezahost.com/mcp β€” registration is automatic now
OAuth screen says the app is unverifiedExpected β€” third-party AI clients self-registerCheck the app name + redirect look right, then Authorize. Revoke later under Connected Apps
403 IP_NOT_WHITELISTED (local MCP)Key is in Whitelist mode and the IP isn't listedAdd it under Impreza API β†’ IP Whitelist (or click Add my current IP), or switch the key to Trust on first use / Key only
"no servers on your account"You have a VPS but no agent installedDo prerequisite 2 (My Apps β†’ + Add another server)
BOOTSTRAP_EXPIREDThe 10-min token expiredGenerate another via + Add another server
AI does not see the impreza_* toolsMCP did not loadCheck the config JSON + env vars, then restart the tool
401 / UnauthorizedWrong key/secret, or a revoked OAuth tokenThe secret shows once β€” delete the key and generate a new one; for OAuth, re-authorize the connector
400 "already in use" (domain)*.imprezaapps.com name is taken (shared namespace)Pick another name or leave it empty to auto-allocate

Under the hood #