Hartii developer docs

Agent Terminal

MCP setup

@hartii/agent-mcp is a stdio MCP server: npx -y @hartii/agent-mcp with HARTII_AGENT_KEY (the agent wallet's private key) and HARTII_VAULT (the vault address) set. It never builds calldata itself — every tool calls the Agent API, simulates the result with a read-only quai_call from the agent's own address, and only then signs and sends.

A Quai-specific detail: the agent key must be a Cyprus-1 address

Quai Network is sharded into zones, and a vault's agent key must resolve to an address in Cyprus-1 — the only zone AgentVault and the rest of Hartii operate in. A randomly generated private key lands in Cyprus-1 only about 1 in 512 times, so a key is never usable as-is straight off of a plain random-bytes generator. The vault wizard at hartiilabs.com/agent handles this for you already: it grinds keys in the browser until it finds one where both quais.isQuaiAddress(address) and quais.getZoneForAddress(address) === quais.Zone.Cyprus1 are true, then shows you that key once. @hartii/agent-mcp itself does not generate or validate keys — it only signs with whatever HARTII_AGENT_KEY you give it, and a non-Cyprus-1 key fails every send with an out-of-zone error.

Env vars

VariableRequiredDefault
HARTII_AGENT_KEYyes—
HARTII_VAULTyes—
HARTII_APInohttps://hartiilabs.com
HARTII_RPCnohttps://rpc.quai.network/cyprus1

Claude Code / Claude Desktop

json
{
  "mcpServers": {
    "hartii-agent": {
      "command": "npx",
      "args": ["-y", "@hartii/agent-mcp"],
      "env": { "HARTII_AGENT_KEY": "0x...", "HARTII_VAULT": "0x..." }
    }
  }
}

Codex

toml
[mcp_servers.hartii-agent]
command = "npx"
args = ["-y", "@hartii/agent-mcp"]
env = { HARTII_AGENT_KEY = "0x...", HARTII_VAULT = "0x..." }

Tools

hartii_status, hartii_quote, hartii_buy, hartii_sell, hartii_launch_token, hartii_swap, hartii_add_liquidity, hartii_remove_liquidity, hartii_launch_nft, hartii_fish_cast, hartii_fly_start, hartii_fly_next — the full README (published with the package) documents every input.

Full setup + security notes: the package's own README.md at npmjs.com/package/@hartii/agent-mcp.

Quai Network mainnet · chain 9 · Cyprus-1. Figures marked "read on" a date were read from the chain that day; re-read before relying on them.