Run the server locally (stdio)
Local stdio: install and sign in
Install the published CLI on the same machine that runs your MCP client:
npm install -g @haakco/hostingctl
hostingctl --version
hostingctl login --profile assistant --company your-company
hostingctl status --profile assistant
Replace your-company with your company slug. Complete Hosting sign-in and consent in your browser. Wait
for the terminal to report that the credential was stored for profile assistant. The status
command reports the selected profile and whether it is signed in without revealing credentials.
If you already installed the CLI, run hostingctl update before connecting. For a session without
a global installation, use npx --yes @haakco/hostingctl login --profile assistant --company your-company;
the saved profile is shared with subsequent runs of the same CLI.
Remote terminals and browsers that do not open
If login cannot open a browser, it prints an authorization URL and waits at Callback URL >:
- Open the printed HTTPS URL in your browser and sign in to Hosting.
- Approve the requested access. Hosting redirects to a
127.0.0.1callback URL. - If that address does not reach the CLI on your remote machine, copy the complete callback URL from your browser's address bar into the waiting terminal.
- Wait for
Signed in. Credential stored for profile "assistant".
Paste the callback URL only into the login process that requested it; it contains a short-lived
code. Do not paste it into a chat or save it in MCP configuration. To deliberately use this flow,
add --no-browser to the login command. CLI login covers the
saved-profile and API-target rules.
Connect Codex over stdio
After signing in, add this entry to your project's .codex/config.toml:
[mcp_servers.hosting]
command = "hostingctl"
args = ["mcp", "serve", "--profile", "assistant", "--company", "your-company", "--access", "read-only"]
startup_timeout_sec = 60
If you use npx instead of a global install, use this entry instead:
[mcp_servers.hosting]
command = "npx"
args = [
"--yes", "--registry=https://registry.npmjs.org/", "--@haakco:registry=https://registry.npmjs.org/",
"@haakco/hostingctl", "mcp", "serve", "--profile", "assistant", "--company", "your-company",
"--access", "read-only",
]
startup_timeout_sec = 60
The explicit registry keeps an unrelated private npm registry setting from resolving a different
package. The longer startup allowance covers the initial package download. Keep only one hosting
entry. Restart Codex after changing its MCP configuration; this starts a new server process with
the selected saved profile.
Ask the assistant to call whoami, then environments, and search docs for a Hosting task.
Successful calls prove authentication, a company-scoped API read and hosted documentation search. Eleven exposed
tools are expected in read-only mode. A status label such as “not started” alone does not prove a
failure: a successful tool call is the useful check. You can also inspect the full catalogue locally:
hostingctl mcp catalogue
Other stdio MCP clients
Use the equivalent command and arguments in your client's configuration. For clients that use JSON:
{
"mcpServers": {
"hosting": {
"command": "hostingctl",
"args": ["mcp", "serve", "--profile", "assistant", "--company", "your-company", "--access", "read-only"]
}
}
}
Settings locations vary by client. The npm package runs its native Rust payload on macOS/Linux Intel or ARM and Windows Intel. Unsupported platforms refuse explicitly. Login and MCP must run as the same operating-system user with the same profile/configuration directory; a local laptop's login is not automatically available to an MCP process on a remote development machine.
Recover a local stdio connection
| Symptom | Next step |
|---|---|
| CLI command is missing | Install the npm package on the machine running the client, or use the npx entry. |
| Server refuses an unsigned-in profile | Run login with the same --profile and --company, then restart the MCP client. |
| Login, account, company or API target changed | Sign in outside MCP, then restart the server so its pinned identity matches. |
| A token was revoked or refresh was refused | Sign in again; do not copy a token into the client configuration. |
| Tool returns a permission refusal | Check the signed-in account's company membership and permissions. MCP does not grant additional access. |
Manual mcp serve appears to wait | Stdio is waiting for protocol messages from a client; use mcp catalogue for terminal output. |
Local stdio identity
The process pins the profile, API target and signed-in account. The selected profile company is
the default for tool calls. An explicit company slug is checked against current membership and
permissions on the server. The default follows the CLI's normal order: explicit flag,
environment, saved profile, then the account's sole company.
Each API action reloads the saved profile and uses the existing cross-process refresh lock. A removed
profile, changed identity/target/company, revoked token or invalid refresh grant refuses further API
work. Sign in outside MCP and restart the client server process to recover. Supplied bearer tokens
cannot be refreshed; token files are read once at startup. --token-stdin is refused because stdin
belongs to the protocol. The API remains the permission owner.