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

# Connect a coding agent

> Step-by-step MCP setup for Claude Code, OpenCode, Cursor, and Codex.

Every agent needs the same two values. Only the place where you put them is
different.

| Value    | Setting                                           |
| -------- | ------------------------------------------------- |
| Endpoint | `https://aquila.attaxr.com/mcp` (Streamable HTTP) |
| Header   | `Authorization: Bearer aqmcp_YOUR_KEY`            |

Select your agent below. Each guide starts with the key, so you can follow
one tab from start to end.

<Tabs>
  <Tab title="Claude Code" icon="https://mintcdn.com/attaxr/MHalKSj-bN0GdJYy/images/agents/claude-code.svg?fit=max&auto=format&n=MHalKSj-bN0GdJYy&q=85&s=32ea7a54f43c00a6ccaafb7e312d14f8" width="24" height="24" data-path="images/agents/claude-code.svg">
    Claude Code adds remote MCP servers with the `claude mcp add` command.

    <Steps>
      <Step title="Copy your MCP authorization key">
        1. Sign in to the [Aquila dashboard](https://aquila.attaxr.com).
        2. Open the user menu (your avatar, top right) and select **Settings**.
        3. Select **MCP Server**. The direct link is
           [aquila.attaxr.com/dashboard/settings?section=mcp-server](https://aquila.attaxr.com/dashboard/settings?section=mcp-server).
        4. In the **Authorization key** row, click **Reveal**. Then click **Copy**.

        The key starts with `aqmcp_`. Anyone with the key can run recon as you.
        Keep it private.

        If **Reveal** is not available, Aquila stores your key as a hash only. Click
        **Rotate key** to get a key that you can copy. Rotation stops the old key
        immediately.
      </Step>

      <Step title="Add the Aquila server">
        Run this command in a terminal. Replace `aqmcp_YOUR_KEY` with your
        key.

        ```bash theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
        claude mcp add --transport http --scope user aquila https://aquila.attaxr.com/mcp --header "Authorization: Bearer aqmcp_YOUR_KEY"
        ```

        `--scope user` makes Aquila available in all your projects. Claude
        Code stores the entry in `~/.claude.json`, which only you can read.
      </Step>

      <Step title="Check the connection">
        ```bash theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
        claude mcp list
        ```

        The Aquila line must show **Connected**:

        ```text theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
        aquila: https://aquila.attaxr.com/mcp (HTTP) - ✔ Connected
        ```

        In a Claude Code session, type `/mcp` to see the server and its
        tools.
      </Step>

      <Step title="Use the tools">
        Ask Claude Code for recon work in plain language. For example:
        "Use the aquila `list_scans` tool to show my five newest scans."
      </Step>
    </Steps>

    ### Share the server with your team

    To give every teammate the server through the repository, add a
    `.mcp.json` file to the project root. The file reads each person's key
    from the `AQUILA_MCP_KEY` environment variable, so no key goes into git.

    ```json .mcp.json theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
    {
      "mcpServers": {
        "aquila": {
          "type": "http",
          "url": "https://aquila.attaxr.com/mcp",
          "headers": {
            "Authorization": "Bearer ${AQUILA_MCP_KEY}"
          }
        }
      }
    }
    ```

    Put the key in the `AQUILA_MCP_KEY` environment variable. The agent reads the
    key from this variable, so the key never goes into a config file.

    <CodeGroup>
      ```bash macOS and Linux theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
      # Add this line to ~/.zshrc or ~/.bashrc so that new terminals keep it.
      export AQUILA_MCP_KEY="aqmcp_YOUR_KEY"
      ```

      ```powershell Windows (PowerShell) theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
      setx AQUILA_MCP_KEY "aqmcp_YOUR_KEY"
      # setx applies to new terminals only. Open a new terminal before you continue.
      ```
    </CodeGroup>

    Claude Code asks each person to approve a project server one time.
    Until then, `claude mcp list` shows the server as **Pending approval**.
    Start `claude` in the project and approve the server.
  </Tab>

  <Tab title="OpenCode" icon="https://mintcdn.com/attaxr/MHalKSj-bN0GdJYy/images/agents/opencode.svg?fit=max&auto=format&n=MHalKSj-bN0GdJYy&q=85&s=8a657206ffed0c8ef02cf7333d6f694a" width="24" height="24" data-path="images/agents/opencode.svg">
    OpenCode reads remote MCP servers from the `mcp` block of its
    `opencode.json` config.

    <Steps>
      <Step title="Copy your MCP authorization key">
        1. Sign in to the [Aquila dashboard](https://aquila.attaxr.com).
        2. Open the user menu (your avatar, top right) and select **Settings**.
        3. Select **MCP Server**. The direct link is
           [aquila.attaxr.com/dashboard/settings?section=mcp-server](https://aquila.attaxr.com/dashboard/settings?section=mcp-server).
        4. In the **Authorization key** row, click **Reveal**. Then click **Copy**.

        The key starts with `aqmcp_`. Anyone with the key can run recon as you.
        Keep it private.

        If **Reveal** is not available, Aquila stores your key as a hash only. Click
        **Rotate key** to get a key that you can copy. Rotation stops the old key
        immediately.
      </Step>

      <Step title="Store the key in an environment variable">
        Put the key in the `AQUILA_MCP_KEY` environment variable. The agent reads the
        key from this variable, so the key never goes into a config file.

        <CodeGroup>
          ```bash macOS and Linux theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
          # Add this line to ~/.zshrc or ~/.bashrc so that new terminals keep it.
          export AQUILA_MCP_KEY="aqmcp_YOUR_KEY"
          ```

          ```powershell Windows (PowerShell) theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
          setx AQUILA_MCP_KEY "aqmcp_YOUR_KEY"
          # setx applies to new terminals only. Open a new terminal before you continue.
          ```
        </CodeGroup>
      </Step>

      <Step title="Add the Aquila server to your config">
        Open the global config at `~/.config/opencode/opencode.json`. On
        Windows, the file is `%USERPROFILE%\.config\opencode\opencode.json`.
        Create the file if it does not exist. To use Aquila in one project
        only, put the same block in `opencode.json` at the project root.

        ```json opencode.json theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
        {
          "$schema": "https://opencode.ai/config.json",
          "mcp": {
            "aquila": {
              "type": "remote",
              "url": "https://aquila.attaxr.com/mcp",
              "oauth": false,
              "headers": {
                "Authorization": "Bearer {env:AQUILA_MCP_KEY}"
              }
            }
          }
        }
        ```

        `"oauth": false` is necessary. Without it, OpenCode tries to start
        an OAuth sign-in. Aquila uses a key, not OAuth.

        If your file already has an `mcp` block, add only the `aquila`
        entry to it.
      </Step>

      <Step title="Check the connection">
        ```bash theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
        opencode mcp list
        ```

        The Aquila line must show **connected**:

        ```text theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
        ✓ aquila connected
            https://aquila.attaxr.com/mcp
        ```
      </Step>

      <Step title="Use the tools">
        Start `opencode` and ask for recon work in plain language. For
        example: "Use the aquila `search_leads` tool to find leads on
        example.com."
      </Step>
    </Steps>
  </Tab>

  <Tab title="Cursor" icon="https://mintcdn.com/attaxr/MHalKSj-bN0GdJYy/images/agents/cursor.svg?fit=max&auto=format&n=MHalKSj-bN0GdJYy&q=85&s=31e229952b084a2b2fd2d93293c2edd6" width="24" height="24" data-path="images/agents/cursor.svg">
    Cursor reads MCP servers from an `mcp.json` file.

    <Steps>
      <Step title="Copy your MCP authorization key">
        1. Sign in to the [Aquila dashboard](https://aquila.attaxr.com).
        2. Open the user menu (your avatar, top right) and select **Settings**.
        3. Select **MCP Server**. The direct link is
           [aquila.attaxr.com/dashboard/settings?section=mcp-server](https://aquila.attaxr.com/dashboard/settings?section=mcp-server).
        4. In the **Authorization key** row, click **Reveal**. Then click **Copy**.

        The key starts with `aqmcp_`. Anyone with the key can run recon as you.
        Keep it private.

        If **Reveal** is not available, Aquila stores your key as a hash only. Click
        **Rotate key** to get a key that you can copy. Rotation stops the old key
        immediately.
      </Step>

      <Step title="Open your global MCP config">
        Open `~/.cursor/mcp.json` in Cursor. On Windows, the file is
        `%USERPROFILE%\.cursor\mcp.json`. Create the file if it does not
        exist.

        The global file applies to all your projects. It is not part of a
        repository, so the key stays on your computer.
      </Step>

      <Step title="Add the Aquila server">
        Paste this config. Replace `aqmcp_YOUR_KEY` with your key.

        ```json ~/.cursor/mcp.json theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
        {
          "mcpServers": {
            "aquila": {
              "url": "https://aquila.attaxr.com/mcp",
              "headers": {
                "Authorization": "Bearer aqmcp_YOUR_KEY"
              }
            }
          }
        }
        ```

        If your file already has an `mcpServers` block, add only the
        `aquila` entry to it. Save the file.
      </Step>

      <Step title="Check the connection">
        Open **Customize** in the Cursor sidebar and find **aquila** in the
        MCP server list. Make sure the server is on. When Cursor connects,
        the entry lists the Aquila tools.

        If no tools show, turn the server off and on again, or restart
        Cursor.
      </Step>

      <Step title="Use the tools">
        In Agent chat, ask for recon work in plain language. For example:
        "Use the aquila `search_vulnerabilities` tool to list my critical
        findings." Cursor asks you to approve each tool call before it
        runs.
      </Step>
    </Steps>

    ### Use a project config instead

    To share the server through a repository, put the config in
    `.cursor/mcp.json` at the project root. Do not put a key in a file that
    goes into git. Read the key from an environment variable:

    ```json .cursor/mcp.json theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
    {
      "mcpServers": {
        "aquila": {
          "url": "https://aquila.attaxr.com/mcp",
          "headers": {
            "Authorization": "Bearer ${env:AQUILA_MCP_KEY}"
          }
        }
      }
    }
    ```

    Put the key in the `AQUILA_MCP_KEY` environment variable. The agent reads the
    key from this variable, so the key never goes into a config file.

    <CodeGroup>
      ```bash macOS and Linux theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
      # Add this line to ~/.zshrc or ~/.bashrc so that new terminals keep it.
      export AQUILA_MCP_KEY="aqmcp_YOUR_KEY"
      ```

      ```powershell Windows (PowerShell) theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
      setx AQUILA_MCP_KEY "aqmcp_YOUR_KEY"
      # setx applies to new terminals only. Open a new terminal before you continue.
      ```
    </CodeGroup>

    <Note>
      Cursor reads the variable from the environment that started Cursor.
      If you start Cursor from the Dock or the Start menu, it can miss a
      variable that you set in a terminal profile. If the server does not
      connect, start Cursor from a terminal, or use the global file with
      the key.
    </Note>
  </Tab>

  <Tab title="Codex" icon="https://mintcdn.com/attaxr/MHalKSj-bN0GdJYy/images/agents/codex.svg?fit=max&auto=format&n=MHalKSj-bN0GdJYy&q=85&s=99da67e7b318ccef28588d9a8a57da41" width="17" height="17" data-path="images/agents/codex.svg">
    Codex adds remote MCP servers with the `codex mcp add` command. Codex
    reads the key from an environment variable.

    <Steps>
      <Step title="Copy your MCP authorization key">
        1. Sign in to the [Aquila dashboard](https://aquila.attaxr.com).
        2. Open the user menu (your avatar, top right) and select **Settings**.
        3. Select **MCP Server**. The direct link is
           [aquila.attaxr.com/dashboard/settings?section=mcp-server](https://aquila.attaxr.com/dashboard/settings?section=mcp-server).
        4. In the **Authorization key** row, click **Reveal**. Then click **Copy**.

        The key starts with `aqmcp_`. Anyone with the key can run recon as you.
        Keep it private.

        If **Reveal** is not available, Aquila stores your key as a hash only. Click
        **Rotate key** to get a key that you can copy. Rotation stops the old key
        immediately.
      </Step>

      <Step title="Store the key in an environment variable">
        Put the key in the `AQUILA_MCP_KEY` environment variable. The agent reads the
        key from this variable, so the key never goes into a config file.

        <CodeGroup>
          ```bash macOS and Linux theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
          # Add this line to ~/.zshrc or ~/.bashrc so that new terminals keep it.
          export AQUILA_MCP_KEY="aqmcp_YOUR_KEY"
          ```

          ```powershell Windows (PowerShell) theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
          setx AQUILA_MCP_KEY "aqmcp_YOUR_KEY"
          # setx applies to new terminals only. Open a new terminal before you continue.
          ```
        </CodeGroup>
      </Step>

      <Step title="Add the Aquila server">
        Run this command in a terminal:

        ```bash theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
        codex mcp add aquila --url https://aquila.attaxr.com/mcp --bearer-token-env-var AQUILA_MCP_KEY
        ```

        The command writes this entry to `~/.codex/config.toml`. You can
        also add the entry to the file yourself:

        ```toml ~/.codex/config.toml theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
        [mcp_servers.aquila]
        url = "https://aquila.attaxr.com/mcp"
        bearer_token_env_var = "AQUILA_MCP_KEY"
        ```

        Codex sends the variable's value as
        `Authorization: Bearer <value>`.
      </Step>

      <Step title="Check the connection">
        ```bash theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
        codex mcp list
        ```

        The Aquila row must show `enabled` and `Bearer token`:

        ```text theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
        Name    Url                            Bearer Token Env Var  Status   Auth
        aquila  https://aquila.attaxr.com/mcp  AQUILA_MCP_KEY        enabled  Bearer token
        ```

        This list shows the config only. To see that the key works, start
        `codex` and type `/mcp`. The Aquila server must list its tools.
      </Step>

      <Step title="Use the tools">
        Ask Codex for recon work in plain language. For example: "Use the
        aquila `list_scans` tool to show my five newest scans."
      </Step>
    </Steps>
  </Tab>
</Tabs>

## Troubleshooting

| Symptom                                               | Cause                                                                                                                          | Fix                                                                                                                                  |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| `401` or `no bearer token`                            | The request has no `Authorization` header. Usually the environment variable is not set in the terminal that started the agent. | Run `echo $AQUILA_MCP_KEY` (PowerShell: `$env:AQUILA_MCP_KEY`) in that terminal. If it is empty, set it again and restart the agent. |
| `401` after the setup worked before                   | Somebody rotated the key. The old key stopped at that moment.                                                                  | Copy the new key from **Settings → MCP Server**. Update your config or variable.                                                     |
| The agent opens a browser for an OAuth sign-in        | The agent tried OAuth discovery. Aquila uses keys only.                                                                        | In OpenCode, set `"oauth": false`. In other agents, make sure the `Authorization` header is present.                                 |
| OpenCode shows `SSE error: Non-200 status code (401)` | Same as the first row. OpenCode can try SSE after the first attempt fails, and then it reports the SSE error.                  | Check the key and the variable.                                                                                                      |
| The server connects but shows no tools                | The agent may not reload its tool list after a config change.                                                                  | Restart the agent session. In Cursor, turn the server off and on.                                                                    |

<Tip>
  Every tool call runs as you. Aquila stays inside the approved scope of
  your scans and rejects targets outside that scope. See the
  [MCP overview](/mcp/overview) for the full tool surface.
</Tip>
