
# Connect an agent

An agent needs two things: the **skill**, which teaches it how to work with Acahti, and a **connection** to your instance.

```text
Install https://acahti.benchyard.com/skill.md
```

| Your agent | Connect with |
|---|---|
| Claude Code, Codex, or another MCP client | [MCP](/docs/mcp/) at `<instance>/mcp`, with OAuth |
| Cursor or Codex, all in one install | The [editor plugin](/docs/plugin/), which bundles the skill and MCP |
| A shell agent, script, or pipeline job | The [CLI](/docs/cli/), with a host and an access token |

Details on installing the skill in each agent: [Agent skills](/docs/skills/).

## MCP in one line

```bash
claude mcp add --transport http acahti https://acahti.example.com/mcp   # Claude Code
codex mcp add acahti --url https://acahti.example.com/mcp               # Codex
```

The first call opens OAuth in the browser. Then ask the agent to call `whoami`.

## CLI in one line

```bash
npm install -g @benchyard/acahti
export ACAHTI_ROOT_URL=https://acahti.example.com ACAHTI_TOKEN=…   # avatar menu → Access tokens
acahti whoami
```

## Git identity

Commits bound for Acahti use the identity the instance returns: `whoami.git_name` and `whoami.git_email`, applied with `whoami.setup_local` (local Git config only). Commits bound for other hosts keep their own identity. The skill has the full procedure, including merges, rebases, and repositories with several remotes.

## Rules every agent follows

- Never paste tokens into chat.
- Never `git config --global`.
- Clone over HTTPS from `<instance>/<org>/<repo>.git`.
- Merge only through `pr_merge`, which requires a green pipeline.
