> ## Documentation Index
> Fetch the complete documentation index at: https://hub.hcompany.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> H Platform has three products: the Agents API (managed computer-use agents, base URL https://agp.eu.hcompany.ai/api/v2 or https://agp.hcompany.ai/api/v2 for the US), the Models API (Holo computer-use models for your own agent harness, OpenAI-compatible, at https://api.hcompany.ai/v1), and HoloTab (a free no-code Chrome extension that runs Holo in the user's browser, with recordable routines and schedules). The `holo` CLI (`pip install "hai-agents[cli]"`) runs Agents API agents from a terminal, drives the user's own desktop with `-a h/holo-desktop`, and serves coding agents through `holo mcp`.
> Authenticate with a bearer API key from the HAI_API_KEY environment variable. SDKs: `pip install hai-agents` (Python, `from hai_agents import Client`) and `npm install hai-agents` (TypeScript, `import { HaiAgentsClient } from "hai-agents"`). CLI: `holo`.
> Agents do work in a browser or on a desktop; describe the task as an imperative instruction. To run a task quickly, prefer the pre-built agent `h/web-surfer-flash`. Read results from the session's `latest_answer` after it reaches a terminal status.
> Sessions are the unit of work; wait for a terminal status (completed, failed, timed_out, interrupted), or idle for interactive sessions created with `idle_timeout_s`, before reading the answer. Use webhooks or the `changes` long-poll endpoint to follow progress.

# MCP tools

> Give a shell agent the MCP servers you use, like Linear, Notion, or GitHub, through mcporter. Keys stay on your machine, out of the agent's reach.

**1. Connect a server**

```bash Remote server theme={"system"}
holo connections add linear https://mcp.linear.app/mcp \
  -H 'Authorization: Bearer ${LINEAR_KEY}' \
  -d "issue tracker"
```

```bash Local command theme={"system"}
holo connections add files -- npx -y @modelcontextprotocol/server-filesystem ~/Documents
```

```bash Import theme={"system"}
holo connections import cursor  # or claude, claude-desktop
```

```json mcp.json theme={"system"}
// ~/.config/hai/mcp.json, the shape Cursor and Claude use
{
  "mcpServers": {
    "linear": {
      "url": "https://mcp.linear.app/mcp",
      "headers": { "Authorization": "Bearer ${LINEAR_KEY}" },
      "description": "issue tracker"
    },
    "files": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "~/Documents"]
    }
  }
}
```

`${LINEAR_KEY}` reads your environment or `~/.config/hai/.env`, so keys stay out of the file. `-d` is a hint for the agent.

**2. Check it**

`--check` connects to each server and counts its tools:

```bash theme={"system"}
$ holo connections --check
  deepwiki  docs of public GitHub repos  https://mcp.deepwiki.com/mcp  ✓ 3 tools
  files  npx -y @modelcontextprotocol/server-filesystem ~/Documents  ✓ 16 tools
```

A failing server shows `✗` and its error.

**3. Run an agent**

Every shell-mode agent on this machine gets them all.

> [tab] CLI
>
> ```bash theme={"system"}
> holo -a h/holo-code "List my open Linear issues"
> ```

> [tab] Python
>
> ```python theme={"system"}
> from hai_agents import Client
>
> client = Client()
> result = client.run_session(
>     agent={
>         "name": "linear-helper",
>         "description": "Works with my Linear issues.",
>         "environments": [{"id": "laptop", "kind": "desktop", "mode": {"type": "shell"}}],
>     },
>     messages="List my open Linear issues",
> )
> print(result.answer)
> ```
>
> Python sends the server names with the session.

> [tab] TypeScript
>
> Serve the shell, then start the session with the id it prints, and name the servers yourself:
>
> ```bash theme={"system"}
> holo local desktop --shell  # reads mcp.json at start
> ```
>
> ```typescript theme={"system"}
> import { HaiAgentsClient } from "hai-agents";
>
> const client = new HaiAgentsClient();
> const result = await client.runSession({
>   agent: {
>     name: "linear-helper",
>     description: "Works with my Linear issues.",
>     environments: [{ id: "laptop", kind: "desktop", mode: { type: "shell" }, sessionId: "<printed id>" }],
>   },
>   messages: "List my open Linear issues",
>   connections: [{ name: "linear", description: "issue tracker" }],
> });
> console.log(result.answer);
> ```

## What the agent runs

The agent sees each server's name and description, and loads the `h/mcporter` skill:

```bash theme={"system"}
mcporter list                                     # servers and their tools
mcporter list linear --brief                      # one server's tools
mcporter call linear.list_issues limit=10 --output json
```

## What stays private

| What | Who reads it |
| - | - |
| `~/.config/hai/mcp.json` and `.env` | The bridge on this machine, never the shell |
| The variables `${VAR}` names | Taken out of the shell's environment |
| Tool results | The agent, and H, like any command output |

`mcporter` reaches the servers through a local resolver, the one port the [sandbox](https://hub.hcompany.ai/agents-api/your-desktop.md#sandbox) opens for it. Its config holds a run token, no key.

A local command server runs as you, outside the sandbox, with only `PATH`, `HOME`, locale, and temp variables. Pass anything else with `-e NAME=value`.

## Session body

`POST /api/v2/sessions` takes an optional `connections` array: up to 100 `{ "name", "description"? }`, description up to 200 characters. Python and `holo` fill it from `mcp.json`.

```json theme={"system"}
{
  "agent": "h/holo-code",
  "messages": "Summarize my Linear inbox",
  "connections": [{ "name": "linear", "description": "issue tracker" }, { "name": "files" }]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.