Dashboard

MCP and AI assistants

Connect an AI assistant

Connect Claude or another MCP client to HCode with the hosted MCP server, by signing in or with an API key.

HCode has a hosted MCP server, so Claude or any other MCP client can list your projects, deploy, read logs and work with databases and backups. It uses the same operations as the customer API, and the same permissions. Nothing runs on your machine: every tool call goes to HCode.

The MCP reference lists every tool with its arguments and the permission it needs.

Connect a client

In Claude Code, install the HCode plugin. It connects this server for you.

In any other client, add a remote MCP server with this URL, using the HTTP transport:

text
https://hcode.hostafrica.com/mcp

Then authenticate by signing in or with an API key. Add the server once.

With an API key

Create a key under API keys and configure the client to send it as a bearer token. Include credential:read so the client can see which permissions it has; both presets include it.

By signing in

If your client supports MCP sign-in, it opens HCode in your browser. You need to be signed in to HCode directly, not through a link from the HostAfrica client panel. If you opened HCode from the client panel, you see "Sign in with your HCode password" instead: set a password on your account page if you haven't, click Sign out, sign in at https://hcode.hostafrica.com/auth/signin, then connect again from your client.

Signed in directly, you land on a page titled "Connect" followed by the client's name.

  1. Under Where it can work, pick the Organisation the client may use.
  2. Under Project access, keep All projects in this organisation or pick one project.
  3. Under What it can do, choose Read only or Standard automation, or open a group and tick individual permissions. Delete permissions are never ticked for you.
  4. Tick Stay connected if the client may renew its access without asking you again. Without it, you connect again when access expires.
  5. Click Authorize integration. Decline cancels.

The browser then returns to the client. If the client returns through an app link, as Claude Code does, the page stays open and shows "Access granted"; you can close it.

Standard automation selects every permission needed to deploy and connect databases. Access stays limited by your current role. A client HostAfrica hasn't verified is labelled "Unverified app"; only continue if you started the connection yourself and recognise the address shown under "Sends access to".

See and revoke connected clients

Clients you authorised by signing in are listed under Integrations in the sidebar, or at /settings/integrations, with their organisation, project and permissions. Click Revoke access to stop a client's current credentials and future refreshes. Clients that use an API key are revoked by revoking the key.

When someone is removed from the organisation, their client authorisations for it are revoked with their API keys.

Add a permission later

A client keeps the permissions it was given when it connected. A tool it can't use starts with "Not available to this credential" and names the permission it needs. To add it, revoke the client under Integrations and connect again, selecting that permission, or give it a key that has it.

How the tools behave

  • When the client connects, the server sends instructions describing the common workflows (deploying files or a repository, connecting a database, changing a static site into a server, waiting for a deploy) and how to handle secrets and personal data. Most clients pass them to the model.
  • The client sees every tool. Tools the credential's permissions don't allow start with "Not available to this credential" and name the permission they need. Calling one returns an error with code missing_scope and requiredScope, or organisation_credential_required for project creation on a project credential. Access is checked again on every call.
  • Read-only tools are marked as such, including the ones that take a request body, such as SQL queries. Tools that delete, overwrite, stop, roll back, restore, open database access or create credentials are marked destructive; set your client to ask before it runs those.
  • Every result is wrapped as {"untrusted_data": true, "source": "<operationId>", "note": "...", "data": ...}. Logs, query rows and repository files in data come from your projects and can contain text anyone could have written, so the model should treat them as data, not instructions.
  • Results are limited to 64,000 characters. Use the bounded log reads for long logs.
  • Work that is queued, such as a deploy, needs an idempotencyKey. Reuse it when retrying the same call.
  • To wait for a deploy, call getDeployment with waitSeconds (up to 50). It answers as soon as the deployment succeeds, fails or is cancelled, with done saying whether it finished, and a failed one includes the end of its build log in logTail when the credential has logs:read.
  • MCP can't carry file bytes. deployFiles takes a project's files as text (or base64) in one call, up to a 1 MiB request, and zips, uploads and deploys them. createApplicationProject takes the same files (or a base64 ZIP in archive) to create a new project from them and deploy it; that also needs source:write. For larger uploads, the file tools return a URL to send the bytes to over HTTP with the same credential.

Limits

Each tool call counts against the API rate limit of the key or sign-in it uses. The endpoint takes one JSON-RPC message per POST request; batches return HTTP 400. It keeps no session between requests and has no GET or server-sent event stream.