Skip to main content

Permissions and sign-in

Your assistant can reach Hosting in two ways:

  • Hosted HTTP (recommended). The assistant connects to Hosting's MCP address and you sign in in your browser. Nothing to install.
  • Local stdio. hostingctl mcp serve runs on your machine and uses your CLI login. See local stdio connection.

Both reach the same Hosting tools. Your assistant never gets more access than your account has in the panel, and you choose below how much of that it may use.

Hosted HTTP: connect and sign in​

Every account uses the same address:

https://hosting.haak.co/mcp

One connection reaches every company you belong to. The assistant calls whoami or companies to see them and passes a company slug on each company call; if you belong to one company it can leave the slug out. Check the connection with the connection checks.

If you connected before 2026-11-29, your entry uses an older per-company address. Move it with hostingctl mcp setup --client codex --replace --confirm (use your client), then sign in again.

The client signs in through Hosting's Passport OAuth flow with S256 PKCE. Built-in Dynamic Client Registration (DCR) registers a public client without a client secret. Hosting advertises its protected-resource and authorization-server discovery documents. Client ID Metadata Document registration is not advertised by this server.

For normal provisioning and management, request all four scopes: mcp:read mcp:write mcp:api:read mcp:api:write.

ScopeDelegated access
mcp:readStandard reads and docs; required for every Hosting MCP connection.
mcp:writeStandard application mutations, with preview and your client's approval prompt.
mcp:api:readFull API discovery, schemas and reads through api_search, api_schema and api_read.
mcp:api:writeFull API writes through api_write; deletions and money operations also ask through a form.

These scopes delegate operations under the signed-in actor's existing API permissions. They do not assign an administrator role or grant permissions the account lacks. Full API access can reach account and platform operations when that actor is authorized; those operations can affect more than the selected company. Use the lower-permission presets below when that is the intended scope.

The browser consent page shows the client name, signed-in account, requested access and exact deployment resource URL. Explicitly approve the intended scopes there. Grants remain bound to that resource through refresh. After changing scopes or moving to the shared address, sign in again and approve the new request. API operations that delete data or move money also need client support for form approval, and secret-bearing results need private Files downloads; requesting the scopes alone does not give an incompatible client that capability.

HTTP sign-in belongs to the MCP client. It does not read a hostingctl saved profile or require a CLI installation. Keep OAuth credentials in the client's credential store, outside chat and project configuration.

Automatic setup with hostingctl​

To have your assistant run the setup for you, give it the Markdown setup instructions for LLMs.

Install your chosen AI client first. Then run:

npx --yes --prefer-online @haakco/hostingctl@latest mcp setup --client codex --confirm

Setup writes connection settings. The AI client owns its browser login. Choose --client claude for Claude Code, --client pi for Pi, or configure several together:

npx --yes --prefer-online @haakco/hostingctl@latest mcp setup --client codex,claude,pi --dry-run
npx --yes --prefer-online @haakco/hostingctl@latest mcp setup --client codex,claude,pi --confirm

The first command previews the target files and login steps without writing anything. The second merges the connection into those files. Setup defaults to --access read-write --tools full-api, requesting all four scopes for provisioning and management. It preserves other servers and settings and never writes tokens. Run each printed login step, approve the account and requested access in your browser, then restart or reload the AI client. Existing grants need you to sign in again.

Choose less access by adding these flags to either setup command:

Setup flagsRequested scopesIntended use
No extra flagsmcp:read mcp:write mcp:api:read mcp:api:writeProvision and manage resources with existing account permissions.
--access read-onlymcp:read mcp:api:readDiscover and read the full API without changes.
--tools reviewedmcp:read mcp:writeStandard reads and the four reviewed application mutations.
--access read-only --tools reviewedmcp:readStandard reads and task guidance only.
OptionUse
--client codex,claude,piSelect the clients to configure; repeat the flag or use commas.
--location projectConfigure this project instead of your user account; trust/approve the project in the client.
--name hosting-otherKeep a second deployment under a separate name.
--api-url https://your-host/api/v1Select a different Hosting installation. Otherwise use the saved profile's API URL, or the public production API.
--profile nameUse that CLI profile's saved API URL; explicit options win. No tokens are copied.
--access read-onlyRequest reads without write scopes; the default is read-write.
--tools reviewedLimit delegation to the standard tools; the default is full-api.
--replaceReplace only the selected named entry when it differs. Preview first; this can replace an older stdio entry.
--jsonReturn file paths, scopes, change status and login steps as structured output.

Setup is safe to repeat. A conflicting name or malformed file stops before any files are written. If a later filesystem write fails, earlier files may already be configured; fix the reported path and rerun the same command. Setup refuses symbolic-link config files; edit the real file manually. It does not install the AI client, grant company permissions, sign in automatically, or change its tool approval settings. Claude Code means the terminal client, not the Claude web/desktop app.