Skip to main content

AI tool cannot connect to ZML Trade

Check whether the pass still shows as not used yet on the AI access page, then follow the error your AI tool reports: untrusted certificate, pass refused, or server unreachable.

Check whether it has connected

Open the AI access page in Trade and find the row for this pass. Once an AI tool has used it, Not used yet changes to Last used with a time. If the row stays at Not used yet, the AI tool has not connected yet. Match the error your AI tool shows against the cases below.

Claude on the web, Claude on mobile and ChatGPT on the web cannot connect to Trade. Trade is open only to AI tools installed on your computer, such as Claude Code, Cursor, VS Code, Codex and Claude Desktop. In a web app, connect to the Z Market Lab address instead.

The AI tool says the certificate is not trusted

Typical wording in the error: self signed certificate, unable to verify the first certificate, certificate verify failed.

Why: when you reach the server by its IP address, the installer could not get a trusted certificate for the public IP, so Trade is using a self-signed certificate for now. A browser lets you check the fingerprint and continue; an AI tool gives you no choice and refuses to connect.

When you open Trade by IP address, the AI access page also states that this server uses a self-signed certificate. If you set up your own domain and certificate for the server, check that the certificate is issued by a trusted authority and has not expired.

  • Switch to a trusted certificate (recommended): in your cloud console’s security group or firewall, allow inbound TCP 443, then run this on the server:

    bash
    sudo docker exec -it zml-trade-agent-1 trade-agent enable-ip-cert

    After that the AI tool needs no configuration change; just reconnect.

  • Make your computer trust this certificate: if the server has no public address and cannot get a certificate, export the server’s certificate and add it to your computer’s trusted root certificates. Node-based tools such as Claude Code and the bridge program used by Claude Desktop do not read the system certificate list; also set the environment variable NODE_EXTRA_CA_CERTS to the path of this certificate file, then reopen the tool. If you trusted it before and the tool stopped connecting after a server update, the certificate has been replaced once: export it and trust it again.

The pass is refused

If the AI tool reports 401, Unauthorized or “authentication required”, check each of these:

  • The configuration was not pasted in full: paste the whole generated text into the AI tool as it is. A pass starts with zt_, and the Bearer and the space before it must stay.

  • The pass has been revoked: if its row is no longer on the AI access page, it has been revoked. Generate a new one.

  • The sign-in password or username changed after the pass was generated: changing the password or username, or resetting the password on the server, invalidates every pass generated before. Generate a new one.

  • The address is wrong: the address is the one you use to open Trade, followed by /api/mcp. The generated text already has it filled in; do not change the path.

A pass is shown only once, when it is generated. If you cannot find it, there is nothing to recover: revoke the old one and generate a new one.

The connection times out or the server cannot be reached

An AI tool connects from your computer to the server. First open Trade in a browser on the same computer. If the browser cannot open it either, follow The browser can’t open Trade. If the browser can open it and the AI tool cannot connect, the certificate case above is the likely cause.

How to revoke a pass

On the AI access page, choose Revoke on the row for this pass and confirm. It takes effect immediately, and AI tools using this pass are disconnected. Revoke a pass when you stop using it, change computers, or suspect it has leaked.

The command that adds Trade to Claude Code contains the pass, and that line stays in your terminal history. If other people can use your computer or see the terminal history, delete the line from the history after running it. If the pass has already leaked, revoke it and generate a new one.