Dashboard

API and automation

MCP

Connect an AI assistant or other MCP client to HCode with the hosted endpoint, with an API key or by signing in.

Note

Preview. A local MCP server package that runs on your own machine is coming but not published yet, and its name will change before it is. The hosted endpoint on this page is part of the dashboard and doesn't need it.

HCode has an MCP endpoint, so an AI assistant 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.

Connect a client

Add an MCP server to your client with this URL:

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

Then authenticate with an API key or by signing in.

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. You land on a page titled "Connect" followed by the client's name.

  1. Pick the Organisation the client may use.
  2. Under Project access, keep All projects in this organisation or pick one project.
  3. Under Requested permissions, untick anything the client shouldn't have.
  4. Click Authorize integration. Decline access cancels.

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.

How the tools behave

  • The client only sees tools your permissions allow, and access is checked again on every call.
  • Read-only tools are marked as such. 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, and poll the operation tools for the result.
  • File tools return instructions for transferring the bytes 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.