> ## Documentation Index
> Fetch the complete documentation index at: https://ctpf.q-uestionable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ctpf targets

> Manage scan targets

Create, list, and delete scan targets — the MCP servers, platforms, or endpoints that security tests run against.

## Commands

### `ctpf targets list`

List all configured targets.

```bash theme={null}
ctpf targets list
```

Displays a table with Name, Type, URI, and ID for each target.

***

### `ctpf targets add`

Add a new scan target. Supply the name and URI as positional arguments, or omit both to use
interactive prompts in a terminal.

```bash theme={null}
ctpf targets add <NAME> <URI> [--type <TYPE>] [--meta KEY=VALUE]
ctpf targets add
```

**Arguments:**

| Argument | Description                                                    |
| -------- | -------------------------------------------------------------- |
| `NAME`   | Human-readable target name. Prompted interactively if omitted. |
| `URI`    | Connection endpoint. Prompted interactively if omitted.        |

**Options:**

| Option             | Default  | Description                                                |
| ------------------ | -------- | ---------------------------------------------------------- |
| `--type`, `-t`     | `server` | Target type, such as `server` or `endpoint`.               |
| `--meta KEY=VALUE` | —        | Target metadata. Repeat the option to add multiple values. |

**Examples:**

```bash theme={null}
ctpf targets add "My Server" http://localhost:3000/sse
ctpf targets add "Local MCP" http://localhost:8080 --meta transport=sse
```

***

### `ctpf targets delete`

Delete a scan target.

```bash theme={null}
ctpf targets delete <ID> [--yes]
```

**Arguments:**

| Argument | Description                                            |
| -------- | ------------------------------------------------------ |
| `ID`     | Target ID. Supports partial IDs (first 8+ characters). |

**Options:**

| Option  | Description               |
| ------- | ------------------------- |
| `--yes` | Skip confirmation prompt. |

**Behavior:**

* Removes the target from the database
* Associated runs are orphaned (their `target_id` is set to NULL)
* Runs, findings, and evidence are **not** deleted

**Examples:**

```bash theme={null}
# Delete with confirmation
ctpf targets delete a1b2c3d4
# Output:
# Delete target 'My Test Server'? Associated runs will be unlinked. [y/N]: y
# Deleted target 'My Test Server'. 2 runs unlinked.

# Delete without confirmation
ctpf targets delete a1b2c3d4 --yes
# Output:
# Deleted target 'My Test Server'. 0 runs unlinked.

# Using partial ID (8+ characters)
ctpf targets delete a1b2c3d4e5f6 --yes
# Works with just: ctpf targets delete a1b2c3d4 --yes
```

<Note>
  Partial ID matching requires at least 8 characters and must be unambiguous. If multiple targets match, you'll be prompted to use a longer prefix.
</Note>
