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

# Cline

> Connect the Perfai Cloud MCP server to Cline via a remote streamable-http server.

Cline is a VS Code extension that runs as an autonomous coding agent. It supports remote MCP servers through `cline_mcp_settings.json`, stored in VS Code's global storage. Perfai Cloud is a remote server and authentication is a custom Bearer header.

<Note>
  Cline is BYOK (bring your own key) — there's no Claude Pro subscription bypass. Live agent turns need a real paid model API key, or a free local model via Ollama.
</Note>

***

## Generate your Bearer token

Run this in your own terminal — substitute your Perfai email and password:

<Tabs>
  <Tab title="macOS / Linux">
    ```bash theme={null}
    echo -n "you@example.com:yourpassword" | base64
    ```
  </Tab>

  <Tab title="Windows (PowerShell)">
    ```powershell theme={null}
    [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("you@example.com:yourpassword"))
    ```
  </Tab>
</Tabs>

Copy the resulting string — you'll paste it into `cline_mcp_settings.json` as `Bearer <base64>`.

***

## Installation

1. In VS Code, click the **Cline** icon in the sidebar.
2. Click the **MCP Servers** icon at the top of the Cline panel.
3. Open the **Installed** tab and click **Configure MCP Servers** — this opens `cline_mcp_settings.json` directly in the editor.
4. Add (or merge) the following:

```json theme={null}
{
  "mcpServers": {
    "perfai-cloud": {
      "type": "streamable-http",
      "url": "https://mcp-server.perfai.ai/mcp",
      "headers": { "Authorization": "Bearer <base64>" }
    }
  }
}
```

5. Save the file. Cline picks up the change automatically — no restart needed.

***

## Verify the server is connected

1. Open the **MCP Servers** panel in Cline.
2. Look for **perfai-cloud** under the **Installed** tab with a green/active status and 18 tools listed.
3. If it fails to connect, re-check the `Authorization` header value and confirm there's no trailing whitespace in the base64 string.

***

## Login

<Note>
  The prompts below run **inside Cline's chat**, not your terminal. The only file-based step is editing `cline_mcp_settings.json`.
</Note>

In Cline's chat, type:

```
Login to Perfai
```

This calls `login` with no arguments, which opens a browser to Perfai's own login page — never type your email/password directly into the chat. Confirm the session with:

```
What's my Perfai auth status?
```

***

## Register an app and run a scan

```
Register https://your-app.example.com with Perfai
```

```
Check the onboarding status for that app
```

```
Run a security test on the selected app
```

```
Show me the vulnerabilities it found
```

***

## Fix and verify

```
Generate an auto-fix plan for all critical and high findings
```

```
Mark vulnerability 3 as fixed
```

```
Give me the fix summary
```
