# Remote agents (MCP) (/docs/agent-orchestrator/remote-agents)

`aisquare serve` exposes the orchestrator as an MCP server, so Claude clients that
are not local terminal sessions can read the board and file tasks, notes, and
feedback like any teammate. The classic case: a browser-debugging agent running
in the Claude desktop app reports bugs straight onto the board your coders
drain.

Remote callers act through an attributed virtual session (`mcp:<client>`,
scoped per project): their activity shows on the board and reaches every local
session's context automatically.

## Setup [#setup]

```sh
pip install 'aisquare-cli[serve]'
```

Starting the server from a repo is the explicit opt-in for that repo (it
activates orchestration there, visibly, the same as `aisquare team on`).

**Claude Desktop (stdio, simplest).** Register a local MCP server in
`claude_desktop_config.json`; the app launches and owns the process:

```json
{"mcpServers": {"aisquare-team": {"command": "wsl", "args": ["-e", "bash", "-lc",
  "cd /path/to/your/repo && aisquare serve --stdio"]}}}
```

The `wsl -e` form is for Windows with the repo living in WSL2; on macOS or
Linux, point `command` straight at `aisquare`.

**HTTP (for anything else).**

```sh
aisquare serve                   # streamable HTTP on 127.0.0.1:8747
aisquare serve --show-token      # the URL + bearer token to give the client
```

Every request needs the bearer token. The server binds loopback by default;
Windows reaches a WSL2 server via localhost automatically. `--bind 0.0.0.0` is
an explicit choice for LAN setups.

## The tool surface [#the-tool-surface]

Deliberately small (seven tools), because giant MCP surfaces burn a client's
context before any work happens: `team_board`, `task_add`, `task_next`,
`task_update`, `note_add`, `team_log`, `recall`.

A useful pattern for the remote agent's instructions:

> You are the team's debugger. Check `team_board` first. File every bug you
> find with `task_add` (role `coder`, with repro steps in `detail`). Report
> verification outcomes with `task_update` and share findings with `note_add`.

Name the client with `AISQUARE_SERVE_CLIENT=browser-debugger` and give it a
role with `AISQUARE_SERVE_ROLE=debugger` on the serve process, so the board
attribution reads right.
