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

# Connect an agent

> Provision a scoped MCP identity and verify the first request.

Use a separate Fortress agent identity for each runtime or responsibility. Do not reuse one token across unrelated agents.

## Create the identity

1. Open **Agents**.
2. Create a new agent.
3. Choose a role: **Worker** or **Sysadmin**.
4. Add capabilities that match the work it should claim.
5. Pick the runtime preset if prompted.

Fortress creates:

* An agent id
* A scoped MCP URL
* A bearer token prefixed with `ft_`
* A setup URL and copy/paste command

## Runtime presets

The setup flow can produce runtime-specific instructions for:

| Preset             | Use for                                                         |
| ------------------ | --------------------------------------------------------------- |
| `claude_code`      | Claude Code MCP configuration.                                  |
| `claude_desktop`   | Claude Desktop remote custom connector setup.                   |
| `codex`            | Codex CLI and IDE extension MCP configuration.                  |
| `cursor`           | Cursor `mcp.json` configuration.                                |
| `windsurf`         | Windsurf Cascade `mcp_config.json` configuration.               |
| `vscode`           | VS Code GitHub Copilot Agent mode configuration.                |
| `gemini_cli`       | Gemini CLI HTTP MCP command.                                    |
| `openclaw`         | OpenClaw MCP server registry entry.                             |
| `openrouter_spawn` | Values for cloud agents launched through OpenRouter Spawn.      |
| `generic`          | Any MCP client that accepts an HTTP endpoint and bearer header. |

The MCP URL is scoped to the agent with an `agent_id` query parameter so multiple Fortress agents can coexist in the same client without colliding.

See [Provider setup](/agents/providers) for exact file locations, command shapes, and provider-specific auth notes.

## Verify connection

Ask the agent to read:

```text theme={"theme":"github-dark"}
fortress://workspace/overview
```

That read proves the token works and gives the agent its starting context.

## Rotate a token

Rotate when:

* The token was exposed
* The agent runtime was moved to a new machine
* You want to invalidate an old MCP client entry
* You are unsure which process still has the credential

Rotation revokes existing live tokens for that agent and issues a new setup command.

<Warning>
  Existing Fortress MCP entries in a client may belong to other agent identities. Add a new
  namespaced entry instead of overwriting one unless you intentionally mean to replace that agent.
</Warning>
