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

# MCP Tools

> All 11 tools Director exposes over MCP, for agent callers.

Connect Director to any MCP-capable agent, then talk to it in plain language — the agent picks the right tool for what you ask.

## Connecting

```bash theme={null}
director mcp --create-key
```

This signs you in, mints an API key, and writes a working config into your agent (Claude Code, Cursor, Claude Desktop, or others) pointed at Director's hosted MCP endpoint over Streamable HTTP.

## Tools

| Tool                 | Required args      | What it does                                                                                                                                                                             |
| -------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `create_demo`        | `instruction`      | Queues a demo. `target`, `environment_id`, `path`, `credentials`, `options` are all optional. Returns immediately with `demo_id` and `status: "queued"` — non-blocking.                  |
| `get_demo_status`    | `demo_id`          | One snapshot of a demo's current state. Prefer `wait_for_demo` unless you specifically want a single poll.                                                                               |
| `wait_for_demo`      | `demo_id`          | Polls server-side until the demo finishes or `timeout_seconds` (1–600, default 120) elapses. A timeout returns the last known status with `timedOut: true` — this is not a demo failure. |
| `list_demos`         | —                  | Optional `limit` (1–100).                                                                                                                                                                |
| `create_environment` | `name`, `base_url` | Optional `credentials`, `reset`, `settle`, `skip_reset_verification`, `session_lineage_max_age_ms`. Idempotent on `name`.                                                                |
| `get_environment`    | `environment_id`   | Includes `sessionStatus`.                                                                                                                                                                |
| `update_environment` | `environment_id`   | Same optional fields as create. Pass `reset: null` to remove an existing reset hook.                                                                                                     |
| `list_environments`  | —                  |                                                                                                                                                                                          |
| `delete_session`     | `environment_id`   | Wipes the stored session only — the environment itself is untouched.                                                                                                                     |
| `create_login_code`  | `environment_id`   | Mints (or replaces) a pairing code for [`director session`](/director/cli-reference).                                                                                                    |
| `verify_environment` | `environment_id`   | Async — returns `sessionStatus: "checking"` immediately; poll `get_environment` for the result.                                                                                          |

All tool arguments use `snake_case`.

## The `loginCommand` convenience field

Any tool response that carries a pairing code (`create_login_code`, or a code embedded in another response) automatically gets a `loginCommand` field appended — a ready-to-paste `director session <code>` string. Hand this directly to a teammate; they don't need to know anything about pairing codes or environments.

## Errors

A failed tool call returns MCP's standard `isError: true`, with a `code`, `message`, and `remediation` your agent can act on — see [Errors](/director/errors) for the full list.
